Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.d/5-internal/polysemy-plugin-unification
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Unified Polysemy.Plugin configuration by moving compiler plugin flags from
per-file OPTIONS_GHC pragmas to cabal file ghc-options sections for spar and
polysemy-wire-zoo packages.
5 changes: 3 additions & 2 deletions libs/dns-util/dns-util.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ library
ghc-options:
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-Wredundant-constraints -Wunused-packages
-Wredundant-constraints -Wunused-packages -fplugin=Polysemy.Plugin

build-depends:
base >=4.6 && <5.0
base >=4.6 && <5.0
, dns
, imports
, iproute
, polysemy
, polysemy-plugin
, random

default-language: GHC2021
Expand Down
3 changes: 2 additions & 1 deletion libs/polysemy-wire-zoo/polysemy-wire-zoo.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ library
ghc-options:
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-Wredundant-constraints -Wunused-packages
-Wredundant-constraints -Wunused-packages -fplugin=Polysemy.Plugin

build-depends:
aeson
Expand Down Expand Up @@ -171,6 +171,7 @@ test-suite spec
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path -j
-Wno-redundant-constraints -Werror -threaded -rtsopts
-with-rtsopts=-N -Wredundant-constraints -Wunused-packages
-fplugin=Polysemy.Plugin

if !flag(nix-dev-env)
build-tool-depends: hspec-discover:hspec-discover
Expand Down
1 change: 0 additions & 1 deletion libs/polysemy-wire-zoo/src/Wire/Sem/Now/IO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
--
-- You should have received a copy of the GNU Affero General Public License along
-- with this program. If not, see <https://www.gnu.org/licenses/>.
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE QuantifiedConstraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion libs/polysemy-wire-zoo/test/Test/IntersperseSpec.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE NumDecimals #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
3 changes: 2 additions & 1 deletion libs/types-common/types-common.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ library
ghc-options:
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-Wredundant-constraints -Wunused-packages
-Wredundant-constraints -Wunused-packages -fplugin=Polysemy.Plugin

ghc-prof-options: -fprof-auto-exported
build-depends:
Expand Down Expand Up @@ -125,6 +125,7 @@ library
, optparse-applicative >=0.10
, pem
, polysemy
, polysemy-plugin
, protobuf >=0.2
, QuickCheck >=2.9
, quickcheck-instances >=0.3.16
Expand Down
2 changes: 2 additions & 0 deletions libs/wire-api/wire-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ library
, openapi3
, pem >=0.2
, polysemy
, polysemy-plugin
, polysemy-wire-zoo
, profunctors
, proto-lens
Expand Down Expand Up @@ -384,6 +385,7 @@ library
, zauth

default-language: GHC2021
ghc-options: -fplugin=Polysemy.Plugin

test-suite wire-api-golden-tests
import: common-all
Expand Down
5 changes: 2 additions & 3 deletions libs/wire-subsystems/wire-subsystems.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ common common-all
ghc-options:
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-Wredundant-constraints
-Wredundant-constraints -fplugin=Polysemy.Plugin

default-extensions:
AllowAmbiguousTypes
Expand Down Expand Up @@ -197,7 +197,6 @@ common common-all

library
import: common-all
ghc-options: -fplugin=Polysemy.Plugin

-- cabal-fmt: expand src
exposed-modules:
Expand Down Expand Up @@ -474,7 +473,7 @@ test-suite wire-subsystems-tests
-- `ghcid --command 'cabal repl test:wire-subsystems-tests' --test='main'`.
hs-source-dirs: test/unit
main-is: ../Main.hs
ghc-options: -fplugin=Polysemy.Plugin -Wno-x-partial -threaded
ghc-options: -Wno-x-partial -threaded

-- cabal-fmt: expand test/unit
other-modules:
Expand Down
3 changes: 2 additions & 1 deletion libs/zauth/zauth.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,14 @@ test-suite zauth-unit
ghc-options:
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-Wredundant-constraints -Wunused-packages
-Wredundant-constraints -Wunused-packages -fplugin=Polysemy.Plugin

