Skip to content
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 and init look for an existing stack.yaml #1604

Closed
mgsloan opened this issue Jan 5, 2016 · 2 comments
Closed

Stack new and init look for an existing stack.yaml #1604

mgsloan opened this issue Jan 5, 2016 · 2 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Jan 5, 2016

If the stack.yaml is invalid, then things fail:

mgsloan@computer:~/fpco/test-stack$ mkdir parent
mgsloan@computer:~/fpco/test-stack$ cd parent
mgsloan@computer:~/fpco/test-stack/parent$ stack new child
Downloading template "new-template" to create project "child" in child/ ...
The following parameters were needed by the template but not provided: category
You can provide them in /home/mgsloan/.stack/config.yaml, like this:
templates:
  params:
    category: value
Or you can pass each one as parameters like this:
stack new child new-template -p "category:value"
Writing default config file to: /home/mgsloan/fpco/test-stack/parent/child/stack.yaml
Basing on cabal files:
- /home/mgsloan/fpco/test-stack/parent/child/child.cabal

Checking against build plan lts-3.19
Selected resolver: lts-3.19
Wrote project config to: /home/mgsloan/fpco/test-stack/parent/child/stack.yaml
mgsloan@computer:~/fpco/test-stack/parent$ rm child/stack.yaml 
mgsloan@computer:~/fpco/test-stack/parent$ echo "invalid" > stack.yaml
mgsloan@computer:~/fpco/test-stack/parent$ cd child
mgsloan@computer:~/fpco/test-stack/parent/child$ stack init
Could not parse '/home/mgsloan/fpco/test-stack/parent/stack.yaml':
AesonException "when expecting a ProjectAndConfigMonoid, encountered String instead"
See http://docs.haskellstack.org/en/stable/yaml_configuration.html.
@mgsloan
Copy link
Contributor Author

mgsloan commented Jan 5, 2016

Split off from #1583 (comment)

@mgsloan
Copy link
Contributor Author

mgsloan commented May 15, 2016

Dupe of #2110 which got resolved

@mgsloan mgsloan closed this as completed May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant