Skip to content
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

Problems with build-tools support in Stack #5245

Open
qrilka opened this issue Mar 30, 2020 · 1 comment
Open

Problems with build-tools support in Stack #5245

qrilka opened this issue Mar 30, 2020 · 1 comment

Comments

@qrilka
Copy link
Contributor

qrilka commented Mar 30, 2020

It appears that Stack doesn't properly supports constraints in the build-tools stanza of Cabal. An example of this could be seen in the repo https://github.com/qrilka/hsc2hs-fail quoting:


It appears that lts-14.27 includes hsc2hs-0.68.6 and with the lines

#build-tools:
#- hsc2hs >= 0.68.6

commented out from the package.yaml we get a build failure because the version 0.68.5 from GHC-8.6.5 gets used. Uncommenting the constraint above gives a unsatisfied version failure from Cabal.

One could build hsc2hs manually with stack build hsc2hs and that adds the version 0.68.6 into the Stack's path:

$ stack exec -- hsc2hs --version
hsc2hs version 0.68.6
But it appears that stack build could only use hsc2hs shipped with GHC.


It appears that the documentation doesn't tell explicitly if build-tools stanza is fully supported.
Also it looks like the problem in #5242 should also come from incorrect handling of build-tools. My incomplete investigation showed that Stack sets --bindir when configuring Cabal project but that doesn't seem to be used for build tools and it looks like required tools should appear in the $PATH.

Stack version

$ stack --version
2.1.3.1 x86_64 hpack-0.33.0

Method of installation

  • Other (please specify) - nixpkgs (not on NixOS)
@mpilgrem
Copy link
Member

mpilgrem commented Sep 18, 2023

It has been suggested that sol/hpack#516 is also a manifestation of Stack not supporting build-tools correctly/fully. Other open issues mentioning build-tools include:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants