Skip to content

Add option to specify contents of resolver#5

Merged
adamgundry merged 3 commits intomainfrom
4-specify-resolver-content
Feb 22, 2023
Merged

Add option to specify contents of resolver#5
adamgundry merged 3 commits intomainfrom
4-specify-resolver-content

Conversation

@adamgundry
Copy link
Copy Markdown
Contributor

This is a quickly hacked together attempt at #4. It adds a --resolver-file option which expects the path to a YAML file in the format used by https://github.com/commercialhaskell/stackage-snapshots. It assumes that all such snapshots contain only Hackage packages.

As far as package names/versions go this seems to work. However there is an issue with flags: the plan.json contains values for all flags in the build plan, whereas the snapshot YAML file contains only a few flags (presumably those with non-default values). Thus the generated stack.yaml still redundantly specifies many flag values. I'm not sure how much this matters; perhaps stack will ignore the duplicate flag values?

The problem with this is that the file doesn't include flags which
still have their default values, yet the plan contains them (and
doesn't have an indication that they are still the default).
@adamgundry adamgundry changed the title Draft: add option to specify contents of resolver Add option to specify contents of resolver Feb 21, 2023
@adamgundry
Copy link
Copy Markdown
Contributor Author

This seems to work in practice; the redundant flag values don't seem to matter.

@adamgundry adamgundry merged commit be3e63a into main Feb 22, 2023
@etherz10 etherz10 deleted the 4-specify-resolver-content branch July 18, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant