-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing of GHC version; pull snapshot from cabal config #4
base: master
Are you sure you want to change the base?
Conversation
Nice, thank you! I'm a little concerned about the snapshot thing, because I generally want that to remain invariant until I want to upgrade (so that I can benefit from already built/downloaded derivations in new projects). Do you think it makes sense to add another optional argument for that? Or perhaps it checks for a copy of the JSON blob in the user's home dir and prefers whatever it finds there (only putting in the hardcoded defaults if not found)? Upgrading things is a problem I don't have a good solution for at the moment. I've wanted for a while to make the tool bidirectional, so that not only can the structured data be interpolated into all the files the tool strews about, but you can also parse an existing collection of files to get structured data (which you can edit to e.g. pick a different snapshot) and then regenerate. This would also help with migrating generated repos that have been edited by hand when we want to change the template in some way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thank you! Optional suggestion about using an env var instead of a CLI arg, but other than that feel free to merge.
set -Eeuxo pipefail | ||
|
||
# init-haskell location | ||
base=$(dirname "$(readlink -f "$0")") | ||
|
||
ghc=${1:-8.10.7} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on changing this to an env var INIT_HASKELL_GHC
so people can set it in their profile (and we don't have to do arg parsing for further arguments)?
The above will default to using GHC 8.10.7. If you'd like to use a different version, simply pass the full version as an argument: | ||
|
||
``` | ||
init-haskell 9.2.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you agree with the env var change:
init-haskell 9.2.1 | |
INIT_HASKELL_GHC=9.2.1 init-haskell |
No description provided.