build-depends:
base
, bytestring-conversion
, imports
, polysemy
, polysemy-plugin
, polysemy-wire-zoo
, sodium-crypto-sign
, tasty >=0.9
Expand Down
2 changes: 2 additions & 0 deletions services/background-worker/background-worker.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ library
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-funbox-strict-fields -Wredundant-constraints -Wunused-packages
-fplugin=Polysemy.Plugin

build-depends:
aeson
Expand All @@ -51,6 +52,7 @@ library
, monad-control
, polysemy
, polysemy-conc
, polysemy-plugin
, polysemy-wire-zoo
, prometheus-client
, retry
Expand Down
9 changes: 6 additions & 3 deletions services/federator/federator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ library
ghc-options:
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-Wredundant-constraints -Wunused-packages
-Wredundant-constraints -Wunused-packages -fplugin=Polysemy.Plugin

build-depends:
aeson
Expand Down Expand Up @@ -138,6 +138,7 @@ library
, network
, pem
, polysemy
, polysemy-plugin
, polysemy-wire-zoo
, prometheus-client
, servant
Expand Down Expand Up @@ -275,7 +276,7 @@ executable federator-integration
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-Wredundant-constraints -Wunused-packages -threaded
-with-rtsopts=-N1 -Wno-x-partial
-with-rtsopts=-N1 -Wno-x-partial -fplugin=Polysemy.Plugin

build-depends:
aeson
Expand All @@ -302,6 +303,7 @@ executable federator-integration
, lens
, optparse-applicative
, polysemy
, polysemy-plugin
, QuickCheck
, random
, servant-client-core
Expand Down Expand Up @@ -377,7 +379,7 @@ test-suite federator-tests
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
-threaded -with-rtsopts=-N -Wredundant-constraints
-Wunused-packages -Wno-x-partial
-Wunused-packages -Wno-x-partial -fplugin=Polysemy.Plugin

build-depends:
aeson
Expand All @@ -400,6 +402,7 @@ test-suite federator-tests
, kan-extensions
, mtl
, polysemy
, polysemy-plugin
, polysemy-wire-zoo
, QuickCheck
, servant
Expand Down
6 changes: 3 additions & 3 deletions services/spar/spar.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ library
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path -j
-Wno-redundant-constraints -Werror -Wredundant-constraints
-Wunused-packages
-Wunused-packages -fplugin=Polysemy.Plugin

build-depends:
aeson
Expand Down Expand Up @@ -346,7 +346,7 @@ executable spar-integration
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path -j
-Wno-redundant-constraints -Werror -threaded -rtsopts
-with-rtsopts=-N -Wredundant-constraints -Wunused-packages
-Wno-x-partial
-Wno-x-partial -fplugin=Polysemy.Plugin

if !flag(nix-dev-env)
build-tool-depends: hspec-discover:hspec-discover
Expand Down Expand Up @@ -621,7 +621,7 @@ test-suite spec
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path -j
-Wno-redundant-constraints -Werror -threaded -rtsopts
-with-rtsopts=-N -Wredundant-constraints -Wunused-packages
-Wno-x-partial
-Wno-x-partial -fplugin=Polysemy.Plugin

if !flag(nix-dev-env)
build-tool-depends: hspec-discover:hspec-discover
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/App.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/CanonicalInterpreter.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Intra/BrigApp.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Scim/Auth.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Scim/Group.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE ImportQualifiedPost #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Scim/User.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/AReqIDStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/AssIDStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE QuantifiedConstraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE QuantifiedConstraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/SAML2/Library.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE QuantifiedConstraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE RecordWildCards #-}
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/test-integration/Util/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
1 change: 0 additions & 1 deletion services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE QuantifiedConstraints #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}

-- This file is part of the Wire Server implementation.
--
Expand Down
Loading