cabal icon indicating copy to clipboard operation
cabal copied to clipboard

cabal-install BuildFlags is not exported?

Open kokobd opened this issue 3 years ago • 5 comments

In Distribution.Client.CmdBuild module, BuildFlags is defined but not exported.

https://github.com/haskell/cabal/blob/dd312ecc44b79945061a4cb45e15b90f26382be4/cabal-install/src/Distribution/Client/CmdBuild.hs#L4-L12

https://github.com/haskell/cabal/blob/dd312ecc44b79945061a4cb45e15b90f26382be4/cabal-install/src/Distribution/Client/CmdBuild.hs#L83-L85

kokobd avatar Aug 10 '22 04:08 kokobd

Thank you for the report. But is that a problem? Perhaps the flag is an implementation detail or perhaps it's deprecated? Does the flag do anything useful on the commandline?

Mikolaj avatar Aug 10 '22 08:08 Mikolaj

I'm trying to import cabal-install as a library to my application. But I can not construct the argument for buildAction image

kokobd avatar Aug 10 '22 08:08 kokobd

How about using defaultBuildFlags?

Mikolaj avatar Aug 10 '22 08:08 Mikolaj

defaultBuildFlags

Unfortunately, defaultBuildFlags is also not exported. (I found BuildFlags and defaultBuildFlags both in Cabal and cabal-install, but they are not the same, right?)

kokobd avatar Aug 10 '22 08:08 kokobd

Oh, you are right, this API seems broken. Yes, they are not the same. We should probably export both BuildFlags and defaultBuildFlags. PR welcome.

Mikolaj avatar Aug 10 '22 09:08 Mikolaj