-
Notifications
You must be signed in to change notification settings - Fork 238
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
Relative paths in stack.yaml "packages" section seem to not work #779
Comments
Typically one puts the "project configuration" (i.e. As for why this isn't working, you've probably put |
If |
Thanks for the fast responses! @hamishmack thanks, I'm trying to keep everything in the same tree (no submodules or anything). @michaelpj I tried passing the
I don't think having a single top-level
Currently It seems natural to me for a monorepo to contain all the packages side by side like this, with potentially arbitrary dependencies between them. It works fine with normal Stack (aside from terrible bugs like commercialhaskell/stack#3130...). Is this something reasonable to do with |
I would still use a single
|
Okay, I'm trying the single (Am I supposed to put |
(Could the error be because I have a few other folders in the root folder as well which are not Haskell packages?) |
It's a bit hard to guess what's going on :) can you post your |
(One guess: perhaps you haven't checked in the new |
Oh derp, that was it. After git checkin things seem to be building smoothly. Thanks for the help! Do you want to keep this issue open? I'm happy to close but if |
Hard to say - it does work with relative paths, it doesn't work with paths outside the stated source! Arguably this is a standard Nix gotcha, but maybe it's worth documenting. I might add an entry to the Troubleshooting section. |
It is possible to make relative paths in a
but Instead use the
|
This is old and I decided to go with the flow and use single |
Apologies if I'm missing something obvious here. I have a monorepo with a couple dependency packages being used by a main package, something like this:
Inside
mainApp/stack.yaml
, I use a relative path to reference the other packages:However, when I drop the
default.nix
from thehaskell.nix
tutorial intomainApp/default.nix
and try to build, it doesn't work. I get errors likeThis suggests to me that this use-case is not supported.
But maybe I'm going about it the wrong way anyway? I'd greatly appreciate advice on the right way to use
haskell.nix
in a monorepo like this--I've been over the manual carefully and I can't figure it out. (For example, I already confirmed that I can create./depA/default.nix
and builddepA
successfully by itself. Can I then just import it and add it to the packages thatmainApp
knows about? Sort of confused by the variety of options likehsPkgs
,pkg-def-extras
, etc. mentioned in the manual.)The text was updated successfully, but these errors were encountered: