sorki
57cc9e3609
remote: implement Logger_Read
...
Adds `setDataSource` which can be used to set
a function to be polled when daemon asks
for data using `Logger_Read`.
Function should return `Nothing` when all
data was read.
`clearDataSource` should be used after
the operation using the data source is finished.
Related to #265
2023-12-07 16:35:16 +01:00
sorki
82262a1b1d
remote: Client, no more need for nested runRemoteStoreT
2023-12-07 16:35:16 +01:00
sorki
f1f30af6d5
remote: also include what was parsed (via Show) in incremental parser errors
2023-12-07 16:35:15 +01:00
sorki
6ebc2fcc5b
remote: handle errors in genericIncremental
2023-12-07 16:35:15 +01:00
sorki
c4315f1842
remote: handle IOExceptions in sockGet8
2023-12-07 16:35:15 +01:00
sorki
5d927d3402
remote: handle logger errors properly
2023-12-07 16:35:15 +01:00
sorki
001f4cad7a
remote: deal with logger, tagless
2023-12-07 16:35:15 +01:00
sorki
a934eb1e19
remote: MonadRemoteStoreR
2023-12-07 16:35:15 +01:00
sorki
c25a5a8535
remote: init Remote.Client.doReq
2023-12-07 16:35:15 +01:00
sorki
0c54337dbf
remote: add NarSource to RemoteStoreState, add setNarSource, takeNarSource to MonadRemoteStore
2023-12-07 16:35:15 +01:00
sorki
638ac9ea80
remote: fix dumm(p)y path typo
2023-12-07 16:35:15 +01:00
sorki
11a9bfffd0
remote: align AddToStore and AddTextToStore serializers with old versions
2023-12-07 16:35:15 +01:00
sorki
9b66373471
remote: fix arbitrary repair mode of AddToStore AddTextToStore to DontRepair
2023-12-07 16:35:15 +01:00
sorki
a39ee890d0
remote: init Remote.Server
2023-12-07 16:35:15 +01:00
sorki
c0a17f25a0
remote: MonadRemoteStore typeclass
...
Related to #72
Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com>
2023-12-06 16:25:38 +01:00
sorki
bc98de1bf3
remote: drop MonadRemote* store aliases
2023-12-06 16:25:38 +01:00
sorki
217ea1b8ad
remote: add CollectGarbage StoreRequest
2023-12-06 16:25:38 +01:00
sorki
6074504bcc
remote: change AddSignatures from [ByteString] to Set Signature
2023-12-06 16:25:38 +01:00
sorki
8b1db174bc
remote: add Types.Query.Missing for QueryMissing result
2023-12-06 16:25:38 +01:00
sorki
a05377a983
remote: add Types.Handshake, use as a greeting result
2023-12-06 16:25:38 +01:00
sorki
ea49946a19
remote: add preStoreConfigToStoreConfig, use in handshake
2023-12-06 16:25:38 +01:00
sorki
a8a4d66f6e
remote: protoVersion_minor 21 -> 24
2023-12-06 16:25:38 +01:00
sorki
d5557680de
remote: handshake - use minimumCommonVersion of our vs daemon protoVersion
2023-12-06 16:25:38 +01:00
sorki
14f93bf30b
remote: add Types.TrusteFlag, serializer, use in client, more props for handshake
...
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2023-12-06 16:25:38 +01:00
sorki
d8df1cccfd
remote: no more hacks for StoreRequest prop
2023-12-06 16:25:38 +01:00
sorki
9fb7854541
tests: custom Arbitrary Trace and Arbitrary ErrorInfo w/o (Just 0)
2023-12-06 16:25:38 +01:00
sorki
c815068e60
tests: add custom Arbitrary (Maybe Text) that doesn't generate Just mempty
2023-12-06 16:25:38 +01:00
sorki
a7fbcf7a02
tests: custom Arbitrary BuildResult without Just mempty errorMessage
2023-12-06 16:25:38 +01:00
sorki
cc931dde1e
tests: custom Arbitrary UTCTime instance, drop quickcheck-instances
...
in favor of our own small set of required instances.
2023-12-06 16:25:38 +01:00
sorki
6c0edf2fcf
remote: drop dependent-sum upper bound like in core
2023-12-06 16:25:38 +01:00
sorki
4ae2d827ad
remote: add storeRequest Serializer, property test
2023-12-06 16:25:38 +01:00
sorki
b2c31e0c7b
remote: recursive Bool -> FileIngestionMethod
2023-12-06 16:25:38 +01:00
sorki
fcbcafa99a
remote: GADT -> Types.StoreRequest
2023-12-06 16:25:38 +01:00
sorki
ee172f077f
remote: add TestStoreConfig
2023-12-06 16:25:38 +01:00
sorki
0ab79e5157
remote: add Types.StoreText, use in AddTextToStore
2023-12-06 16:25:38 +01:00
sorki
7f9c7fb2eb
remote: add/derive instances for StoreRequest
2023-12-06 16:25:38 +01:00
sorki
e0456e3bc9
remote: prefix WorkerOp, add workerOp Serializer, test
2023-12-06 16:25:38 +01:00
sorki
c5f3c1e4f6
remote: generalize error in sockPutS, sockGetS, add Types.WorkerMagic, workerMagic serializer, HandshakeSError
2023-12-06 16:25:38 +01:00
sorki
2c46d342b0
remote, LoggerOpCode Int -> Word64
2023-12-06 16:25:38 +01:00
sorki
78639b8396
remote: NixSerializer, rename mapError to mapErrorST, add mapErrorS, mapReaderS
...
for transforming `NixSerializer`(s)
2023-12-06 16:25:38 +01:00
sorki
e57397b99f
remote: move ourProtoVersion near type, elaborate Types imports in Client
2023-12-06 16:25:38 +01:00
sorki
ec79cfe1ce
remote: NixSerializer, move maybePath from where clause, expose
2023-12-06 16:25:38 +01:00
sorki
936fdf85f5
remote: Data.Serializer, expand signature of mapIso/mapPrism*
2023-12-06 16:25:38 +01:00
sorki
cbbc731519
remote: fix mapStoreConfig import
2023-12-06 16:25:38 +01:00
sorki
aaf0567554
remote: add Remote.GADT
...
Closes #149
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2023-12-06 16:25:38 +01:00
sorki
3e135c1105
remote: neaten MonadStore
2023-12-06 16:25:38 +01:00
sorki
e700c7255c
remote: Remote.Protocol -> Remote.Client
2023-12-06 16:25:38 +01:00
sorki
a3c9530198
remote: heavy lifting
...
- By layus
- `RemoteStoreT`, `RemoteStoreState` from #72
- By Ericson2314
- Reorg, `MonadRemoteStore0`, `MonadRemoteStoreHandshake`,
`PreStoreConfig`, better `greet`
- By ryantrinkle
- Correctly detect when other side has hung up, throws
`RemoteStoreError_Disconnected`
Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com>
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
Co-Authored-By: Ryan Trinkle <ryan@trinkle.org>
2023-12-06 16:25:38 +01:00
sorki
556e0a9e51
remote: fix GC haddock, add more
2023-11-30 07:45:34 +01:00
sorki
40e057bc45
remote: PrimError -> SError, LoggerError -> LoggerSError
2023-11-30 07:17:38 +01:00
sorki
849f7e7ed6
remote: cabal, sort exposed modules
2023-11-30 07:09:06 +01:00
sorki
9cd7d3597a
remote, add Types.GC, use in deleteSpecific
2023-11-30 06:59:59 +01:00
sorki
598cb89fbd
remote: storeMetadata, add signature Serializer
2023-11-30 06:59:59 +01:00
sorki
90984fd4a1
remote: add remaining Serializers
...
* storePathHashPart
* storePathName
* pathMetadata
* someHashAlgo
* digest
2023-11-30 06:59:59 +01:00
sorki
e950c84408
remote: rest of the Prim/Serialize -> Serializer
2023-11-30 06:59:59 +01:00
Cale Gibbard
c8a329ba6e
remote: add derivedPath Serializer
...
Co-Authored-By: sorki <srk@48.io>
2023-11-30 06:59:59 +01:00
sorki
5ebe47db03
remote: replace protoVersion, use new toys
2023-11-30 06:59:59 +01:00
sorki
69135ed504
remote: port the rest to Serializer
2023-11-30 06:59:59 +01:00
sorki
c853163346
remote: more error handling, port rest of the logger to Serializer
2023-11-30 06:59:59 +01:00
squalus
922f5bbf8c
remote: add deleteSpecific
...
- add the gcDeleteSpecific action of the CollectGarbage operation.
- add deleteSpecific test
2023-11-30 06:59:59 +01:00
sorki
da8eb42367
remote: better errors for bool and enum serializers
2023-11-30 06:59:59 +01:00
sorki
2e9ab694fa
remote: add build-derivation executable
2023-11-30 06:59:59 +01:00
sorki
edace0445c
remote: add path serializer, start wiring errors
2023-11-30 06:59:59 +01:00
Richard Marko
a2c5065b36
remote: bark if parsing leftover isn't empty
2023-11-30 06:59:59 +01:00
Richard Marko
bb5f116a51
remote: handle both error types in logger
2023-11-30 06:59:59 +01:00
Richard Marko
d15f0075f4
remote: set ourProtoVersion minor to what we currently advertise
2023-11-30 06:59:59 +01:00
Richard Marko
14b739aaed
remote: getError -> getErrors
2023-11-30 06:59:59 +01:00
Richard Marko
76a8632d9c
remote: thread ProtoVersion into logger
2023-11-30 06:59:59 +01:00
Richard Marko
241fa58737
remote: add Trace, BasicError, ErrorInfo
2023-11-30 06:59:59 +01:00
Richard Marko
8b9eb48b40
remote: switch Logger_Next from ByteString to Text
2023-11-30 06:59:59 +01:00
Richard Marko
01f26b359a
remote: switch Field_LogStr from ByteString to Text
2023-11-30 06:59:59 +01:00
Richard Marko
3cac7e9867
remote: align HasStoreStocket method (storeSocket -> hasStoreSocket)
2023-11-30 06:59:59 +01:00
John Ericson
aba9b4531e
remote: add serializers for ProtoVersion
...
Co-Authored-By: Richard Marko <srk@48.io>
2023-11-30 06:59:59 +01:00
Richard Marko
d414386f52
remote: add Serializer Derivation
2023-11-30 06:59:59 +01:00
Richard Marko
5c9f7ad70e
remote: switch controlParser to Serializer Logger
2023-11-30 06:59:59 +01:00
Richard Marko
fb02185c29
remote: add LoggerOpCode
2023-11-30 06:59:59 +01:00
Richard Marko
2462c9ee90
remote: Serializer - add maybeActivity
2023-11-30 06:59:59 +01:00
Richard Marko
f48c7327b7
remote: add Activity and ActivityResult enums
2023-11-30 06:59:59 +01:00
Richard Marko
4a4625883f
remote: Serialize.Prim - add toEnumCheckBounds util
2023-11-30 06:59:59 +01:00
Richard Marko
79310d5b7b
remote: add NixSerializerSpec
2023-11-30 06:59:59 +01:00
Richard Marko
751669cd0d
remote: init NixSerializer
...
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2023-11-30 06:59:59 +01:00
Richard Marko
edaa343522
remote: (get|put)Int, use Integral
2023-11-30 06:59:59 +01:00
John Ericson
2b3afbffb5
remote: init Serializer
...
Co-Authored-By: Richard Marko <srk@48.io>
2023-11-30 06:59:59 +01:00
Richard Marko
9ac9d497d3
remote: safer getBool, getEnum
2023-11-30 06:59:59 +01:00
Richard Marko
25bd0f104c
remote: parallel tests
2023-11-30 06:59:59 +01:00
Richard Marko
0a0e4a6793
remote: Arbitrary and Serialize for ActivityID, Field, props
2023-11-30 06:59:59 +01:00
Richard Marko
5ea5b82b59
prefix BuildMode and BuildResult constructors
2023-11-30 06:59:59 +01:00
Richard Marko
a3e3840d9b
remote: add Arbitrary, Verbosity prop and enum tests
2023-11-30 06:59:59 +01:00
Richard Marko
cb255d4203
remote: expand Logger with fields
2023-11-30 06:59:59 +01:00
Richard Marko
96cbe1178d
remote: add Types.Verbosity
2023-11-30 06:59:59 +01:00
John Ericson
64a4368dfd
remote: move StoreMonad to MonadStore
2023-11-30 06:59:59 +01:00
Richard Marko
760408093e
remote: Types.Logger
2023-11-30 06:59:59 +01:00
Richard Marko
4f40e0574a
remote: move and rename (CheckFlag|SubstituteFlag) to Types.(Check|Substitude)Mode
2023-11-30 06:59:59 +01:00
John Ericson
7cd4adde40
remote: Util -> Socket
2023-11-30 06:59:59 +01:00
John Ericson
ab201da448
remote: move StoreConfig to Types.StoreConfig, extend, add PreStoreConfig
2023-11-30 06:59:59 +01:00
Richard Marko
7590e2bec4
remote: move WorkerOp to Types.WorkerOp
2023-11-30 06:59:59 +01:00
Richard Marko
93d923eafb
remote: complete binary -> cereal transition
2023-11-30 06:59:59 +01:00
Richard Marko
655afaa2f8
remote: squash whitespace
2023-11-30 06:59:59 +01:00
John Ericson
e4271d6929
remote: add ProtoVersion
2023-11-30 06:59:59 +01:00
John Ericson
ca5faba4ba
Bidirectional worker op
...
Use dummy enum variants to fill the gaps so the Enum instance works
Co-Authored-By: Dan Bornside <dan.bornside@gmail.com>
2023-11-30 06:59:59 +01:00