Handle Backpack signature files in component discovery#6940
Open
philippedev101 wants to merge 1 commit into
Open
Handle Backpack signature files in component discovery#6940philippedev101 wants to merge 1 commit into
philippedev101 wants to merge 1 commit into
Conversation
Treat declared .hsig files as Backpack signatures instead of unknown custom-preprocessor candidates. Track declared signature files for rebuilds, keep signature modules out of ordinary module resolution, and emit a Backpack-specific warning when a local .hsig file is not listed in the component's signatures field. Keep the existing custom-preprocessor warning for other unknown extensions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses #6937.
@mpilgrem I don't think
.hsigshould go through the custom-preprocessor path. A.hsigfile is already the source file for a Backpack signature, not an input that should produce a.hsfile.The main user-visible change is that a normal Backpack package should stop getting a warning that suggests adding
.hsigtocustom-preprocessor-extensions. That warning sends people in the wrong direction: the project is not missing preprocessor configuration, Stack just needs to recognize the declared signature file as part of the package.There are now three cases. If the module is listed in
signatures, Stack treats the.hsigas expected and stays quiet. If there is a local.hsigfile but the module is not listed insignatures, Stack gives a Backpack-specific hint pointing at the missing field. If the file really is some other unknown extension, Stack still gives the existing custom-preprocessor warning.The declared
.hsigfiles are also tracked for rebuilds, so changing a signature is treated like changing another source file that matters to the component.Tests cover the valid Backpack case,
.hsigrebuild tracking, the undeclared-signature warning, and the unchanged custom-preprocessor warning path.