haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.62k stars 697 forks source link

Some way to apply a constraint on the command line to `build-tool-depends` #10375

Closed geekosaur closed 1 week ago

geekosaur commented 1 month ago

Describe the feature request --constraint only applies to libraries. There's no equivalent mechanism for build tools.

Additional context happy-2.0 was just released, and breaks haskell-lib-parser and probably other things (and possibly is just straight-up broken). Until its constraint can be adjusted or a fixed happy is released, there needs to be some way to constrain it to avoid the breakage without making it a local source or editing cabal.project (which may be in CI, or you aren't doing an install within a project).

grayjay commented 1 month ago

I think that this issue is part of #3502. Is it possible to work around the specific issue with happy by using any.happy, or do you need to only constrain a specific use of the build tool?

geekosaur commented 1 month ago

I'm uncertain. It didn't attempt to build the library, whereas it did when I let it use happy-2.0, so I guess that's a good sign.

grayjay commented 1 week ago

@geekosaur Were you able to build the project by adding an any.happy constraint, or is there another issue that isn't covered by #3502?

geekosaur commented 1 week ago

We (this was originally raised by Tom Smeding on IRC, but someone else originally asked about it there) were able to get it to work with that, yes.