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
ghc-options applies to all dependencies, not just local packages #3883
If I try the same with new-build, it starts to rebuild every single dependency; presumably because it considers the compiler flags for all dependencies to have changed. I tried to do
but although it doesn't complain about the ghc-options inside the package section, it doesn't seem to take it into account either; no dump files get created. What is the right approach?
My intuition is that the second option ought to work, so we should fix it if it doesn't. Related: I've long wanted a cabal ghc-core ModuleName command.
If I try the same with new-build, it starts to rebuild every single dependency; presumably because it considers the compiler flags for all dependencies to have changed.
I favour the approach where you use -Wall locally and -Werror on CI. During development, it's a bit tedious to get rid of all warnings every time: redundant imports, missing export lists, unused functions/types/fields/constructors, etc. But your final result shouldn't contain any warnings. Unfortunately, it's quite easy to miss them locally. Fortunately, this is a purpose of CI — catch all such things.
Reacted by Harendra Kumar, John MacFarlane, Rob Rix, Ivan Gromakovskii, George Thomas, Tom Ellis and Vilem Liepelt
A problem with the current workaround is that it’s impossible to list out all local packages in the global ~/.cabal/config file. I’d like to enable ghc-options: -j for all local packages globally, but I don’t think that’s currently possible.
@lexi-lambda agreed - this would be great for tooling as well, since certain tools like hsinspect require plugins to be enabled in order to gather the correct data. Obviously committing build-tool specific details to source is a bad idea, but without being able to support flags and options with some global config or cabal.project.local-like behavior, I'm left in a suboptimal position.
Just so it doesn't like I'm complaining at developers, I'm available to discuss this more in depth and contribute code towards this. Just point me in the right direction 😄
@hvr & co, instead of pointing fingers at others, lobbying against other peoples projects and hampering competition, please put your effort into producing working software yourself!
Reacted by Sam Halliday, Michael Peyton Jones and Francesco Gazzetta
After #7973, ghc-options is only applied to all local packages. It is still possible recover the old behaviour, see the workaround here: #7973 (comment)
Closing the issue, thanks all!
Activity
23Skidoo commentedon Sep 22, 2016
My intuition is that the second option ought to work, so we should fix it if it doesn't. Related: I've long wanted a
cabal ghc-core ModuleNamecommand.dcoutts commentedon Sep 26, 2016
The prog options should apply only to local packages, not all deps, just as all other command line or config top level options do.
edsko commentedon Sep 26, 2016
Ah, turns out this is a duplicate of #3891 .
dcoutts commentedon Sep 26, 2016
This is still a bug.
60 remaining items
chshersh commentedon Jun 25, 2019
I favour the approach where you use
-Walllocally and-Werroron CI. During development, it's a bit tedious to get rid of all warnings every time: redundant imports, missing export lists, unused functions/types/fields/constructors, etc. But your final result shouldn't contain any warnings. Unfortunately, it's quite easy to miss them locally. Fortunately, this is a purpose of CI — catch all such things.harendra-kumar commentedon Jun 25, 2019
@phadej thanks for pointing out the workaround. I was not aware of it. This is useful.
lexi-lambda commentedon Oct 29, 2019
A problem with the current workaround is that it’s impossible to list out all local packages in the global
~/.cabal/configfile. I’d like to enableghc-options: -jfor all local packages globally, but I don’t think that’s currently possible.cartazio commentedon Mar 6, 2020
What are the architectural or man power blockers here ?
emilypi commentedon Mar 6, 2020
@lexi-lambda agreed - this would be great for tooling as well, since certain tools like hsinspect require plugins to be enabled in order to gather the correct data. Obviously committing build-tool specific details to source is a bad idea, but without being able to support flags and options with some global config or
cabal.project.local-like behavior, I'm left in a suboptimal position.Just so it doesn't like I'm complaining at developers, I'm available to discuss this more in depth and contribute code towards this. Just point me in the right direction 😄
Try to set Git commit hash using CPP
sol commentedon Aug 31, 2020
@ezyang agree!
@phadej disagree!
@hvr & co, instead of pointing fingers at others, lobbying against other peoples projects and hampering competition, please put your effort into producing working software yourself!
cartazio commentedon Aug 31, 2020
jneira commentedon May 1, 2022
After #7973,
ghc-optionsis only applied to all local packages. It is still possible recover the old behaviour, see the workaround here: #7973 (comment)Closing the issue, thanks all!
Restrict -Werror to directory only