Allow passing of GHC version; pull snapshot from cabal config#4
Allow passing of GHC version; pull snapshot from cabal config#4intercalations wants to merge 4 commits intomasaeedu:masterfrom
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. |
masaeedu
left a comment
There was a problem hiding this comment.
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.
| # init-haskell location | ||
| base=$(dirname "$(readlink -f "$0")") | ||
|
|
||
| ghc=${1:-8.10.7} |
There was a problem hiding this comment.
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.
If you agree with the env var change:
| init-haskell 9.2.1 | |
| INIT_HASKELL_GHC=9.2.1 init-haskell |
No description provided.