[GHC] #9230: Make -fwarn-tabs the default
GHC
ghc-devs at haskell.org
Wed Oct 1 00:06:41 UTC 2014
#9230: Make -fwarn-tabs the default
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: mlen
Type: feature | Status: new
request | Milestone: 7.10.1
Priority: normal | Version: 7.8.2
Component: Compiler | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Easy (less than 1
Unknown/Multiple | hour)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D255 |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
Replying to [comment:18 thoughtpolice]:
> In essence it just adds `Opt_WarnTabs` (AKA `-fwarn-tabs`) to
`standardWarnings` in `DynFlags`, which is the correct move. Next, it
disables `-fno-warn-tabs` when building the libraries by modifying `mk
/validate-settings.mk` to include `-fno-warn-tabs`, so that everything can
validate correctly.
This may very well be the best thing for right now, but here's another
idea that would take more work but might pay off in the long run,
especially if other warnings are added to the defaults in the future.
Instead of ''actually'' running ghc with `-Werror`, make the validation
script watch for warnings. That is, replace an `Error` monad with a
`Writer` monad. Given appropriate options, validation could ''collect''
warnings instead of halting immediately.
This would allow us to automatically create lists of files for which
specific warnings should be tolerated. Obviously, these lists would need
to be maintained in order to prevent regressions, but this is easy:
Phabricator (or whatever) would collect a "warning diff" from each build
that passes validation, which could be used to update the lists. Ideally,
we'd also find a way to trim down the warning list generated by a
differential to just those files it changed, so as to get notice that
something else might need to be fixed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9230#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list