plclub / plclub-web

A Hakyll [plclub] website (https://www.cis.upenn.edu/~plclub/)
6 stars 19 forks source link

Don't check in stack.yaml #17

Closed Lysxia closed 4 years ago

Lysxia commented 4 years ago

Having stack.yaml not checked in makes it easier for different people to use different resolvers (personally, so I can use the same resolver in all Haskell projects). Instead, there is now a stack-default.yaml and that adds only one extra cp at the very beginning for most people.

I also upgraded the resolver to lts-14.27, but can add back a version with lts-12.26 if prompted.

dunnl commented 4 years ago

I'm not sure removing stack.yaml is the right thing to do. This and this seem to lean in favor of leaving it in---granted these answers are from the same person and those questions aren't directly about this situation. I don't think overriding the resolver is common although I see why some people might want to.

Stack apparently has or had a --resolver=global option according to https://github.com/commercialhaskell/stack/issues/645. I think it would be easier to either override like this, or else maintain a local stack.yaml and configure .gitignore to ignore the local version (and the modified .gitignore too I guess?). Is there a way to configure stack to always use a custom resolver?

Lysxia commented 4 years ago

Fair enough. There doesn't seem to be an option in stack to change this but another solution I just realized is to alias stack to stack --stack-yaml mystack.yaml or set the environment variable STACK_YAML=mystack.yaml.