Skip to content

Commit

Permalink
[WPB-3138] Split galley-schema into lib and exec (#3639)
Browse files Browse the repository at this point in the history
* Split galley-schema into lib and exec

* Removed galley-schema-lib, merged into galley.

* Removed dead comment
  • Loading branch information
elland authored Oct 11, 2023
1 parent e6b2ed4 commit f35c9ae
Show file tree
Hide file tree
Showing 74 changed files with 347 additions and 362 deletions.
2 changes: 1 addition & 1 deletion services/galley/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ mkDerivation {
metrics-core
metrics-wai
mtl
optparse-applicative
pem
polysemy
polysemy-wire-zoo
Expand Down Expand Up @@ -269,7 +270,6 @@ mkDerivation {
QuickCheck
quickcheck-instances
random
raw-strings-qq
retry
saml2-web-sso
schema-profunctor
Expand Down
199 changes: 90 additions & 109 deletions services/galley/galley.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ flag static
default: False

common common-all
default-language: Haskell2010
default-language: GHC2021
ghc-options:
-O2 -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
-Wpartial-fields -fwarn-tabs -optP-Wno-nonportable-include-path
Expand Down Expand Up @@ -68,7 +68,7 @@ common common-all
ViewPatterns

library
import: common-all
import: common-all

-- cabal-fmt: expand src
exposed-modules:
Expand Down Expand Up @@ -203,14 +203,83 @@ library
Galley.Options
Galley.Queue
Galley.Run
Galley.Schema.Run
Galley.Schema.V20
Galley.Schema.V21
Galley.Schema.V22
Galley.Schema.V23
Galley.Schema.V24
Galley.Schema.V25
Galley.Schema.V26
Galley.Schema.V27
Galley.Schema.V28
Galley.Schema.V29
Galley.Schema.V30
Galley.Schema.V31
Galley.Schema.V32
Galley.Schema.V33
Galley.Schema.V34
Galley.Schema.V35
Galley.Schema.V36
Galley.Schema.V37
Galley.Schema.V38_CreateTableBillingTeamMember
Galley.Schema.V39
Galley.Schema.V40_CreateTableDataMigration
Galley.Schema.V41_TeamNotificationQueue
Galley.Schema.V42_TeamFeatureValidateSamlEmails
Galley.Schema.V43_TeamFeatureDigitalSignatures
Galley.Schema.V44_AddRemoteIdentifiers
Galley.Schema.V45_AddFederationIdMapping
Galley.Schema.V46_TeamFeatureAppLock
Galley.Schema.V47_RemoveFederationIdMapping
Galley.Schema.V48_DeleteRemoteIdentifiers
Galley.Schema.V49_ReAddRemoteIdentifiers
Galley.Schema.V50_AddLegalholdWhitelisted
Galley.Schema.V51_FeatureFileSharing
Galley.Schema.V52_FeatureConferenceCalling
Galley.Schema.V53_AddRemoteConvStatus
Galley.Schema.V54_TeamFeatureSelfDeletingMessages
Galley.Schema.V55_SelfDeletingMessagesLockStatus
Galley.Schema.V56_GuestLinksTeamFeatureStatus
Galley.Schema.V57_GuestLinksLockStatus
Galley.Schema.V58_ConversationAccessRoleV2
Galley.Schema.V59_FileSharingLockStatus
Galley.Schema.V60_TeamFeatureSndFactorPasswordChallenge
Galley.Schema.V61_MLSConversation
Galley.Schema.V62_TeamFeatureSearchVisibilityInbound
Galley.Schema.V63_MLSConversationClients
Galley.Schema.V64_Epoch
Galley.Schema.V65_MLSRemoteClients
Galley.Schema.V66_AddSplashScreen
Galley.Schema.V67_MLSFeature
Galley.Schema.V68_MLSCommitLock
Galley.Schema.V69_MLSProposal
Galley.Schema.V70_MLSCipherSuite
Galley.Schema.V71_MemberClientKeypackage
Galley.Schema.V72_DropManagedConversations
Galley.Schema.V73_MemberClientTable
Galley.Schema.V74_ExposeInvitationsToTeamAdmin
Galley.Schema.V75_MLSGroupInfo
Galley.Schema.V76_ProposalOrigin
Galley.Schema.V77_MLSGroupMemberClient
Galley.Schema.V78_TeamFeatureOutlookCalIntegration
Galley.Schema.V79_TeamFeatureMlsE2EId
Galley.Schema.V80_AddConversationCodePassword
Galley.Schema.V81_TeamFeatureMlsE2EIdUpdate
Galley.Schema.V82_RemoteDomainIndexes
Galley.Schema.V83_CreateTableTeamAdmin
Galley.Schema.V84_MLSSubconversation
Galley.Schema.V85_MLSDraft17
Galley.Schema.V86_TeamFeatureMlsMigration
Galley.Schema.V87_TeamFeatureSupportedProtocols
Galley.Types.Clients
Galley.Types.ToUserRole
Galley.Types.UserList
Galley.Validation

ghc-options: -fplugin=TransitiveAnns.Plugin
other-modules: Paths_galley
hs-source-dirs: src
ghc-options: -fplugin=TransitiveAnns.Plugin
other-modules: Paths_galley
hs-source-dirs: src
build-depends:
, aeson >=2.0.1.0
, amazonka >=1.4.5
Expand Down Expand Up @@ -255,6 +324,7 @@ library
, metrics-core
, metrics-wai >=0.4
, mtl >=2.2
, optparse-applicative
, pem
, polysemy
, polysemy-wire-zoo
Expand Down Expand Up @@ -296,13 +366,11 @@ library
, wire-api-federation
, x509

default-language: GHC2021

executable galley
import: common-all
main-is: exec/Main.hs
other-modules: Paths_galley
ghc-options: -threaded -with-rtsopts=-T -rtsopts
import: common-all
main-is: exec/Main.hs
other-modules: Paths_galley
ghc-options: -threaded -with-rtsopts=-T -rtsopts
build-depends:
, base
, galley
Expand All @@ -313,8 +381,6 @@ executable galley
if flag(static)
ld-options: -static

default-language: GHC2021

executable galley-integration
import: common-all
main-is: ../integration.hs
Expand Down Expand Up @@ -486,11 +552,9 @@ executable galley-integration
, wire-api-federation
, yaml

default-language: GHC2021

executable galley-migrate-data
import: common-all
main-is: ../main.hs
import: common-all
main-is: ../main.hs

-- cabal-fmt: expand migrate-data/src
other-modules:
Expand All @@ -502,7 +566,7 @@ executable galley-migrate-data
V2_MigrateMLSMembers
V3_BackfillTeamAdmins

hs-source-dirs: migrate-data/src
hs-source-dirs: migrate-data/src
build-depends:
, base
, cassandra-util
Expand All @@ -525,103 +589,22 @@ executable galley-migrate-data
if flag(static)
ld-options: -static

default-language: GHC2021

executable galley-schema
import: common-all
main-is: ../main.hs

-- cabal-fmt: expand schema/src
other-modules:
Run
V20
V21
V22
V23
V24
V25
V26
V27
V28
V29
V30
V31
V32
V33
V34
V35
V36
V37
V38_CreateTableBillingTeamMember
V39
V40_CreateTableDataMigration
V41_TeamNotificationQueue
V42_TeamFeatureValidateSamlEmails
V43_TeamFeatureDigitalSignatures
V44_AddRemoteIdentifiers
V45_AddFederationIdMapping
V46_TeamFeatureAppLock
V47_RemoveFederationIdMapping
V48_DeleteRemoteIdentifiers
V49_ReAddRemoteIdentifiers
V50_AddLegalholdWhitelisted
V51_FeatureFileSharing
V52_FeatureConferenceCalling
V53_AddRemoteConvStatus
V54_TeamFeatureSelfDeletingMessages
V55_SelfDeletingMessagesLockStatus
V56_GuestLinksTeamFeatureStatus
V57_GuestLinksLockStatus
V58_ConversationAccessRoleV2
V59_FileSharingLockStatus
V60_TeamFeatureSndFactorPasswordChallenge
V61_MLSConversation
V62_TeamFeatureSearchVisibilityInbound
V63_MLSConversationClients
V64_Epoch
V65_MLSRemoteClients
V66_AddSplashScreen
V67_MLSFeature
V68_MLSCommitLock
V69_MLSProposal
V70_MLSCipherSuite
V71_MemberClientKeypackage
V72_DropManagedConversations
V73_MemberClientTable
V74_ExposeInvitationsToTeamAdmin
V75_MLSGroupInfo
V76_ProposalOrigin
V77_MLSGroupMemberClient
V78_TeamFeatureOutlookCalIntegration
V79_TeamFeatureMlsE2EId
V80_AddConversationCodePassword
V81_TeamFeatureMlsE2EIdUpdate
V82_RemoteDomainIndexes
V83_CreateTableTeamAdmin
V84_MLSSubconversation
V85_MLSDraft17
V86_TeamFeatureMlsMigration
V87_TeamFeatureSupportedProtocols

hs-source-dirs: schema/src
main-is: Main.hs
hs-source-dirs: schema
default-extensions: TemplateHaskell
build-depends:
, base
, cassandra-util
, extended
, galley
, imports
, optparse-applicative
, raw-strings-qq >=1.0

if flag(static)
ld-options: -static

default-language: GHC2021

test-suite galley-tests
import: common-all
type: exitcode-stdio-1.0
main-is: ../unit.hs
import: common-all
type: exitcode-stdio-1.0
main-is: ../unit.hs
other-modules:
Paths_galley
Run
Expand All @@ -631,8 +614,8 @@ test-suite galley-tests
Test.Galley.Intra.User
Test.Galley.Mapping

ghc-options: -threaded -with-rtsopts=-N
hs-source-dirs: test/unit
ghc-options: -threaded -with-rtsopts=-N
hs-source-dirs: test/unit
build-depends:
, base
, containers
Expand All @@ -651,5 +634,3 @@ test-suite galley-tests
, uuid-types
, wire-api
, wire-api-federation

default-language: GHC2021
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Galley.Schema.Run qualified as Run
import Imports
import qualified Run

main :: IO ()
main = Run.main
Loading

0 comments on commit f35c9ae

Please sign in to comment.