Skip to content
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

Build with -Werror -Wall #538

Open
facundominguez opened this issue Apr 7, 2022 · 6 comments
Open

Build with -Werror -Wall #538

facundominguez opened this issue Apr 7, 2022 · 6 comments
Assignees

Comments

@facundominguez
Copy link
Collaborator

facundominguez commented Apr 7, 2022

I've tripped a couple of times over unintended name captures. It would be for the better to enable -Werror -Wall when building all modules.

stack has the --pedantic flag to turn on these.

These flags are usually specified for development builds or in CI, but not when building liquid-fixpoint as a dependency (this would interfere with the user ability to install it).

liquid-fixpoint.cabal already has -Werror behind a devel flag. For builds with cabal-install this could be augmented to use -Wall as well.

@ranjitjhala
Copy link
Member

ranjitjhala commented Apr 7, 2022 via email

@philderbeast
Copy link
Contributor

philderbeast commented Apr 28, 2022

Dropping `GHC == 7.10.3" would allow us to use the newer warning syntax.

ghc-options: -W -fno-warn-missing-methods -fwarn-missing-signatures

In GHC < 8 the syntax for -W was -fwarn- (e.g. -fwarn-incomplete-patterns). This spelling is deprecated, but still accepted for backwards compatibility. Likewise, -Wno- used to be fno-warn- (e.g. -fno-warn-incomplete-patterns).
SOURCE: using warnings

@ranjitjhala
Copy link
Member

ranjitjhala commented Apr 28, 2022 via email

@philderbeast
Copy link
Contributor

I'm most of the way there with this one, can it be assigned to me please?

@philderbeast
Copy link
Contributor

philderbeast commented Jun 5, 2022

@facundominguez is this complete with #591?

Are we going to try for a stretch goal of having fewer {-# OPTIONS_GHC -Wno-name-shadowing #-}?

@facundominguez
Copy link
Collaborator Author

Are we going to try for a stretch goal of having fewer {-# OPTIONS_GHC -Wno-name-shadowing #-}?

This would be helpful to have eventually. I'd leave this issue open until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants