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
It seems like a bad idea to have derivable data in .cabal files. Library authors often put something inaccurate in this field, and even when they get it right it's unnecessary work.
Instead we could write a command to show the language extensions used in a project. That command could be made available as a cabal-install flag (or provided separately if it's too much clutter for cabal-install).
@seagreenother-extensions provides esential meta-information to the cabal solver it couldn't otherwise access, in fact the solver was finally hooked up in #2644 to use this information.
We've recently added the ability to Hackage to edit other-extensions in existing releases to become more accurate. So what you're proposing is going into the exact opposite direction of what we're currently working towards! Personally I consider this de-feature request a wontfix
The ability to automatically derive this info is useful, however. Ideally, Hackage would prevent uploading packages with incorrect other-extensions. But I guess we can open a separate ticket for this.
@23Skidoocabal init already derives that information automatically when it prefills your initial .cabal file, we may want something like the gen-bounds feature for other-extensions...
@23Skidoo fwiw, I'm working on something like ghc --allowed-extensions=TemplateHaskellQuotes,BinaryLiterals,LambdaCase, which would turn undeclared other-extensions into compile warnings... won't help cabal check though
Activity
hvr commentedon Jan 28, 2016
@seagreen
other-extensionsprovides esential meta-information to the cabal solver it couldn't otherwise access, in fact the solver was finally hooked up in #2644 to use this information.We've recently added the ability to Hackage to edit
other-extensionsin existing releases to become more accurate. So what you're proposing is going into the exact opposite direction of what we're currently working towards! Personally I consider this de-feature request a wontfix23Skidoo commentedon Jan 28, 2016
The ability to automatically derive this info is useful, however. Ideally, Hackage would prevent uploading packages with incorrect
other-extensions. But I guess we can open a separate ticket for this.hvr commentedon Jan 28, 2016
@23Skidoo
cabal initalready derives that information automatically when it prefills your initial.cabalfile, we may want something like thegen-boundsfeature forother-extensions...23Skidoo commentedon Jan 28, 2016
I guess the main problem with integrating this with
cabal checkis CPP? Though we can make it a warning of course.hvr commentedon Jan 28, 2016
@23Skidoo fwiw, I'm working on something like
ghc --allowed-extensions=TemplateHaskellQuotes,BinaryLiterals,LambdaCase, which would turn undeclaredother-extensionsinto compile warnings... won't helpcabal checkthough23Skidoo commentedon Jan 28, 2016
That's cool!
Blaisorblade commentedon Aug 30, 2016
Was this ticket opened? Where's a link? Reopening till that happens. Feel free to close again when the new ticket is created.
23Skidoo commentedon Aug 30, 2016
@Blaisorblade
There's #1562.