[GHC] #11000: Implement `-Wcompat`
#11000: Implement `-Wcompat` -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature | Status: new request | Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: Design/Warnings -------------------------------------+------------------------------------- Currently we have only the following generic warning "levels": {{{ -W enable normal warnings -w disable all warnings -Wall enable almost all warnings (details in ) }}} It would be useful to be able to refer collectively to all currently implemented forward-compatibility warnings (e.g. about upcoming changes in `base`, like `-fwarn-amp`) via a symbolic `-Wcompat` flag. This way, users have more flexibility in opt-in or out of such warnings. So e.g. the following settings are possible in `.cabal` files: `ghc-options: -Wall` :: enable "almost all warnings" as before. Some compat warnings maybe part of `-Wall`, some won't (yet). `ghc-options: -Wall -Wcompat` :: enable "almost all warnings" as well as all implemented warnings. E.g. if GHC 8.0 implements `-fwarn-mfp-compat` but doesn't include it in `-Wall`, this allows users to get notified asap about warnings to opt into that `ghc-options: -Wall -Wno-compat` :: This enables `-Wall` **minus** any future-compat warnings. This is for users who want to be warned at all about any future compat warnings. `ghc-options: -Wcompat` :: Of course, `-W(no-)compat` can be used also w/o `-Wall`, and then is equivalent to turning on/off the respective individual `-fwarn-*-compat` flags. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11000> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11000: Implement `-Wcompat` -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Description changed by hvr: Old description:
Currently we have only the following generic warning "levels":
{{{ -W enable normal warnings -w disable all warnings -Wall enable almost all warnings (details in ) }}}
It would be useful to be able to refer collectively to all currently implemented forward-compatibility warnings (e.g. about upcoming changes in `base`, like `-fwarn-amp`) via a symbolic `-Wcompat` flag.
This way, users have more flexibility in opt-in or out of such warnings. So e.g. the following settings are possible in `.cabal` files:
`ghc-options: -Wall` :: enable "almost all warnings" as before. Some compat warnings maybe part of `-Wall`, some won't (yet). `ghc-options: -Wall -Wcompat` :: enable "almost all warnings" as well as all implemented warnings. E.g. if GHC 8.0 implements `-fwarn-mfp- compat` but doesn't include it in `-Wall`, this allows users to get notified asap about warnings to opt into that `ghc-options: -Wall -Wno-compat` :: This enables `-Wall` **minus** any future-compat warnings. This is for users who want to be warned at all about any future compat warnings. `ghc-options: -Wcompat` :: Of course, `-W(no-)compat` can be used also w/o `-Wall`, and then is equivalent to turning on/off the respective individual `-fwarn-*-compat` flags.
New description: Currently we have only the following generic warning "levels": {{{ -W enable normal warnings -w disable all warnings -Wall enable almost all warnings (details in ) }}} It would be useful to be able to refer collectively to all currently implemented forward-compatibility warnings (e.g. about upcoming changes in `base`, like `-fwarn-amp`) via a symbolic `-Wcompat` flag. This way, users have more flexibility in opt-in or out of such warnings. So e.g. the following settings are possible in `.cabal` files: `ghc-options: -Wall` :: enable "almost all warnings" as before. Some compatibility warnings may be part of `-Wall`, some won't (yet). `ghc-options: -Wall -Wcompat` :: enable "almost all warnings" as well as all currently implemented warnings. E.g. if GHC 8.0 implements `-fwarn- mfp-compat` but doesn't include it in `-Wall`, this gives users a way to opt in to get notified early about upcoming changes. `ghc-options: -Wall -Wno-compat` :: This enables `-Wall` **minus** any future-compat warnings. This is for users who want to be warned at all about any future compat warnings. `ghc-options: -Wcompat` :: Of course, `-W(no-)compat` can be used also w/o `-Wall`, and then is equivalent to turning on/off the respective individual `-fwarn-*-compat` flags. `ghc-options: -Wall -Wcompat -Wno-mfp-compat` :: This would allow to acknowledge the MFP compat warnings, while enabling other future GHC compat warnings. -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11000#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11000: Implement `-Wcompat` -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1495 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Changes (by hvr): * owner: => quchen * differential: => Phab:D1495 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11000#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11000: Implement `-Wcompat` -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: patch Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1495 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Changes (by hvr): * status: new => patch -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11000#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11000: Implement `-Wcompat` -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: patch Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1495 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"6d147939628c8503d682ffbe2985ca435d7a7c1d/ghc" 6d14793/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="6d147939628c8503d682ffbe2985ca435d7a7c1d" Add -Wcompat warning flag group Reviewers: hvr, austin, thomie, bgamari Reviewed By: hvr, austin, thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1495 GHC Trac Issues: #11000 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11000#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11000: Implement `-Wcompat` -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1495 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: This has been merged. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11000#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC