Skip to content

Commit 87a2920

Browse files
committed
Remove proto-lens SRP
1 parent 779f539 commit 87a2920

6 files changed

Lines changed: 20 additions & 80 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
project: cardano-api
2+
pr: 1185
3+
kind:
4+
- breaking
5+
- maintenance
6+
description: |
7+
Bump `cardano-ledger-core` lower bound to `>=1.20` (required by `ouroboros-consensus-3.0.x`).
8+
9+
Remove the `proto-lens` source-repository-package stanza from `cabal.project`.
10+
GHC 9.12-compatible `proto-lens` (`>=0.7.1.7`) is now available on Hackage, so the SRP workaround is no longer required.

cabal.project

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ repository cardano-haskell-packages
1313
-- See CONTRIBUTING for information about these, including some Nix commands
1414
-- you need to run if you change them
1515
index-state:
16-
, hackage.haskell.org 2026-03-22T23:17:32Z
17-
, cardano-haskell-packages 2026-04-09T12:05:18Z
16+
, hackage.haskell.org 2026-04-17T09:20:55Z
17+
, cardano-haskell-packages 2026-04-15T11:20:53Z
1818

1919
active-repositories:
2020
, :rest
@@ -144,27 +144,6 @@ if arch(wasm32)
144144
package digest
145145
flags: -pkg-config
146146

147-
-- GHC 9.12 and later support in master
148-
if impl(ghc >= 9.12)
149-
source-repository-package
150-
type: git
151-
location: https://github.com/google/proto-lens
152-
tag: 9b41fe0e10e8fe12ec508a3b361d0f0c2217c491
153-
--sha256: sha256-ruTbbUKVJBPANnm6puigtp26mmiVDd0jMpLfJLOuUpU=
154-
subdir:
155-
discrimination-ieee754
156-
proto-lens-arbitrary
157-
proto-lens-benchmarks
158-
proto-lens-discrimination
159-
proto-lens-optparse
160-
proto-lens-protobuf-types
161-
proto-lens-protoc
162-
proto-lens-runtime
163-
proto-lens-setup
164-
proto-lens-tests-dep
165-
proto-lens-tests
166-
proto-lens
167-
168147
-- IMPORTANT
169148
-- Do NOT add more source-repository-package stanzas here unless they are strictly
170149
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

cardano-api/cardano-api.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ library
146146
cardano-ledger-binary >=1.6,
147147
cardano-ledger-byron >=1.2,
148148
cardano-ledger-conway >=1.19,
149-
cardano-ledger-core >=1.17 && <1.20,
149+
cardano-ledger-core >=1.20,
150150
cardano-ledger-dijkstra >=0.1,
151151
cardano-ledger-mary >=1.8,
152152
cardano-ledger-shelley >=1.16,

cardano-rpc/cardano-rpc.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ library
8787
generic-data,
8888
grapesy,
8989
grpc-spec,
90-
proto-lens >=0.7.1.6,
90+
proto-lens >=0.7.1.7,
9191
proto-lens-protobuf-types,
9292
random,
9393
rio,

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -123,26 +123,6 @@
123123

124124
# We use cabalProject' to ensure we don't build the plan for
125125
# all systems.
126-
# Fetch proto-lens with submodules and fix symlinks for plan and build phases
127-
protoLensSrc = nixpkgs.fetchgit {
128-
url = "https://github.com/google/proto-lens";
129-
rev = "9b41fe0e10e8fe12ec508a3b361d0f0c2217c491";
130-
sha256 = "sha256-ruTbbUKVJBPANnm6puigtp26mmiVDd0jMpLfJLOuUpU=";
131-
fetchSubmodules = true;
132-
};
133-
fixProtoLensSrc = nixpkgs.runCommand "proto-lens-fixed" {} ''
134-
mkdir -p $out
135-
cp -a ${protoLensSrc}/. $out/
136-
chmod -R +w $out
137-
# Fix proto-lens-imports symlink in proto-lens
138-
rm -rf $out/proto-lens/proto-lens-imports/google
139-
cp -r ${protoLensSrc}/google/protobuf/src/google $out/proto-lens/proto-lens-imports/
140-
# Fix proto-src symlink in proto-lens-protobuf-types
141-
rm -rf $out/proto-lens-protobuf-types/proto-src
142-
cp -r ${protoLensSrc}/google/protobuf/src $out/proto-lens-protobuf-types/proto-src
143-
chmod -R -w $out
144-
'';
145-
146126
cabalProject = nixpkgs.haskell-nix.cabalProject' ({config, ...}: {
147127
src = ./.;
148128
name = "cardano-api";
@@ -160,7 +140,6 @@
160140
#
161141
inputMap = {
162142
"https://chap.intersectmbo.org/" = inputs.CHaP;
163-
"https://github.com/google/proto-lens/9b41fe0e10e8fe12ec508a3b361d0f0c2217c491" = protoLensSrc;
164143
};
165144
# Also currently needed to make `nix flake lock --update-input CHaP` work.
166145
cabalProjectLocal = ''
@@ -228,34 +207,6 @@
228207
# package customizations as needed. Where cabal.project is not
229208
# specific enough, or doesn't allow setting these.
230209
modules = [
231-
# TODO remove this module when removing proto-lens SRP
232-
# Override proto-lens source to use fixed symlinks (inputMap provides the fixed
233-
# source for plan computation; this module provides it for the build phase)
234-
({
235-
lib,
236-
config,
237-
...
238-
}: let
239-
protoLensPackages = [
240-
"proto-lens"
241-
"proto-lens-arbitrary"
242-
"proto-lens-discrimination"
243-
"proto-lens-optparse"
244-
"proto-lens-protobuf-types"
245-
"proto-lens-protoc"
246-
"proto-lens-runtime"
247-
"proto-lens-setup"
248-
"proto-lens-tests-dep"
249-
"proto-lens-tests"
250-
"discrimination-ieee754"
251-
"proto-lens-benchmarks"
252-
];
253-
in {
254-
packages =
255-
lib.genAttrs
256-
(builtins.filter (p: config.packages ? ${p}) protoLensPackages)
257-
(p: {src = lib.mkForce (fixProtoLensSrc + "/${p}");});
258-
})
259210
({...}: {
260211
packages.cardano-api = {
261212
configureFlags = ["--ghc-option=-Werror"];

0 commit comments

Comments
 (0)