-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Satisfy -Werror=unused-top-binds
#9488
Conversation
Could you elaborate? Does it break CI or your local tests? Only with some GHCs? |
The unused top binds are dead code. |
Oh, I see! If you do the change cited in the description, then compilation would error and your PR fixes the error by removing dead code. Did I get it right? And the dead code is worrying, because it suggests some old changes have been misapplied or corrupted, right? Should we maybe not remove the dead code until we investigate and either plug it back in or decide it's unneeded? |
6455b79
to
ad2046f
Compare
ad2046f
to
e693aaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took me quite a while to understand the motivation just by reading the description, unfortunately.
For the context: we already use -Werror
for the main packages in this repo -- see cabal.project.validate
. This patch explores a partial -Werror
for a test package. So, the natural question is: why actually not go further and add that partial -Werror
for the test package in cabal.project.validate
?..
@ulysses4ever at the time I didn't want to delve into the various projects and their purpose so instead I showed how I found there was dead code.
The |
Label |
Thanks for suggesting this @ulysses4ever. I reviewed the projects with #9565 but have not yet got around to changing the warning levels (except using |
Satisfy the build with this (uncommited) change:
We can pick up the deleted top binds of
Cabal-tests/tests/UnitTests/Distribution/Simple/Program/GHC.hs
in #9435.