From a7a047c56098a08eb3d528e620a375cd22000ce5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:13:33 +0000 Subject: [PATCH 1/5] Initial plan From 2b2838545005fdb762de394860a26531d41630de Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:17:40 +0000 Subject: [PATCH 2/5] Unify Polysemy.Plugin configuration across codebase Co-authored-by: supersven <6235937+supersven@users.noreply.github.com> --- changelog.d/5-internal/polysemy-plugin-unification | 3 +++ libs/polysemy-wire-zoo/polysemy-wire-zoo.cabal | 3 ++- libs/polysemy-wire-zoo/src/Wire/Sem/Now/IO.hs | 1 - libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs | 1 - libs/polysemy-wire-zoo/test/Test/IntersperseSpec.hs | 1 - services/spar/spar.cabal | 6 +++--- services/spar/src/Spar/API.hs | 1 - services/spar/src/Spar/App.hs | 1 - services/spar/src/Spar/CanonicalInterpreter.hs | 1 - services/spar/src/Spar/Intra/BrigApp.hs | 1 - services/spar/src/Spar/Scim/Auth.hs | 1 - services/spar/src/Spar/Scim/Group.hs | 1 - services/spar/src/Spar/Scim/User.hs | 1 - services/spar/src/Spar/Sem/AReqIDStore/Mem.hs | 1 - services/spar/src/Spar/Sem/AssIDStore/Mem.hs | 1 - services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs | 1 - services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs | 1 - services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs | 1 - services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs | 1 - services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs | 1 - services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs | 1 - services/spar/src/Spar/Sem/SAML2/Library.hs | 1 - services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs | 1 - services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs | 1 - services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs | 1 - services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs | 1 - services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs | 1 - services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs | 1 - services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs | 1 - services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs | 1 - services/spar/test-integration/Util/Core.hs | 1 - services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs | 1 - services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs | 1 - services/spar/test/Test/Spar/Sem/NowSpec.hs | 1 - services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs | 1 - 35 files changed, 8 insertions(+), 36 deletions(-) create mode 100644 changelog.d/5-internal/polysemy-plugin-unification diff --git a/changelog.d/5-internal/polysemy-plugin-unification b/changelog.d/5-internal/polysemy-plugin-unification new file mode 100644 index 00000000000..f3dd9a94b25 --- /dev/null +++ b/changelog.d/5-internal/polysemy-plugin-unification @@ -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. \ No newline at end of file diff --git a/libs/polysemy-wire-zoo/polysemy-wire-zoo.cabal b/libs/polysemy-wire-zoo/polysemy-wire-zoo.cabal index cc89c97c7c1..00f933d3865 100644 --- a/libs/polysemy-wire-zoo/polysemy-wire-zoo.cabal +++ b/libs/polysemy-wire-zoo/polysemy-wire-zoo.cabal @@ -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 @@ -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 diff --git a/libs/polysemy-wire-zoo/src/Wire/Sem/Now/IO.hs b/libs/polysemy-wire-zoo/src/Wire/Sem/Now/IO.hs index af8ac8896d5..d5b0863c0a0 100644 --- a/libs/polysemy-wire-zoo/src/Wire/Sem/Now/IO.hs +++ b/libs/polysemy-wire-zoo/src/Wire/Sem/Now/IO.hs @@ -14,7 +14,6 @@ -- -- You should have received a copy of the GNU Affero General Public License along -- with this program. If not, see . -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs b/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs index 9e7b65ee139..29d66e609ab 100644 --- a/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs +++ b/libs/polysemy-wire-zoo/src/Wire/Sem/Now/Spec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE QuantifiedConstraints #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/libs/polysemy-wire-zoo/test/Test/IntersperseSpec.hs b/libs/polysemy-wire-zoo/test/Test/IntersperseSpec.hs index 19f786137de..efd3f0df52a 100644 --- a/libs/polysemy-wire-zoo/test/Test/IntersperseSpec.hs +++ b/libs/polysemy-wire-zoo/test/Test/IntersperseSpec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE NumDecimals #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/spar.cabal b/services/spar/spar.cabal index f4252f1c4f2..6db6cabad75 100644 --- a/services/spar/spar.cabal +++ b/services/spar/spar.cabal @@ -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 @@ -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 @@ -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 diff --git a/services/spar/src/Spar/API.hs b/services/spar/src/Spar/API.hs index f36f6f80660..674e796186f 100644 --- a/services/spar/src/Spar/API.hs +++ b/services/spar/src/Spar/API.hs @@ -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. -- diff --git a/services/spar/src/Spar/App.hs b/services/spar/src/Spar/App.hs index 0aca271e88a..a5d7d7d2c64 100644 --- a/services/spar/src/Spar/App.hs +++ b/services/spar/src/Spar/App.hs @@ -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. -- diff --git a/services/spar/src/Spar/CanonicalInterpreter.hs b/services/spar/src/Spar/CanonicalInterpreter.hs index 2627476844e..185004f18c8 100644 --- a/services/spar/src/Spar/CanonicalInterpreter.hs +++ b/services/spar/src/Spar/CanonicalInterpreter.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Intra/BrigApp.hs b/services/spar/src/Spar/Intra/BrigApp.hs index 08bc096ee87..cebc3464c8a 100644 --- a/services/spar/src/Spar/Intra/BrigApp.hs +++ b/services/spar/src/Spar/Intra/BrigApp.hs @@ -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. -- diff --git a/services/spar/src/Spar/Scim/Auth.hs b/services/spar/src/Spar/Scim/Auth.hs index 1f7b824ce10..61a3fae8c9b 100644 --- a/services/spar/src/Spar/Scim/Auth.hs +++ b/services/spar/src/Spar/Scim/Auth.hs @@ -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. -- diff --git a/services/spar/src/Spar/Scim/Group.hs b/services/spar/src/Spar/Scim/Group.hs index 3ace67bcf7a..ebfd0f87509 100644 --- a/services/spar/src/Spar/Scim/Group.hs +++ b/services/spar/src/Spar/Scim/Group.hs @@ -1,6 +1,5 @@ {-# LANGUAGE ImportQualifiedPost #-} {-# OPTIONS_GHC -Wno-orphans #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Scim/User.hs b/services/spar/src/Spar/Scim/User.hs index aaf4d56d418..d5eb5f950b6 100644 --- a/services/spar/src/Spar/Scim/User.hs +++ b/services/spar/src/Spar/Scim/User.hs @@ -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. -- diff --git a/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs b/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs index 84342987cab..02ab37fec83 100644 --- a/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs +++ b/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/AssIDStore/Mem.hs b/services/spar/src/Spar/Sem/AssIDStore/Mem.hs index 01a7163083c..5a58a75644d 100644 --- a/services/spar/src/Spar/Sem/AssIDStore/Mem.hs +++ b/services/spar/src/Spar/Sem/AssIDStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs b/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs index 680c8c0ec7c..a0fd4be5718 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode/Cassandra.hs @@ -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. -- diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs b/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs index c684eaa1a66..be62b43099f 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs b/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs index 3f83e9b3459..1910c683436 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode/Spec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE QuantifiedConstraints #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs b/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs index a7f0ff7c4fb..0acc1524aca 100644 --- a/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs +++ b/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs index ace943c0a3e..6d37f654674 100644 --- a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs +++ b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs index 1a8805e8afe..23c7f4f6bc2 100644 --- a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs +++ b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Spec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE QuantifiedConstraints #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/SAML2/Library.hs b/services/spar/src/Spar/Sem/SAML2/Library.hs index 7ca06008ffb..10eaf1746eb 100644 --- a/services/spar/src/Spar/Sem/SAML2/Library.hs +++ b/services/spar/src/Spar/Sem/SAML2/Library.hs @@ -1,6 +1,5 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs b/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs index 3436a83acd6..1187cc0caae 100644 --- a/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/SAMLUserStore/Cassandra.hs @@ -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. -- diff --git a/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs b/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs index a123f099de7..6fd2e6921ee 100644 --- a/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs +++ b/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs b/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs index 5ab14ccd4af..7972900f157 100644 --- a/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs b/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs index eab1ba7d47f..a679d83a593 100644 --- a/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs +++ b/services/spar/src/Spar/Sem/ScimExternalIdStore/Spec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE QuantifiedConstraints #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs b/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs index d708b2f011e..3cc2744e9a8 100644 --- a/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs +++ b/services/spar/src/Spar/Sem/ScimTokenStore/Cassandra.hs @@ -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. -- diff --git a/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs b/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs index 48b869fb0f0..ce58951502a 100644 --- a/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs b/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs index fa5f027d8a4..a818ca3e971 100644 --- a/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs b/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs index 12ecf2368ad..a76c824f0e1 100644 --- a/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs +++ b/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/test-integration/Util/Core.hs b/services/spar/test-integration/Util/Core.hs index f6c8e25d73c..4062698eb23 100644 --- a/services/spar/test-integration/Util/Core.hs +++ b/services/spar/test-integration/Util/Core.hs @@ -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. -- diff --git a/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs b/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs index 32e703901f8..8236127b93d 100644 --- a/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs +++ b/services/spar/test/Test/Spar/Sem/DefaultSsoCodeSpec.hs @@ -1,6 +1,5 @@ {-# LANGUAGE QuantifiedConstraints #-} {-# OPTIONS_GHC -Wno-orphans #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs b/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs index 36abf4ea039..1dfc2cbf924 100644 --- a/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs +++ b/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/test/Test/Spar/Sem/NowSpec.hs b/services/spar/test/Test/Spar/Sem/NowSpec.hs index 57de87070d4..5d401d321eb 100644 --- a/services/spar/test/Test/Spar/Sem/NowSpec.hs +++ b/services/spar/test/Test/Spar/Sem/NowSpec.hs @@ -1,6 +1,5 @@ {-# LANGUAGE QuantifiedConstraints #-} {-# OPTIONS_GHC -Wno-orphans #-} -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- diff --git a/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs b/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs index ec978251ea2..295756c2be7 100644 --- a/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs +++ b/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-} -- This file is part of the Wire Server implementation. -- From b699c2bd75badac1c0484882104844d4c06a5109 Mon Sep 17 00:00:00 2001 From: Sven Tennie Date: Mon, 26 Jan 2026 11:10:44 +0100 Subject: [PATCH 3/5] Newline EOF --- changelog.d/5-internal/polysemy-plugin-unification | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/5-internal/polysemy-plugin-unification b/changelog.d/5-internal/polysemy-plugin-unification index f3dd9a94b25..5dc4159cdd4 100644 --- a/changelog.d/5-internal/polysemy-plugin-unification +++ b/changelog.d/5-internal/polysemy-plugin-unification @@ -1,3 +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. \ No newline at end of file +polysemy-wire-zoo packages. From 0fab69720fd1601e151e52e23b35848d11996765 Mon Sep 17 00:00:00 2001 From: Sven Tennie Date: Mon, 26 Jan 2026 14:30:23 +0100 Subject: [PATCH 4/5] Add and use Polysemy.Plugin where ever Polysemy is used --- libs/dns-util/dns-util.cabal | 5 +++-- libs/types-common/types-common.cabal | 3 ++- libs/wire-api/wire-api.cabal | 2 ++ libs/wire-subsystems/wire-subsystems.cabal | 5 ++--- libs/zauth/zauth.cabal | 3 ++- services/background-worker/background-worker.cabal | 2 ++ services/federator/federator.cabal | 9 ++++++--- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/libs/dns-util/dns-util.cabal b/libs/dns-util/dns-util.cabal index 7b120e36e1c..4eaa76af739 100644 --- a/libs/dns-util/dns-util.cabal +++ b/libs/dns-util/dns-util.cabal @@ -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 diff --git a/libs/types-common/types-common.cabal b/libs/types-common/types-common.cabal index 8832be94802..b9eec4460e8 100644 --- a/libs/types-common/types-common.cabal +++ b/libs/types-common/types-common.cabal @@ -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: @@ -125,6 +125,7 @@ library , optparse-applicative >=0.10 , pem , polysemy + , polysemy-plugin , protobuf >=0.2 , QuickCheck >=2.9 , quickcheck-instances >=0.3.16 diff --git a/libs/wire-api/wire-api.cabal b/libs/wire-api/wire-api.cabal index cc4ec01bb57..56fd2434481 100644 --- a/libs/wire-api/wire-api.cabal +++ b/libs/wire-api/wire-api.cabal @@ -336,6 +336,7 @@ library , openapi3 , pem >=0.2 , polysemy + , polysemy-plugin , polysemy-wire-zoo , profunctors , proto-lens @@ -384,6 +385,7 @@ library , zauth default-language: GHC2021 + ghc-options: -fplugin=Polysemy.Plugin test-suite wire-api-golden-tests import: common-all diff --git a/libs/wire-subsystems/wire-subsystems.cabal b/libs/wire-subsystems/wire-subsystems.cabal index 5dc5e19c770..9bd2e62cbaa 100644 --- a/libs/wire-subsystems/wire-subsystems.cabal +++ b/libs/wire-subsystems/wire-subsystems.cabal @@ -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 @@ -197,7 +197,6 @@ common common-all library import: common-all - ghc-options: -fplugin=Polysemy.Plugin -- cabal-fmt: expand src exposed-modules: @@ -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: diff --git a/libs/zauth/zauth.cabal b/libs/zauth/zauth.cabal index 9dd1bd0f708..fbd1d6ecdd4 100644 --- a/libs/zauth/zauth.cabal +++ b/libs/zauth/zauth.cabal @@ -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 diff --git a/services/background-worker/background-worker.cabal b/services/background-worker/background-worker.cabal index 595e3d01eac..b1a7f9cbc46 100644 --- a/services/background-worker/background-worker.cabal +++ b/services/background-worker/background-worker.cabal @@ -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 @@ -51,6 +52,7 @@ library , monad-control , polysemy , polysemy-conc + , polysemy-plugin , polysemy-wire-zoo , prometheus-client , retry diff --git a/services/federator/federator.cabal b/services/federator/federator.cabal index 30da9928c5c..e90a63fd73b 100644 --- a/services/federator/federator.cabal +++ b/services/federator/federator.cabal @@ -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 @@ -138,6 +138,7 @@ library , network , pem , polysemy + , polysemy-plugin , polysemy-wire-zoo , prometheus-client , servant @@ -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 @@ -302,6 +303,7 @@ executable federator-integration , lens , optparse-applicative , polysemy + , polysemy-plugin , QuickCheck , random , servant-client-core @@ -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 @@ -400,6 +402,7 @@ test-suite federator-tests , kan-extensions , mtl , polysemy + , polysemy-plugin , polysemy-wire-zoo , QuickCheck , servant From ac2137d19548ca21a4bf5a20fe93886c0d10f5b6 Mon Sep 17 00:00:00 2001 From: Sven Tennie Date: Thu, 29 Jan 2026 10:30:31 +0100 Subject: [PATCH 5/5] Fix formatting --- services/spar/src/Spar/CanonicalInterpreter.hs | 1 - services/spar/src/Spar/Sem/AReqIDStore/Mem.hs | 1 - services/spar/src/Spar/Sem/AssIDStore/Mem.hs | 1 - services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs | 1 - services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs | 1 - services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs | 1 - services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs | 1 - services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs | 1 - services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs | 1 - services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs | 1 - services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs | 1 - services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs | 1 - services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs | 1 - 13 files changed, 13 deletions(-) diff --git a/services/spar/src/Spar/CanonicalInterpreter.hs b/services/spar/src/Spar/CanonicalInterpreter.hs index 185004f18c8..fe1abc340fd 100644 --- a/services/spar/src/Spar/CanonicalInterpreter.hs +++ b/services/spar/src/Spar/CanonicalInterpreter.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs b/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs index 02ab37fec83..d976427fa0c 100644 --- a/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs +++ b/services/spar/src/Spar/Sem/AReqIDStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/AssIDStore/Mem.hs b/services/spar/src/Spar/Sem/AssIDStore/Mem.hs index 5a58a75644d..84b23fcb7c4 100644 --- a/services/spar/src/Spar/Sem/AssIDStore/Mem.hs +++ b/services/spar/src/Spar/Sem/AssIDStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs b/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs index be62b43099f..36af6a6ac9b 100644 --- a/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs +++ b/services/spar/src/Spar/Sem/DefaultSsoCode/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs b/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs index 0acc1524aca..428d08b455f 100644 --- a/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs +++ b/services/spar/src/Spar/Sem/IdPConfigStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs index 6d37f654674..79c51075e37 100644 --- a/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs +++ b/services/spar/src/Spar/Sem/IdPRawMetadataStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs b/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs index 6fd2e6921ee..3264adc148e 100644 --- a/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs +++ b/services/spar/src/Spar/Sem/SAMLUserStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs b/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs index 7972900f157..fea9ac549eb 100644 --- a/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimExternalIdStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs b/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs index ce58951502a..c4800dd3cfa 100644 --- a/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimTokenStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs b/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs index a818ca3e971..a115c498097 100644 --- a/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs +++ b/services/spar/src/Spar/Sem/ScimUserTimesStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs b/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs index a76c824f0e1..580b8146d36 100644 --- a/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs +++ b/services/spar/src/Spar/Sem/VerdictFormatStore/Mem.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs b/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs index 1dfc2cbf924..da1af567a94 100644 --- a/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs +++ b/services/spar/test/Test/Spar/Sem/IdPRawMetadataStoreSpec.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH diff --git a/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs b/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs index 295756c2be7..8603196b5b4 100644 --- a/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs +++ b/services/spar/test/Test/Spar/Sem/ScimExternalIdStoreSpec.hs @@ -1,4 +1,3 @@ - -- This file is part of the Wire Server implementation. -- -- Copyright (C) 2022 Wire Swiss GmbH