Allows stack.yaml files to use !include directives#1
Draft
Conversation
This allows projects that maintain multiple `stack.yaml` files (e.g. for testing against multiple LTS versions) to reduce the duplication between them by using includes to share common parts. `!include` may also be used in `config.yaml` files. The use of `!include` interferes with the ability of the `config set` command to determine where to change a setting that has been read while parsing JSON, so thes makes `config set` raise error if `!include` appears in the file being updated.
|
I'm assuming this errors out if the include file can't be found right? Not sure if we want this as part of this pr, but I could imagine it being nice to allow an optional file to mimic something like a gitignored docker.compose.override.yaml but for a stack.yaml file, though I haven't thought through the implications much yet A use case I could think of for this would be easily allowing our flipstone-prelude debug functions locally with the flag (if someone chooses to - I know I've wanted this enabled before for more easily testing certain things) but still always failing them on CI |
Member
Author
|
@OwenGraves Yes it errors out. The |
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.
This allows projects that maintain multiple
stack.yamlfiles (e.g. for testing against multiple LTS versions) to reduce the duplication between them by using includes to share common parts.!includemay also be used inconfig.yamlfiles.The use of
!includeinterferes with the ability of theconfig setcommand to determine where to change a setting that has been read while parsing JSON, so thes makesconfig setraise error if!includeappears in the file being updated.Note: Fixes for the online documentation of the current Stack release
(https://docs.haskellstack.org/en/stable/) should target the 'stable' branch,
not the 'master' branch.
Please include the following checklist in your pull request:
Please also shortly describe how you tested your change. Bonus points for added tests!
Integration tests were added!