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

Building saw-remote-api produces excessive warnings due to -Weverything #1083

Closed
RyanGlScott opened this issue Feb 19, 2021 · 3 comments · Fixed by #1087
Closed

Building saw-remote-api produces excessive warnings due to -Weverything #1083

RyanGlScott opened this issue Feb 19, 2021 · 3 comments · Fixed by #1087
Labels
subsystem: saw-remote-api Issues related to the SAW server and its RPC bindings

Comments

@RyanGlScott
Copy link
Contributor

If I build saw-remote-api, my terminal is filled to the brim with GHC warnings:

[ 1 of 21] Compiling SAWServer.Data.JVMType ( src/SAWServer/Data/JVMType.hs, interpreted )

src/SAWServer/Data/JVMType.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.Data.JVMType is missing Safe Haskell mode
  |
1 | {-# LANGUAGE LambdaCase #-}
  | ^

src/SAWServer/Data/JVMType.hs:7:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
7 | import qualified Data.Aeson as JSON
  |        ^^^^^^^^^
[ 2 of 21] Compiling SAWServer.Data.LLVMType ( src/SAWServer/Data/LLVMType.hs, interpreted )

src/SAWServer/Data/LLVMType.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.Data.LLVMType is missing Safe Haskell mode
  |
1 | {-# LANGUAGE LambdaCase #-}
  | ^

src/SAWServer/Data/LLVMType.hs:7:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
7 | import qualified Data.Aeson as JSON
  |        ^^^^^^^^^

src/SAWServer/Data/LLVMType.hs:9:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
9 | import qualified Data.Text as T
  |        ^^^^^^^^^
[ 3 of 21] Compiling SAWServer.Exceptions ( src/SAWServer/Exceptions.hs, interpreted )

src/SAWServer/Exceptions.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.Exceptions is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

src/SAWServer/Exceptions.hs:28:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
28 | import qualified Data.Text as T
   |        ^^^^^^^^^
[ 4 of 21] Compiling SAWServer        ( src/SAWServer.hs, interpreted )

src/SAWServer.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer is missing Safe Haskell mode
  |
1 | {-# LANGUAGE CPP #-}
  | ^

src/SAWServer.hs:20:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
20 | import qualified Data.Map.Strict as M
   |        ^^^^^^^^^

src/SAWServer.hs:24:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
24 | import qualified Data.Text as T
   |        ^^^^^^^^^

src/SAWServer.hs:25:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
25 | import qualified Crypto.Hash as Hash
   |        ^^^^^^^^^

src/SAWServer.hs:26:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
26 | import qualified Crypto.Hash.Conduit as Hash
   |        ^^^^^^^^^

src/SAWServer.hs:30:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
30 | import qualified Cryptol.Parser.AST as P
   |        ^^^^^^^^^

src/SAWServer.hs:31:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
31 | import qualified Cryptol.TypeCheck.AST as Cryptol (Schema)
   |        ^^^^^^^^^

src/SAWServer.hs:33:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
33 | import qualified Data.ABC.GIA as GIA
   |        ^^^^^^^^^

src/SAWServer.hs:37:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
37 | import qualified Lang.Crucible.FunctionHandle as Crucible (HandleAllocator, newHandleAllocator)
   |        ^^^^^^^^^

src/SAWServer.hs:38:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
38 | import qualified Lang.Crucible.JVM as CJ
   |        ^^^^^^^^^

src/SAWServer.hs:39:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
39 | import qualified Text.LLVM.AST as LLVM
   |        ^^^^^^^^^

src/SAWServer.hs:40:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
40 | import qualified Lang.JVM.Codebase as JSS
   |        ^^^^^^^^^

src/SAWServer.hs:41:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
41 | import qualified Verifier.SAW.CryptolEnv as CryptolEnv
   |        ^^^^^^^^^

src/SAWServer.hs:48:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
48 | import qualified SAWScript.Crucible.Common.MethodSpec as CMS (CrucibleMethodSpecIR)
   |        ^^^^^^^^^

src/SAWServer.hs:49:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
49 | import qualified SAWScript.Crucible.LLVM.MethodSpecIR as CMS (SomeLLVM, LLVMModule)
   |        ^^^^^^^^^

src/SAWServer.hs:55:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
55 | import qualified Verifier.SAW.Cryptol.Prelude as CryptolSAW
   |        ^^^^^^^^^

src/SAWServer.hs:58:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
58 | import qualified Cryptol.Utils.Ident as Cryptol
   |        ^^^^^^^^^

src/SAWServer.hs:61:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
61 | import qualified CryptolServer (validateServerState, ServerState(..))
   |        ^^^^^^^^^
[ 5 of 21] Compiling SAWServer.Data.SetupValue ( src/SAWServer/Data/SetupValue.hs, interpreted )

src/SAWServer/Data/SetupValue.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.Data.SetupValue is missing Safe Haskell mode
  |
1 | {-# LANGUAGE GADTs #-}
  | ^
[ 6 of 21] Compiling SAWServer.Data.Contract ( src/SAWServer/Data/Contract.hs, interpreted )

src/SAWServer/Data/Contract.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.Data.Contract is missing Safe Haskell mode
  |
1 | {-# LANGUAGE DeriveFoldable #-}
  | ^
[ 7 of 21] Compiling SAWServer.CryptolExpression ( src/SAWServer/CryptolExpression.hs, interpreted )

src/SAWServer/CryptolExpression.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.CryptolExpression is missing Safe Haskell mode
  |
1 | {-# LANGUAGE ImplicitParams #-}
  | ^

src/SAWServer/CryptolExpression.hs:13:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
13 | import qualified Data.ByteString as B
   |        ^^^^^^^^^

src/SAWServer/CryptolExpression.hs:14:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
14 | import qualified Data.HashMap.Strict as HM
   |        ^^^^^^^^^

src/SAWServer/CryptolExpression.hs:15:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
15 | import qualified Data.Map as Map
   |        ^^^^^^^^^

src/SAWServer/CryptolExpression.hs:18:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
18 | import qualified Data.ByteString.Base64 as Base64
   |        ^^^^^^^^^

src/SAWServer/CryptolExpression.hs:20:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
20 | import qualified Data.Text as T
   |        ^^^^^^^^^

src/SAWServer/CryptolExpression.hs:30:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
30 | import qualified Cryptol.ModuleSystem.Renamer as MR
   |        ^^^^^^^^^

src/SAWServer/CryptolExpression.hs:32:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
32 | import qualified Cryptol.Parser as CP
   |        ^^^^^^^^^
[ 8 of 21] Compiling SAWServer.NoParams ( src/SAWServer/NoParams.hs, interpreted )

src/SAWServer/NoParams.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.NoParams is missing Safe Haskell mode
  |
1 | module SAWServer.NoParams (NoParams(..)) where
  | ^

src/SAWServer/NoParams.hs:4:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
4 | import qualified Argo.Doc as Doc
  |        ^^^^^^^^^
[ 9 of 21] Compiling SAWServer.OK     ( src/SAWServer/OK.hs, interpreted )

src/SAWServer/OK.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.OK is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^
[10 of 21] Compiling SAWServer.CryptolSetup ( src/SAWServer/CryptolSetup.hs, interpreted )

src/SAWServer/CryptolSetup.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.CryptolSetup is missing Safe Haskell mode
  |
1 | {-# LANGUAGE ImplicitParams #-}
  | ^

src/SAWServer/CryptolSetup.hs:16:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
16 | import qualified Data.Text as T
   |        ^^^^^^^^^

src/SAWServer/CryptolSetup.hs:18:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
18 | import qualified Cryptol.Parser.AST as P
   |        ^^^^^^^^^

src/SAWServer/CryptolSetup.hs:21:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
21 | import qualified Verifier.SAW.CryptolEnv as CEnv
   |        ^^^^^^^^^

src/SAWServer/CryptolSetup.hs:24:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
24 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^
[11 of 21] Compiling SAWServer.SaveTerm ( src/SAWServer/SaveTerm.hs, interpreted )

src/SAWServer/SaveTerm.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.SaveTerm is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

src/SAWServer/SaveTerm.hs:10:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
10 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^
[12 of 21] Compiling SAWServer.SetOption ( src/SAWServer/SetOption.hs, interpreted )

src/SAWServer/SetOption.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.SetOption is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

src/SAWServer/SetOption.hs:16:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
16 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^
[13 of 21] Compiling SAWServer.Term   ( src/SAWServer/Term.hs, interpreted )

src/SAWServer/Term.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.Term is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

src/SAWServer/Term.hs:6:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
6 | import qualified Data.Text as T
  |        ^^^^^^^^^

src/SAWServer/Term.hs:7:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
7 | import qualified Data.Vector as V
  |        ^^^^^^^^^
[14 of 21] Compiling SAWServer.TopLevel ( src/SAWServer/TopLevel.hs, interpreted )

src/SAWServer/TopLevel.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.TopLevel is missing Safe Haskell mode
  |
1 | {-# LANGUAGE LambdaCase #-}
  | ^
[15 of 21] Compiling SAWServer.ProofScript ( src/SAWServer/ProofScript.hs, interpreted )

src/SAWServer/ProofScript.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.ProofScript is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

src/SAWServer/ProofScript.hs:18:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
18 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^

src/SAWServer/ProofScript.hs:19:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
19 | import qualified SAWScript.Builtins as SB
   |        ^^^^^^^^^

src/SAWServer/ProofScript.hs:20:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
20 | import qualified SAWScript.Value as SV
   |        ^^^^^^^^^
[16 of 21] Compiling SAWServer.JVMCrucibleSetup ( src/SAWServer/JVMCrucibleSetup.hs, interpreted )

src/SAWServer/JVMCrucibleSetup.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.JVMCrucibleSetup is missing Safe Haskell mode
  |
1 | {-# LANGUAGE DeriveFoldable #-}
  | ^

src/SAWServer/JVMCrucibleSetup.hs:23:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
23 | import qualified Data.Map as Map
   |        ^^^^^^^^^

src/SAWServer/JVMCrucibleSetup.hs:25:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
25 | import qualified Data.Text as T
   |        ^^^^^^^^^

src/SAWServer/JVMCrucibleSetup.hs:27:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
27 | import qualified Cryptol.Parser.AST as P
   |        ^^^^^^^^^

src/SAWServer/JVMCrucibleSetup.hs:29:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
29 | import qualified Lang.Crucible.JVM as CJ
   |        ^^^^^^^^^

src/SAWServer/JVMCrucibleSetup.hs:35:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
35 | import qualified Verifier.SAW.CryptolEnv as CEnv
   |        ^^^^^^^^^

src/SAWServer/JVMCrucibleSetup.hs:40:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
40 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^
[17 of 21] Compiling SAWServer.TrackFile ( src/SAWServer/TrackFile.hs, interpreted )

src/SAWServer/TrackFile.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.TrackFile is missing Safe Haskell mode
  |
1 | module SAWServer.TrackFile (trackFile, forgetFile) where
  | ^

src/SAWServer/TrackFile.hs:4:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
4 | import qualified Data.Map as M
  |        ^^^^^^^^^

src/SAWServer/TrackFile.hs:5:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
  |
5 | import qualified Crypto.Hash.Conduit as Hash
  |        ^^^^^^^^^
[18 of 21] Compiling SAWServer.LLVMCrucibleSetup ( src/SAWServer/LLVMCrucibleSetup.hs, interpreted )

src/SAWServer/LLVMCrucibleSetup.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.LLVMCrucibleSetup is missing Safe Haskell mode
  |
1 | {-# LANGUAGE DeriveFoldable #-}
  | ^

src/SAWServer/LLVMCrucibleSetup.hs:28:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
28 | import qualified Data.Map as Map
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:30:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
30 | import qualified Data.Text as T
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:32:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
32 | import qualified Cryptol.Parser.AST as P
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:34:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
34 | import qualified Text.LLVM.AST as LLVM
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:35:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
35 | import qualified Data.LLVM.BitCode as LLVM
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:36:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
36 | import qualified SAWScript.Crucible.Common.MethodSpec as MS (SetupValue(..))
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:48:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
48 | import qualified SAWScript.Crucible.LLVM.MethodSpecIR as CMS
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:50:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
50 | import qualified Verifier.SAW.CryptolEnv as CEnv
   |        ^^^^^^^^^

src/SAWServer/LLVMCrucibleSetup.hs:55:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
55 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^
[19 of 21] Compiling SAWServer.VerifyCommon ( src/SAWServer/VerifyCommon.hs, interpreted )

src/SAWServer/VerifyCommon.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.VerifyCommon is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

src/SAWServer/VerifyCommon.hs:10:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
10 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^
[20 of 21] Compiling SAWServer.LLVMVerify ( src/SAWServer/LLVMVerify.hs, interpreted )

src/SAWServer/LLVMVerify.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.LLVMVerify is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

src/SAWServer/LLVMVerify.hs:20:8: warning: [-Wprepositive-qualified-module]
    Found ‘qualified’ in prepositive position
    Suggested fix: place  ‘qualified’ after the module name instead.
   |
20 | import qualified Argo.Doc as Doc
   |        ^^^^^^^^^
[21 of 21] Compiling SAWServer.JVMVerify ( src/SAWServer/JVMVerify.hs, interpreted )

src/SAWServer/JVMVerify.hs:1:1: warning: [-Wmissing-safe-haskell-mode]
    SAWServer.JVMVerify is missing Safe Haskell mode
  |
1 | {-# LANGUAGE OverloadedStrings #-}
  | ^

Most of these are more of stylistic opinions rather than actual issues in the code itself. The fact that GHC is even emitting these warnings in the first place is due to saw-remote-api.cabal enabling -Weverything. -Weverything turns on every single one of GHC's warnings, which I think is a less appropriate choice than -Wall, which enables a more reasonable subset of GHC's warnings.

I propose that we remove saw-remote-api's use of -Weverything in favor of -Wall. Any objections?

@RyanGlScott RyanGlScott added the subsystem: saw-remote-api Issues related to the SAW server and its RPC bindings label Feb 19, 2021
@brianhuffman
Copy link
Contributor

It warns about writing qualified before the module name instead of after? This is clearly ridiculous. If it's actually impossible to make the code compile without warnings in all our supported compiler versions, then we need to turn those warnings off.

@RyanGlScott
Copy link
Contributor Author

Indeed, it's not possible to make the code -Wprepositive-qualified-module–clean in a way that compiles on all our supported versions of GHC (without CPP, anyway). One alternative to removing -Weverything would be to just remove -Wprepositive-qualified-module, which would squash many of the warnings above. But there's no guarantee that a future version of GHC won't introduce a new esoteric warning into -Weverything which is difficult to deal with in a backwards-compatible way. In fact, I think this situation is quite likely to happen. I think we should save ourselves from experiencing pain down the line by swapping out -Weverything for -Wall.

@atomb
Copy link
Contributor

atomb commented Feb 19, 2021

The current .cabal file has a bunch of -Wno-* flags to turn off some of the more unhelpful warnings, and I have a branch on which I turned off a few more. In the end, though, perhaps accumulating a big list of those isn't the right way to go. It seems like -Weverything includes some truly weird warnings that it doesn't make sense to follow. So I'm quite happy to move to -Wall and, if it turns out we want to be stricter, turn on additional warnings instead of turning them off.

RyanGlScott added a commit that referenced this issue Feb 22, 2021
`-Weverything` enables absolutely every single warning that GHC has in its
arsenal, which is usually too much. As discussed in #1083, this replaces
`-Weverything` in favor of `-Wall`, which enables a more reasonable subset of
warnings. This means that we don't have to explicitly disable as many warnings
(which would otherwise be enabled by `-Weverything`) as before.

Fixes #1083.
@mergify mergify bot closed this as completed in #1087 Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem: saw-remote-api Issues related to the SAW server and its RPC bindings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants