-
Notifications
You must be signed in to change notification settings - Fork 841
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
stack new -- AesonException #2275
Comments
Makes sense! I'd prefer just special casing "Number" than using the encode function. Otherwise, more complicated errors could turn into complicated strings, and the yaml accepted. |
I took a quick look at this as another place to dip into the stack codebase. According to what's in Line 181 in db81ab3
Is this what you would expected? Would you ever want to use a non-current year in the config file? However, even if the value is never used you still see the exception when parsing |
@tswelsh Sorry for the delay in responding, I am currently cleaning up my browser window with "TODO" stack issues.
Good question. It seems arbitrary to disallow it, so it's allowed but not recommended.
All parameters should be allowed to be Number. A similar change recently happened in hpack - sol/hpack@8aa7537#diff-87ed521fa5387e6fab1b0cdf6786eb63R76 I'm actually quite fine just forcing users to use strings. Leaning towards doing that and just making this a documentation issue. With Number, the user may not get the exact text they entered. |
Can this be closed off as #3701 has been merged? Sorry should have linked to this in the PR somehow |
No stress, let's close it, sure! |
stack new hello-world
fails withWhen my
config.yaml
looks likeWorks fine if I change the year line to:
I think it's pretty clear what's going on here, but the documentation at http://docs.haskellstack.org/en/stable/yaml_configuration/ doesn't mention the
year
parameter. I learn about from when I runstack new
with a blankconfig.yaml
. It says:I think it could be fixed by requiring that
year
be astring
instead of avalue
or by coercing whatevervalue
happens to be to a string using Aeson's encode function.The text was updated successfully, but these errors were encountered: