Exclude compiled extension from gem #5818
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For a long time now we've been accidentally including the compiled C extension used by Linguist for token parsing when creating the gem.
This has gone unnoticed until #5808 because I used to build the gem on macOS and the resulting gem included the macOS library and not the Linux library. The Linux library would then have been built at the time of installation, hence no problem.
I've recently switched to using Codespaces and so now the Linux library is being built against the version of Ruby on the Codespace env at the time and then included in the gem, which at the time of building the 7.19.0 gem was running Ruby 2.7.2. This wouldn't be a problem in envs with Ruby 2.7 installed, but is if the env only has Ruby 3 installed.
This PR fixes that by explicitly excluding the macOS
linguist.bundle
and Linuxlinguist.so
files when building the gem.Once merged, I'll start a new release to get a working gem out.
Fixes #5808
[ Checklist removed as it doesn't apply ]