cabal icon indicating copy to clipboard operation
cabal copied to clipboard

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

Open geekosaur opened this issue 1 year ago • 2 comments

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).

geekosaur avatar Sep 19 '24 22:09 geekosaur

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?

sebright avatar Sep 20 '24 03:09 sebright

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.

geekosaur avatar Sep 20 '24 03:09 geekosaur

@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?

sebright avatar Nov 04 '24 05:11 sebright

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.

geekosaur avatar Nov 04 '24 05:11 geekosaur