-
Notifications
You must be signed in to change notification settings - Fork 701
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
Cabal should define HASKELL_DIST_DIR #3483
Comments
And/or adjusting the $PATH so that the other exes are just directly available. |
to unbreak running the tests under stack and, once haskell/cabal#3483 is implemented, most other configurations.
Good idea. |
Actually given that the layout of the dist dir is not fixed (and we really should rationalise it at some point), it'd be better for the longer term to put the exes on the $PATH. But compatibility with whatever stack picked is also useful. |
Note that's not the only usecase, there's also And I'd guess people will find more uses for this. I think the doctests's thing is somewhat hacky, whence the custom |
If you apply this patch set #3662 then all internal |
Given that Stack sets the env var before calling Setup, I guess cabal-install should be the one responsible for setting it here? |
I think yes.
Thanks. But test suites aren't build tools (and build tools aren't in dist), are they? Maybe they can be added too? |
You won't be able to put a test-suite in build-tools. But I thought the use-case here was calling an executable from a test suite; executables can be put in build-tools
|
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
@ezyang Ah! I see — it looks like the original use case from @nomeata could work with your suggestion (looking at nomeata/arbtt@a114ff9 which seems the concrete example of the OP). So that's probably good. But let me remind:
Also, this isn't enough for other uses. Ones I'm familiar with, but that might warrant better fixes:
TL;DR.: it seems Haskell libraries needing hooks into Setup.hs don't compose just so. Unless maybe those hooks are rephrased using https://hackage.haskell.org/package/cabal-helper? (Related to #3065 and #2395). |
I don't know what should be done about doctest. Would have to sit down and think about it. Anyway go look at the PR for this bug. |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test suites often want to run executable from
dist/
. Nowdist/
is not alwaysdist/
, so an environment variable to indicate the position of dist would be nice.stack
setsHASKELL_DIST_DIR
to this value. It would be nice if this were done byCabal
, so that other modes of building Haskell packages benefit from this convenience.The text was updated successfully, but these errors were encountered: