-
Notifications
You must be signed in to change notification settings - Fork 64
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 project in sub-directory #242
Comments
Hi, thank you for the bug report! I think you may use the latest feature of cradle:
multi:
- path: "./hs"
config:
cradle:
stack:
stackYaml: "./hs/stack.yaml"
components:
- path: "./src"
component: "reach:lib"
- path: "./test"
component: "reach:test:reach-test"
- path: "./app"
component: "reach:exe:reachc" Then try to invoke |
I'd love to test it. I'm sorry but I don't know how to begin with the source release of So... how do I actually build the |
Sorry, indeed, > stack init --resolver lts-16.11 --ignore-subdirs --force I tested that |
Thanks, I built it and ran with that config file. I get this result:
If I run the cradle command, I get this:
I also tried a simpler
Although may it is good to have the more complex one, I don't really know So anyways... I don't really know if this means it will work in the new version, but if you know that it does, then I guess we can close this issue and I'll just make a note to use the new config option when the other parts of the pipeline get updated. Thank you for the fast response! I tried to use |
I debugged this a bit now. cradle:
multi:
- path: ./
config:
cradle:
none:
- path: ./simple-stack/
config:
cradle:
stack:
stackYaml: ./simple-stack/stack.yaml
components:
- path: ./simple-stack/src
component: simple-stack:lib
- path: ./simple-stack/exe
component: simple-stack:exe:simple-stack-exe
- path: ./simple-stack/test
component: simple-stack:test:simple-stack-test Somewhat under documented, the paths within in the multi-cradle are still relative to the location of
I am unsure how well this plays in practice with real projects, yet, but would be happy about feedback! |
Thanks! Do you know if it possible to get the Also, it might be nice to be allowed to have |
I think with VSCode comes
Indeed, that would be nice. Judging by a quick test, it seems the main problem is that the wrapper can in that case not figure out which type of project it is being invoked on.
where So, if you are always working on stack projects with the same ghc version (e.g. all have lts-16.11 or something like that), then you can skip the wrapper script and launch the appropriate HLS version in VSCode directly. Maybe we can solve this issue on the HLS side. |
Thank you! |
I have a project that I'm opening in VSCode. The Haskell code is in a sub-directory,
./hs
.Without a
hie.yaml
, when the VSCode extension tries to get the cradle, it runsBut, when I run that from the
hs
directory, I get:So, I made a
hie.yaml
that looks like this:But, when I run it, I now get
This is because my global Stack project is 8.6.5.
I also tried
and
and
But none of these work.
What is the correct way for the sole
stack.yaml
in my project to be in a sub-directory of the directoryhie-bios
is run from?The text was updated successfully, but these errors were encountered: