feat: gazelle manifest exclude_patterns #917
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.
The current behaviour of the Gazelle manifest is to include every single module it can find inside a Python wheel. This has the downside of adding specific modules that differ from one platform to another. E.g.
psutil
will have differing module files; therefore, generating the Gazelle manifest will yield different results on macOS vs Linux vs Windows. By excluding modules that start with_
by default, we can reduce these differences.I made the exclude_patterns configurable in case the user hits another difference that is not captured by the default value.
In addition to this new feature, I changed the integrity hash logic to consider the generator source code as part of the input. This will enforce users upgrading to a new release of rules_python to re-generate the manifests.