-
Notifications
You must be signed in to change notification settings - Fork 103
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
build-tools for executable in same package incorrect #516
Comments
@brandonchinn178 sorry for getting back late. This is likely an issue with Can you reproduce the issue by running |
@brandonchinn178, that's odd. When I try a test package with the following in its build-tools:
- tasty-autocollect:tasty-autocollect the Cabal file generated by Hpack 0.35.5 (I am using Stack 2.13.0.1) contains the following in its stanzas: build-tool-depends:
tasty-autocollect:tasty-autocollect (EDIT: I get the same with Stack 2.11.1 and its Hpack 0.35.2) |
@mpilgrem the issue only occurs with Hpack desugars build tools from the same package to You could try to construct a reproducer for stack with a plain However, taking a step back, producing |
@sol, thanks for the explanation. I'll raise an issue on Stack's repository and see if I can work out what is happening Stack-wise. |
I am going to close this Hpack issue, as it is indeed a Stack issue. |
I'm reopening this for the time being. @mpilgrem you can still fix this in |
@sol, Stack, currently, does not seek to drop support for Cabal < 2.0 before 2024-12-19, due to a 'seven year' approach to backwards compatibility. (The origin of 'seven years' was a discussion in the Slack channel; some people wanted a longer period than, say, the Cabal project's 'five years' - largely because, at that time, they were still using 'beloved' GHC 7.10.3, released 8 December 2015.) If Hpack does drop Cabal's |
There is an other complication, Hackage does not support For that reason, I am not eager to change anything here.
Yes, exactly, I assume you already read the relevant parts of the cabal documentation, so I'm not reiterating them here. But the bottom line is that to produce cabal files that behave sane with This does not perfectly align with one of our design goals, "give the user 100% control when needed". A user who wants 100% control over when to use |
@mpilgrem if you are still going to fix this in EDIT: Just realize that you already fixed it, great work 👍 |
hpack
0.34.4
Currently on this commit: https://github.com/brandonchinn178/tasty-autocollect/tree/1f45427cc4784c94679a14d0ceda72024491ae10
package.yaml
containsThe cabal file contains
build-tools: tasty-autocollect
Doing a
stack build
from scratch shows the message:But doing a manual
then building from scratch (
stack purge && stack build
) no longer shows the messageThe text was updated successfully, but these errors were encountered: