Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ packages:
cardano-api
cardano-api-gen
cardano-wasm
-- TODO fix potential issues with build-type: Custom and protoc and reenable
-- cardano-rpc
cardano-rpc

extra-packages: Cabal, process

Expand Down Expand Up @@ -56,6 +55,19 @@ write-ghc-environment-files: always
jobs: $ncpus
semaphore: True

constraints:
, hedgehog == 1.5
, lifted-async == 0.10.2.7
, random == 1.2.1.3
, tls == 2.1.6
, optparse-applicative==0.18.1.0
, kes-agent == 0.1.0.1

allow-newer:
-- https://github.com/kapralVV/Unique/issues/11
, Unique:hashable
, kes-agent:filepath

if impl (ghc >= 9.12)
allow-newer:
-- https://github.com/kapralVV/Unique/issues/11
Expand Down
10 changes: 0 additions & 10 deletions cardano-rpc/Setup.hs

This file was deleted.

26 changes: 26 additions & 0 deletions cardano-rpc/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: v1

managed:
enabled: true

plugins:
# node
# - plugin: es
# out: gen/node/src
# opt:
# - target=ts
#
# - plugin: connect-es
# out: gen/node/src
# opt:
# - target=ts
#
# - plugin: buf.build/bufbuild/protoschema-jsonschema
# out: gen/jsonschema/schema

# haskell

- plugin: haskell-protolens
path: proto-lens-protoc
out: gen

51 changes: 24 additions & 27 deletions cardano-rpc/cardano-rpc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,11 @@ license-files:
LICENSE
NOTICE

build-type: Custom
build-type: Simple
extra-doc-files:
CHANGELOG.md
README.md

extra-source-files: proto/**/*.proto

custom-setup
setup-depends:
Cabal >=3.0 && <3.13,
base >=4.14 && <5,
proto-lens-setup >=0.4 && <0.5,

common project-config
default-language: Haskell2010
default-extensions:
Expand All @@ -50,7 +42,6 @@ common project-config
library
import: project-config
hs-source-dirs: src
build-tool-depends: proto-lens-protoc:proto-lens-protoc
exposed-modules:
Cardano.Rpc.Client
Cardano.Rpc.Proto.Api.Node
Expand All @@ -65,35 +56,20 @@ library
Cardano.Rpc.Server.Internal.UtxoRpc.Query
Cardano.Rpc.Server.Internal.UtxoRpc.Submit
Cardano.Rpc.Server.Internal.UtxoRpc.Type
Proto.Cardano.Rpc.Node
Proto.Cardano.Rpc.Node_Fields
Proto.Utxorpc.V1alpha.Cardano.Cardano
Proto.Utxorpc.V1alpha.Cardano.Cardano_Fields
Proto.Utxorpc.V1alpha.Query.Query
Proto.Utxorpc.V1alpha.Query.Query_Fields
Proto.Utxorpc.V1alpha.Submit.Submit
Proto.Utxorpc.V1alpha.Submit.Submit_Fields

other-modules:
Cardano.Rpc.Server.Internal.Orphans
Paths_cardano_rpc

autogen-modules:
Paths_cardano_rpc
Proto.Cardano.Rpc.Node
Proto.Cardano.Rpc.Node_Fields
Proto.Utxorpc.V1alpha.Cardano.Cardano
Proto.Utxorpc.V1alpha.Cardano.Cardano_Fields
Proto.Utxorpc.V1alpha.Query.Query
Proto.Utxorpc.V1alpha.Query.Query_Fields
Proto.Utxorpc.V1alpha.Submit.Submit
Proto.Utxorpc.V1alpha.Submit.Submit_Fields

build-depends:
aeson,
base,
bytestring,
cardano-api >=10.17,
cardano-rpc:gen,
cardano-ledger-api,
cardano-ledger-binary,
cardano-ledger-conway,
Expand All @@ -111,6 +87,26 @@ library
rio,
text,

-- this should be replaced by utxorpc pacakge from hackage
-- ideally we should upstream whatever is implemented in Proto.Cardano.Rpc.Node
-- into utxorpc
library gen
import: project-config
hs-source-dirs: gen
exposed-modules:
Proto.Cardano.Rpc.Node
Proto.Cardano.Rpc.Node_Fields
Proto.Utxorpc.V1alpha.Cardano.Cardano
Proto.Utxorpc.V1alpha.Cardano.Cardano_Fields
Proto.Utxorpc.V1alpha.Query.Query
Proto.Utxorpc.V1alpha.Query.Query_Fields
Proto.Utxorpc.V1alpha.Submit.Submit
Proto.Utxorpc.V1alpha.Submit.Submit_Fields
build-depends:
proto-lens,
proto-lens-protobuf-types,
proto-lens-runtime,

test-suite cardano-rpc-test
import: project-config
hs-source-dirs: test/cardano-rpc-test
Expand All @@ -123,8 +119,9 @@ test-suite cardano-rpc-test
cardano-ledger-conway,
cardano-ledger-core,
cardano-rpc,
cardano-rpc:gen,
containers,
hedgehog >=1.1,
hedgehog ^>=1.5,
rio,
tasty,
tasty-hedgehog,
Expand Down
Loading
Loading