haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 213 forks source link

Occurred error on stack new-template. #1706

Closed dyoshikawa closed 4 years ago

dyoshikawa commented 4 years ago

Environment

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 commented 4 years ago

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 https://github.com/haskell/haskell-ide-engine/issues/1650

dyoshikawa commented 4 years ago

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

fendor commented 4 years ago

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