[GHC] #12099: ghc --show-options lists invalid flags

#12099: ghc --show-options lists invalid flags -------------------------------------+------------------------------------- Reporter: DanielG | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- While porting ghc-mod to GHC 8 I noticed that all `-fwarn` flags are missing from `flagsForCompletion` instead only `-fwarn-` and `-fno-warn-` appear. This also shows up in the front-end when running `ghc --show- options`. Looking at the code this turned out to be because the old `-fwarn` flags were marked as hidden using `hideFlag` and hidden flags are explicitly filtered out in `flagsForCompletion` but for some reason the `-fwarn-` and `-fno-warn-` prefixes still show up in the list. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12099 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12099: ghc --show-options lists invalid flags -------------------------------------+------------------------------------- Reporter: DanielG | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * keywords: => newcomer Comment:
all -fwarn flags are missing from flagsForCompletion
That is intended behavior I think. Those flags are deprecated, ad replaced by equivalent `-W` flags. `-fwarn-`, `-fno-warn` and `-W` probably show up in the output of `--show- options` because of this code from `compiler/main/DynFlags.hs`: {{{ ++ [ (NotDeprecated, unrecognisedWarning "W") , (NotDeprecated, unrecognisedWarning "fwarn-") , (NotDeprecated, unrecognisedWarning "fno-warn-") ] }}} For a newcomer. Adding a test is optional. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12099#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12099: ghc --show-options lists invalid flags -------------------------------------+------------------------------------- Reporter: DanielG | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2281 Wiki Page: | -------------------------------------+------------------------------------- Changes (by sgillespie): * differential: => Phab:D2281 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12099#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12099: ghc --show-options lists invalid flags
-------------------------------------+-------------------------------------
Reporter: DanielG | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2281
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12099: ghc --show-options lists invalid flags -------------------------------------+------------------------------------- Reporter: DanielG | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2281 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12099#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC