You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cabal-install 3.8.1.0 no longer passes through ghc-options on install #8637
I don't know if this change is intentional, but as I couldn't find anything mentioning this specifically in the changelog, I'm guessing not.
System information
Operating system: Linux x86_64
cabal, ghc versions: cabal 3.8.1.0, ghc 9.0.2.
Additional context
Passing --ghc-options=-optl-static etc is actually pretty convenient in some cases. Besides, it's rather surprising that configuration options are ignored on install in the first place.
Hrm. Do you think that we should change cabal install to record ghc-options and other program options as per-package scoped to the package the install command is run on?
I think that would be the least surprising behavior, and hopefully a fairly minimally invasive change (since it just affects the single command).
Activity
jneira commentedon Dec 19, 2022
Hi, many thanks for the report.
TBH i cant believe such a bug had not been catched by the test suite, but i just reproduced it locally 🤦
Possible workarounds (the usual ones):
ghc-optionsfield in the cabal file (using common stanzas if you want to apply them to various components)or
Of course those workarounds do not work to install remote packages.
I wonder if #7973 is related
//cc @patrickdoc
gbaz commentedon Jan 9, 2023
@patrickdoc did you get a chance to look at this?
patrickdoc commentedon Jan 10, 2023
Reviewing my notes on #7998 , I believe the root issue here is that "hello" is not a local package.
Internally, options are applied:
In this case, "hello" is classified as a "remote" package instead of "local", so the command-line flags are not applied.
gbaz commentedon Jan 10, 2023
Hrm. Do you think that we should change
cabal installto record ghc-options and other program options as per-package scoped to the package theinstallcommand is run on?I think that would be the least surprising behavior, and hopefully a fairly minimally invasive change (since it just affects the single command).
Mikolaj commentedon Feb 9, 2023
@patrickdoc: ping?
Mikolaj commentedon Feb 14, 2023
@patrickdoc: hopeful ping again?
Apply command line flags to install packages (haskell#8637)
Apply command line flags to install packages (haskell#8637)
Mikolaj commentedon Feb 23, 2023
A fix in progress: #8779.
Apply command line flags to install packages (haskell#8637)
Apply command line flags to install packages (#8637) (#8779)
Apply command line flags to install packages (#8637) (#8779)
Mikolaj commentedon Feb 24, 2023
@patrickdoc: thank you!
We hope this is fixed in #8779, which I'm backporting to 3.10 right now. Please reopen if not.
Merge pull request #8811 from haskell/mergify/bp/3.10/pr-8779