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
A nice feature to add would be to share properties between targets. A common thing to see (even in cabal's .cabal file):
library
exposed-modules: Blah, Bleh
ghc-options: -Wall -Wsomething
default-language: Haskell 2010
if flag(debug)
cpp-options: -DDEBUG
Test-Suite test
...
ghc-options: -Wall -Wsomething
default-language: Haskell 2010
if flag(debug)
cpp-options: -DDEBUG
Executable blah
...
ghc-options: -Wall -Wsomething
default-language: Haskell 2010
if flag(debug)
cpp-options: -DDEBUG
It would be nice to be able to declare the 4 lines as a set of options and just reference them on the different targets. With the new .cabal looking more or less like:
@rudymatela: would you like to comment? Alternatively, we can close this ticket and you are very welcome to open a new one once you have the time to investigate the new cabal feature that plausibly solves this issue.
Activity
[-]Share properties between targets[/-][+]Shared BuildInfo between targets[/+]rudymatela commentedon Jun 17, 2015
By the way, I've seen a few posts on stackoverflow related to this issue:
ulysses4ever commentedon Sep 26, 2022
Should this be closed in the light of common stanzas? (#4751, bfb1967, possible dup of #2832)
Mikolaj commentedon Sep 30, 2022
@rudymatela: would you like to comment? Alternatively, we can close this ticket and you are very welcome to open a new one once you have the time to investigate the new cabal feature that plausibly solves this issue.
rudymatela commentedon Oct 3, 2022
@ulysses4ever @Mikolaj I did not test the common stanzas feature, but by reading the relevant tickets (#4751, #2832) they seem to resolve this issue.
Thanks for addressing this!
I will close now.
Mikolaj commentedon Oct 17, 2022
Thank you!