Skip to content

Commit 41e46ba

Browse files
authored
[WPA-16535] Remove weed from saml2-web-sso (#4520)
* rm weed (1) * rm weed (2) * rm weed (3) * rm weed (4) * rm weed (5) * rm weed (6) * sort weeder.toml alphabetically. * weeder.toml: remove duplicate entries. * Fixup * found more... * Remove copies of tinylog's Level type. * re-add non-weed (maybe weeder caught it because of outdated .hie files in spar?) * make sanitize-pr
1 parent 3fbe51d commit 41e46ba

File tree

35 files changed

+76
-543
lines changed

35 files changed

+76
-543
lines changed

libs/polysemy-wire-zoo/polysemy-wire-zoo.cabal

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ library
2222
Wire.Sem.FromUTC
2323
Wire.Sem.Jwk
2424
Wire.Sem.Logger
25-
Wire.Sem.Logger.Level
2625
Wire.Sem.Logger.TinyLog
2726
Wire.Sem.Metrics
2827
Wire.Sem.Metrics.IO

libs/polysemy-wire-zoo/src/Wire/Sem/Logger.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
module Wire.Sem.Logger
2121
( module Wire.Sem.Logger,
22-
module Wire.Sem.Logger.Level,
22+
Level (..),
2323
)
2424
where
2525

2626
import Imports hiding (log)
2727
import Polysemy
28-
import Wire.Sem.Logger.Level
28+
import System.Logger (Level (..))
2929

3030
data Logger msg m a where
3131
Log :: Level -> msg -> Logger msg m ()

libs/polysemy-wire-zoo/src/Wire/Sem/Logger/Level.hs

-68
This file was deleted.

libs/polysemy-wire-zoo/src/Wire/Sem/Logger/TinyLog.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Wire.Sem.Logger.TinyLog
2222
loggerToTinyLogReqId,
2323
stringLoggerToTinyLog,
2424
discardTinyLogs,
25-
module Wire.Sem.Logger.Level,
25+
module System.Logger,
2626
LogRecorder (..),
2727
newLogRecorder,
2828
recordLogs,
@@ -33,9 +33,9 @@ import Data.Id
3333
import Imports
3434
import Polysemy
3535
import Polysemy.TinyLog (TinyLog)
36+
import System.Logger (Level (..))
3637
import qualified System.Logger as Log
3738
import Wire.Sem.Logger
38-
import Wire.Sem.Logger.Level
3939

4040
loggerToTinyLog ::
4141
(Member (Embed IO) r) =>
@@ -44,7 +44,7 @@ loggerToTinyLog ::
4444
Sem r a
4545
loggerToTinyLog tinylog = interpret $ \case
4646
Log lvl msg ->
47-
embed @IO $ Log.log tinylog (toLevel lvl) msg
47+
embed @IO $ Log.log tinylog lvl msg
4848

4949
-- | Log the request ID along with the message
5050
loggerToTinyLogReqId ::

libs/saml2-web-sso/default.nix

+3-72
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@
6262
, temporary
6363
, text
6464
, time
65+
, tinylog
6566
, transformers
6667
, types-common
6768
, uniplate
6869
, uri-bytestring
6970
, uuid
7071
, wai
7172
, wai-extra
72-
, wai-utilities
7373
, warp
7474
, word8
7575
, xml-conduit
@@ -82,8 +82,6 @@ mkDerivation {
8282
pname = "saml2-web-sso";
8383
version = "0.20";
8484
src = gitignoreSource ./.;
85-
isLibrary = true;
86-
isExecutable = true;
8785
libraryHaskellDepends = [
8886
aeson
8987
asn1-encoding
@@ -140,6 +138,7 @@ mkDerivation {
140138
temporary
141139
text
142140
time
141+
tinylog
143142
transformers
144143
types-common
145144
uniplate
@@ -155,74 +154,6 @@ mkDerivation {
155154
xml-types
156155
yaml
157156
];
158-
executableHaskellDepends = [
159-
aeson
160-
asn1-encoding
161-
asn1-parse
162-
asn1-types
163-
base
164-
base64-bytestring
165-
binary
166-
bytestring
167-
case-insensitive
168-
containers
169-
cookie
170-
crypton
171-
crypton-x509
172-
data-default
173-
directory
174-
dns
175-
email-validate
176-
errors
177-
exceptions
178-
extra
179-
filepath
180-
foundation
181-
ghc-prim
182-
hedgehog
183-
hedgehog-quickcheck
184-
hourglass
185-
hsaml2
186-
hspec
187-
hspec-wai
188-
http-media
189-
http-types
190-
hxt
191-
imports
192-
lens
193-
lens-datetime
194-
memory
195-
mtl
196-
network-uri
197-
pretty-show
198-
process
199-
QuickCheck
200-
quickcheck-instances
201-
random
202-
servant
203-
servant-multipart
204-
servant-server
205-
shelly
206-
silently
207-
string-conversions
208-
temporary
209-
text
210-
time
211-
transformers
212-
uniplate
213-
uri-bytestring
214-
uuid
215-
wai
216-
wai-extra
217-
wai-utilities
218-
warp
219-
word8
220-
xml-conduit
221-
xml-conduit-writer
222-
xml-hamlet
223-
xml-types
224-
yaml
225-
];
226157
testHaskellDepends = [
227158
aeson
228159
asn1-encoding
@@ -278,6 +209,7 @@ mkDerivation {
278209
temporary
279210
text
280211
time
212+
tinylog
281213
transformers
282214
types-common
283215
uniplate
@@ -296,5 +228,4 @@ mkDerivation {
296228
testToolDepends = [ hspec-discover ];
297229
description = "Library and example web app for the SAML Web-based SSO profile";
298230
license = lib.licenses.agpl3Only;
299-
mainProgram = "toy-sp";
300231
}

libs/saml2-web-sso/saml2-web-sso.cabal

+2-108
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ library
133133
, temporary >=1.3
134134
, text >=1.2.3.1
135135
, time >=1.8.0.2
136+
, tinylog
136137
, transformers >=0.5.6.2
137138
, types-common
138139
, uniplate >=1.6.12
@@ -150,121 +151,13 @@ library
150151

151152
default-language: GHC2021
152153

153-
executable toy-sp
154-
main-is: Main.hs
155-
other-modules: Paths_saml2_web_sso
156-
hs-source-dirs: toy-sp
157-
default-extensions:
158-
ConstraintKinds
159-
DataKinds
160-
DefaultSignatures
161-
DeriveGeneric
162-
FlexibleContexts
163-
FlexibleInstances
164-
GADTs
165-
InstanceSigs
166-
KindSignatures
167-
LambdaCase
168-
MultiParamTypeClasses
169-
NoMonomorphismRestriction
170-
NoOverloadedStrings
171-
PolyKinds
172-
QuasiQuotes
173-
RankNTypes
174-
RecordWildCards
175-
ScopedTypeVariables
176-
StandaloneDeriving
177-
TemplateHaskell
178-
TupleSections
179-
TypeApplications
180-
TypeFamilies
181-
TypeOperators
182-
TypeSynonymInstances
183-
ViewPatterns
184-
185-
ghc-options:
186-
-j -O2 -Wall -Wcompat -Wincomplete-record-updates
187-
-Wincomplete-uni-patterns -Wtabs -Werror
188-
189-
build-depends:
190-
, aeson >=1.4.5.0
191-
, asn1-encoding >=0.9.6
192-
, asn1-parse >=0.9.5
193-
, asn1-types >=0.3.3
194-
, base >=4.12.0.0
195-
, base64-bytestring >=1.0.0.2
196-
, binary >=0.8.6.0
197-
, bytestring >=0.10.8.2
198-
, case-insensitive >=1.2.1.0
199-
, containers >=0.6.0.1
200-
, cookie >=0.4.4
201-
, crypton >=0.30
202-
, crypton-x509 >=1.7.5
203-
, data-default >=0.7.1.1
204-
, directory >=1.3.6.0
205-
, dns >=4.0.0
206-
, email-validate >=2.3.2.12
207-
, errors >=2.3.0
208-
, exceptions >=0.10.3
209-
, extra >=1.6.18
210-
, filepath >=1.4.2.1
211-
, foundation >=0.0.25
212-
, ghc-prim >=0.5.3
213-
, hedgehog >=1.0.1
214-
, hedgehog-quickcheck >=0.1.1
215-
, hourglass >=0.2.12
216-
, hsaml2 >=0.1
217-
, hspec >=2.7.1
218-
, hspec-wai >=0.9.0
219-
, http-media >=0.8.0.0
220-
, http-types >=0.12.3
221-
, hxt >=9.3.1.18
222-
, imports
223-
, lens >=4.17.1
224-
, lens-datetime >=0.3
225-
, memory >=0.14.18
226-
, mtl >=2.2.2
227-
, network-uri >=2.6.1.0
228-
, pretty-show >=1.9.5
229-
, process >=1.6.5.0
230-
, QuickCheck >=2.13.2
231-
, quickcheck-instances >=0.3.22
232-
, random >=1.1
233-
, saml2-web-sso
234-
, servant >=0.16.2
235-
, servant-multipart >=0.12
236-
, servant-server >=0.16.2
237-
, shelly >=1.8.1
238-
, silently >=1.2.5.1
239-
, string-conversions >=0.4.0.1
240-
, temporary >=1.3
241-
, text >=1.2.3.1
242-
, time >=1.8.0.2
243-
, transformers >=0.5.6.2
244-
, uniplate >=1.6.12
245-
, uri-bytestring >=0.3.2.2
246-
, uuid >=1.3.13
247-
, wai >=3.2.2.1
248-
, wai-extra >=3.0.28
249-
, wai-utilities
250-
, warp >=3.2.28
251-
, word8 >=0.1.3
252-
, xml-conduit >=1.8.0.1
253-
, xml-conduit-writer >=0.1.1.2
254-
, xml-hamlet >=0.5.0.1
255-
, xml-types >=0.3.6
256-
, yaml >=0.8.25.1
257-
258-
default-language: GHC2021
259-
260154
test-suite spec
261155
type: exitcode-stdio-1.0
262156
main-is: Spec.hs
263157
other-modules:
264158
Paths_saml2_web_sso
265159
Samples
266160
Test.SAML2.UtilSpec
267-
Test.SAML2.WebSSO.API.ExampleSpec
268161
Test.SAML2.WebSSO.APISpec
269162
Test.SAML2.WebSSO.ConfigSpec
270163
Test.SAML2.WebSSO.RoundtripSpec
@@ -365,6 +258,7 @@ test-suite spec
365258
, temporary >=1.3
366259
, text >=1.2.3.1
367260
, time >=1.8.0.2
261+
, tinylog
368262
, transformers >=0.5.6.2
369263
, types-common
370264
, uniplate >=1.6.12

0 commit comments

Comments
 (0)