-
Notifications
You must be signed in to change notification settings - Fork 848
src directory not in scope when creating new stack project #5759
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
Comments
@topheruk, please can you explain what you do to get the error? For example, on Windows, if I take these steps:
everything works as expected, and I also have the same |
I think I ought to elaborate that the error is coming from VSCode & inside a devcontainer. When I hover over the function or I open the Problems panel it can't seem to find the folder but it compiles |
Yes, I think the starting point is the repo for the extension. I am going to close this issue as it relates to a different part of the Haskell ecosystem. |
General summary/comments (optional)
Any module inside the
src
directory seems to not be in scope of theapp
directory when creating a new default stack project. May be a similar issue to #4553 but that was closed due to insufficient information so hopefully I can add more here.my file structure:
When I move the Lib module into the app directory its suddenly in scope again
Steps to reproduce
any time I make create a project using the command
stack new <project_name>
my
package.yaml
file that gets generated.Expected
It to produce no error
Actual
Error
Variable not in scope: someFunc :: IO ()
Stack version
I am using this inside a devcontainer.
Method of installation
I am using this inside a devcontainer. I first tried to use the official image but that led to issues with the GHCup needing to be installed everytime I reloaded the page. Then I found a partial solution here which seems to have solved the isue for building apps with
cabal init
as well as apps built withstack new <name> simple
The text was updated successfully, but these errors were encountered: