Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Occurred error on stack new-template. #1706

Closed
dyoshikawa opened this issue Mar 16, 2020 · 3 comments
Closed

Occurred error on stack new-template. #1706

dyoshikawa opened this issue Mar 16, 2020 · 3 comments

Comments

@dyoshikawa
Copy link

Environment

  • MacOS Mojave 10.14.6
  • VSCode 1.43.0
  • stack 1.2
  • hie 1.2, Git revision 35f62cf (3841 commits) x86_64 ghc-8.6.5

Reproduction steps

stack new my-project --resolver ghc-8.6.5

Generated sources of new-template.

cd my-project
code . # open vscode

When open Setup.hs on vscode, the error occurred.

Error Message

Fail on initialisation for "/Users/username/src/github.com/username/my-project/Setup.hs".
Could not obtain flags for: "Setup.hs".

This module was not part of any component we are aware of.

Component: ChLibName ChMainLibName with source directory: ["src"]
Component: ChExeName "my-project-exe" with source directory: ["app"]
Component: ChTestName "my-project-test" with source directory: ["test"]


To expose a module, refer to:
https://docs.haskellstack.org/en/stable/GUIDE/
If you are using `package.yaml` then you don't have to manually expose modules.
Maybe you didn't set the source directories for your project correctly.

stack build is completed successfully.
Do you have any idea?

@jneira
Copy link
Member

jneira commented Mar 16, 2020

Setup.hs is a special file and hie does not have support for it yet. You should be able to open other files (inside src or exe dirs) though.
See #1650

@dyoshikawa
Copy link
Author

@jneira Thank you.
I will watch #1650 discussion.

@fendor
Copy link
Collaborator

fendor commented Mar 16, 2020

Feel free to reopen, if it turns out, it wasnt a duplicate of #1650

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants