Skip to content

Commit b213e72

Browse files
committed
Mv Spar.Options => Wire.ServerOptions.Spar
1 parent 7cd5281 commit b213e72

File tree

21 files changed

+37
-35
lines changed

21 files changed

+37
-35
lines changed

services/spar/src/Spar/Options.hs renamed to libs/wire-subsystems/src/Wire/ServerOptions/Spar.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
-- with this program. If not, see <https://www.gnu.org/licenses/>.
2020

2121
-- | Reading the Spar config.
22-
module Spar.Options
22+
module Wire.ServerOptions.Spar
2323
( Opts' (..),
2424
Opts,
2525
DerivedOpts (..),

libs/wire-subsystems/wire-subsystems.cabal

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,12 @@ library
116116
Wire.PropertySubsystem
117117
Wire.PropertySubsystem.Interpreter
118118
Wire.Rpc
119-
Wire.ServerOptions.Cannon
120119
Wire.ServerOptions.Brig
121-
Wire.ServerOptions.Brig.ZAuth
122-
Wire.ServerOptions.Brig.Queue
123120
Wire.ServerOptions.Brig.CookieLimit
121+
Wire.ServerOptions.Brig.Queue
122+
Wire.ServerOptions.Brig.ZAuth
123+
Wire.ServerOptions.Cannon
124+
Wire.ServerOptions.Spar
124125
Wire.SessionStore
125126
Wire.SessionStore.Cassandra
126127
Wire.StoredUser
@@ -159,20 +160,19 @@ library
159160
, base
160161
, base16-bytestring
161162
, bilge
162-
, dns
163163
, bloodhound
164164
, bytestring
165165
, bytestring-conversion
166166
, case-insensitive
167167
, cassandra-util
168-
, openapi3
169168
, conduit
170169
, containers
171170
, cql
172171
, crypton
173172
, currency-codes
174173
, data-default
175174
, data-timeout
175+
, dns
176176
, errors
177177
, exceptions
178178
, extended
@@ -193,6 +193,8 @@ library
193193
, mime-mail
194194
, network
195195
, network-conduit-tls
196+
, openapi3
197+
, optparse-applicative
196198
, polysemy
197199
, polysemy-plugin
198200
, polysemy-time
@@ -210,6 +212,7 @@ library
210212
, template
211213
, text
212214
, text-icu-translit
215+
, text-latin1
213216
, time
214217
, time-out
215218
, time-units
@@ -225,6 +228,7 @@ library
225228
, wire-api-federation
226229
, wire-otel
227230
, witherable
231+
, yaml
228232

229233
default-language: GHC2021
230234

@@ -240,7 +244,6 @@ test-suite wire-subsystems-tests
240244
other-modules:
241245
Spec
242246
Wire.AuthenticationSubsystem.InterpreterSpec
243-
Wire.ServerOptionsSpec
244247
Wire.MiniBackend
245248
Wire.MockInterpreters
246249
Wire.MockInterpreters.ActivationCodeStore
@@ -265,6 +268,7 @@ test-suite wire-subsystems-tests
265268
Wire.MockInterpreters.VerificationCodeStore
266269
Wire.NotificationSubsystem.InterpreterSpec
267270
Wire.PropertySubsystem.InterpreterSpec
271+
Wire.ServerOptionsSpec
268272
Wire.UserSearch.TypesSpec
269273
Wire.UserStoreSpec
270274
Wire.UserSubsystem.InterpreterSpec
@@ -274,18 +278,17 @@ test-suite wire-subsystems-tests
274278
build-depends:
275279
, aeson
276280
, async
281+
, attoparsec
277282
, base
278283
, bilge
279-
, yaml
284+
, bloodhound
280285
, bytestring
281286
, cassandra-util
282287
, containers
283-
, bloodhound
284-
, dns
285-
, attoparsec
286-
, email-validate
287288
, crypton
288289
, data-default
290+
, dns
291+
, email-validate
289292
, errors
290293
, extended
291294
, hspec
@@ -315,3 +318,4 @@ test-suite wire-subsystems-tests
315318
, wire-api
316319
, wire-api-federation
317320
, wire-subsystems
321+
, yaml

services/cannon/cannon.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ library
115115
, warp >=3.0
116116
, websockets >=0.11.2
117117
, wire-api
118-
, wire-subsystems
119118
, wire-otel
119+
, wire-subsystems
120120

121121
default-language: GHC2021
122122

services/spar/exec/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
module Main where
1919

2020
import Imports
21-
import Spar.Options
2221
import Spar.Run
22+
import Wire.ServerOptions.Spar
2323

2424
main :: IO ()
2525
main = runServer =<< getOpts

services/spar/spar.cabal

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ library
2525
Spar.Intra.Brig
2626
Spar.Intra.BrigApp
2727
Spar.Intra.Galley
28-
Spar.Options
2928
Spar.Orphans
3029
Spar.Run
3130
Spar.Schema.Run
@@ -173,7 +172,6 @@ library
173172
, metrics-wai
174173
, mtl
175174
, network-uri
176-
, optparse-applicative
177175
, polysemy
178176
, polysemy-check >=0.9
179177
, polysemy-plugin
@@ -185,7 +183,6 @@ library
185183
, servant-multipart
186184
, servant-server
187185
, text
188-
, text-latin1
189186
, these
190187
, time
191188
, tinylog
@@ -200,7 +197,6 @@ library
200197
, warp
201198
, wire-api
202199
, wire-subsystems
203-
, yaml
204200

205201
default-language: Haskell2010
206202

@@ -261,6 +257,7 @@ executable spar
261257
base
262258
, imports
263259
, spar
260+
, wire-subsystems
264261

265262
default-language: Haskell2010
266263

@@ -397,6 +394,7 @@ executable spar-integration
397394
, wai-extra
398395
, wai-utilities
399396
, wire-api
397+
, wire-subsystems
400398
, xml-conduit
401399
, yaml
402400
, zauth

services/spar/src/Spar/API.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ import Spar.App
7171
import Spar.CanonicalInterpreter
7272
import Spar.Error
7373
import qualified Spar.Intra.BrigApp as Brig
74-
import Spar.Options
7574
import Spar.Orphans ()
7675
import Spar.Scim hiding (handle)
7776
import Spar.Sem.AReqIDStore (AReqIDStore)
@@ -114,6 +113,7 @@ import qualified Wire.Sem.Logger as Logger
114113
import Wire.Sem.Now (Now)
115114
import Wire.Sem.Random (Random)
116115
import qualified Wire.Sem.Random as Random
116+
import Wire.ServerOptions.Spar
117117

118118
app :: Env -> Application
119119
app ctx0 req cont = do

services/spar/src/Spar/App.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ import Servant
7272
import qualified Servant.Multipart as Multipart
7373
import Spar.Error hiding (sparToServerErrorWithLogging)
7474
import qualified Spar.Intra.BrigApp as Intra
75-
import Spar.Options
7675
import Spar.Orphans ()
7776
import Spar.Sem.AReqIDStore (AReqIDStore)
7877
import Spar.Sem.BrigAccess (BrigAccess, getAccount)
@@ -102,6 +101,7 @@ import Wire.Sem.Logger (Logger)
102101
import qualified Wire.Sem.Logger as Logger
103102
import Wire.Sem.Random (Random)
104103
import qualified Wire.Sem.Random as Random
104+
import Wire.ServerOptions.Spar
105105

106106
throwSparSem :: (Member (Error SparError) r) => SparCustomError -> Sem r a
107107
throwSparSem = throw . SAML.CustomError

services/spar/src/Spar/CanonicalInterpreter.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import Polysemy.Input (Input, runInputConst)
3333
import Servant
3434
import Spar.App hiding (sparToServerErrorWithLogging)
3535
import Spar.Error
36-
import Spar.Options
3736
import Spar.Orphans ()
3837
import Spar.Sem.AReqIDStore (AReqIDStore)
3938
import Spar.Sem.AReqIDStore.Cassandra (aReqIDStoreToCassandra)
@@ -74,6 +73,7 @@ import Wire.Sem.Now (Now)
7473
import Wire.Sem.Now.IO (nowToIO)
7574
import Wire.Sem.Random (Random)
7675
import Wire.Sem.Random.IO (randomToIO)
76+
import Wire.ServerOptions.Spar
7777

7878
type CanonicalEffs =
7979
'[ SAML2,

services/spar/src/Spar/Data.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ import Imports
4242
import SAML2.Util (renderURI)
4343
import qualified SAML2.WebSSO as SAML
4444
import qualified SAML2.WebSSO.Types.Email as SAMLEmail
45-
import Spar.Options
4645
import qualified Spar.Schema.Run as Migrations
4746
import Wire.API.User.Saml
47+
import Wire.ServerOptions.Spar
4848

4949
-- | A lower bound: @schemaVersion <= whatWeFoundOnCassandra@, not @==@.
5050
schemaVersion :: Int32

services/spar/src/Spar/Run.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import Spar.API (SparAPI, app)
4848
import Spar.App
4949
import qualified Spar.Data as Data
5050
import Spar.Data.Instances ()
51-
import Spar.Options as Opt
5251
import Spar.Orphans ()
5352
import System.Logger (Logger)
5453
import qualified System.Logger as Log
@@ -57,6 +56,7 @@ import Util.Options
5756
import Wire.API.Routes.Version (expandVersionExp)
5857
import Wire.API.Routes.Version.Wai
5958
import Wire.Sem.Logger.TinyLog
59+
import Wire.ServerOptions.Spar as Opt
6060

6161
----------------------------------------------------------------------
6262
-- cassandra

0 commit comments

Comments
 (0)