Skip to content

Commit 1fecb23

Browse files
committed
Add related ADRs to each other
1 parent 947af90 commit 1fecb23

14 files changed

+70
-2
lines changed

docs/ADR-001-Default-eras-for-CLI-commands.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,9 @@ For example, given the hard fork from Alonzo to Babbage:
5353
* Users will not be surprised by difference in behaviour between different commands.
5454
* Users will not necessarily be using the current era by default.
5555
* Users will be using a most practical current era by default on Mainnet and other networks that may not be on the same era as Mainnet.
56-
* Users will need to explicitly specify the current era after a hard fork and before the release immediately following the hard for if that's what they really want and at their own risk.
56+
* Users will need to explicitly specify the current era after a hard fork and before the release immediately following the hard for if that's what they really want and at their own risk.
57+
58+
# Related ADRs
59+
60+
- [ADR-004](ADR-004-Support-only-for-mainnet-and-upcoming-eras.md) limits the eras exposed by `cardano-api` to mainnet and upcoming only.
61+
- [ADR-012](ADR-012-standardise-CLI-multiple-choice-flags-construction.md) standardises how CLI choice flags (including era flags) should be constructed.

docs/ADR-003-Dependencies-version-constraints-in-cabal-file.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,8 @@ This will allow for less error-prone dependency management.
9292
1. [Per-cabal-file `constraints` - Issue in haskell/cabal](https://github.com/haskell/cabal/issues/8912)
9393
1. https://input-output-hk.github.io/cardano-engineering-handbook/policy/haskell/packaging/versioning.html
9494

95+
# Related ADRs
96+
97+
- [ADR-006](ADR-006-Using-optparse-applicative-main-repository.md) (rejected) — the `optparse-applicative` fork is a concrete example of fork dependency constraints.
98+
9599

docs/ADR-004-Support-only-for-mainnet-and-upcoming-eras.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,10 @@ The ADR gets adopted in `cardano-api` and `cardano-cli`. There may be minor twea
168168
# References
169169
- 1: [ShelleyBasedEra](https://github.com/IntersectMBO/cardano-api/blob/873397bfe0436c224c593f456a3bc237ee0af0c8/cardano-api/internal/Cardano/Api/Eon/ShelleyBasedEra.hs#L123)
170170
- 2: [CardanoEra](https://github.com/IntersectMBO/cardano-api/blob/873397bfe0436c224c593f456a3bc237ee0af0c8/cardano-api/internal/Cardano/Api/Eras/Core.hs#L256)
171+
172+
# Related ADRs
173+
174+
- [ADR-001](ADR-001-Default-eras-for-CLI-commands.md) defines how CLI commands default to an era.
175+
- [ADR-009](ADR-009-cardano-api-exports-convention.md) defines the `Cardano.Api.Experimental` and `Cardano.Api.Compatible` module structure.
176+
- [ADR-010](ADR-010-cardano-api-script-witness-api.md) — the script witness API is parameterized by these eras.
177+
- [ADR-015](ADR-015-Cardano-API-WASM-library-for-browser.md) — the WASM API exposes only the eras defined here.

docs/ADR-005-cardano-testnet-node-configuration-file.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ However, moving the `NodeConfiguration` type and its accompanying types to `card
3636
# Consequences
3737

3838
This will allow users of testnets to check their node configuration file before starting their testnet, and so they will catch errors earlier and faster.
39+
40+
# Related ADRs
41+
42+
- [ADR-007](ADR-007-CLI-Output-Presentation.md) — CLI output conventions (stdout vs stderr) apply to this command.

docs/ADR-006-Using-optparse-applicative-main-repository.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,8 @@ The changes in the rendered help are still detrimental to the help text readabil
6868
* [Our 2021 PR](https://github.com/pcapriotti/optparse-applicative/pull/428) to `optparse-applicative`'s main repo.
6969
* [Our fork](https://github.com/input-output-hk/optparse-applicative) of optparse-applicative.
7070
* [Our 2024 PR](https://github.com/pcapriotti/optparse-applicative/pull/494) to `optparse-applicative`'s main repo.
71+
72+
# Related ADRs
73+
74+
- [ADR-012](ADR-012-standardise-CLI-multiple-choice-flags-construction.md) standardises CLI flag construction, which relies on the fork this ADR attempted to replace.
75+
- [ADR-013](ADR-013-Metavars-must-follow-screaming-snake-case.md) defines metavar naming conventions for the help text produced by the fork.

docs/ADR-007-CLI-Output-Presentation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ This will require updating them to make things consistent across all the command
3636
[unix-philosophy]: https://en.wikipedia.org/wiki/Unix_philosophy
3737
[bell-journal]: https://archive.org/details/bstj57-6-1899/mode/2up
3838

39+
# Related ADRs
40+
41+
- [ADR-005](ADR-005-cardano-testnet-node-configuration-file.md) introduces a new CLI command that should follow these output conventions.
42+
- [ADR-008](ADR-008-Use-RIO-in-cardano‐cli.md) addresses error handling and rendering in `cardano-cli`.
43+

docs/ADR-008-Use-RIO-in-cardano‐cli.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,8 @@ The purpose of `CustomCliException` is to represent explicitly thrown, structure
183183
- This should dramatically improve our code's composability and remove many unnecessary error types.
184184
- Readability concerning what errors can be thrown will be negatively impacted. However, `ExceptT` already lies about what exceptions can be thrown because it is not limited to the error type stated in `ExceptT`'s type signature. In other words, `IO` can implicitly throw other `Exception`s.
185185
- Initially, this will be adopted under the "compatible" group of commands so `cardano-cli` will have a design split temporarily. Once we are happy with the result we will propagate to the rest of `cardano-cli`
186+
187+
# Related ADRs
188+
189+
- [ADR-007](ADR-007-CLI-Output-Presentation.md) defines CLI output stream conventions (stdout vs stderr).
190+
- [ADR-011](ADR-011-Better-call-stacks-of-io-exceptions.md) extends this ADR with better call stacks for IO exceptions.

docs/ADR-009-cardano-api-exports-convention.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,10 @@ This however depends on the specific use case.
9090

9191
Acceptance of ADR will require rename of almost all cardano-api modules which will be a breaking change.
9292

93+
# Related ADRs
94+
95+
- [ADR-002](ADR-002-Module-structure-for-generators.md) defines generator module conventions (`Test.Gen.[Path]`, etc.).
96+
- [ADR-004](ADR-004-Support-only-for-mainnet-and-upcoming-eras.md) defines the eras exposed through `Cardano.Api.Experimental` and `Cardano.Api.Compatible`.
97+
- [ADR-010](ADR-010-cardano-api-script-witness-api.md) introduces new types that should be exported following these conventions.
98+
- [ADR-014](ADR-014-Total-conversion-functions-conventions.md) — placement of `Inject`/`Convert` instances should follow the module conventions defined here.
99+

docs/ADR-010-cardano-api-script-witness-api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,8 @@ Acceptance of this ADR will:
261261
- Improve the clarity of the witness and script apis
262262
- Make clearer the relationship between the redeemer pointers and the script witnesses
263263
- Allow us to use the new api "under the hood" of the old api reducing the maintenance burden of maintaining the old vs new api.
264+
265+
# Related ADRs
266+
267+
- [ADR-004](ADR-004-Support-only-for-mainnet-and-upcoming-eras.md) defines the available eras that parameterize the witness API.
268+
- [ADR-014](ADR-014-Total-conversion-functions-conventions.md) conversions between `cardano-api` and `cardano-ledger` types should use `Inject`/`Convert`.

docs/ADR-011-Better-call-stacks-of-io-exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
This ADR enriches exceptions thrown from `IO` functions with call stacks up to the function usage site.
88

99
## The problem
10-
This ADR bases on [[ADR-8-Use-RIO-in-cardano‐cli]].
10+
This ADR extends [ADR-008](ADR-008-Use-RIO-in-cardano‐cli.md).
1111

1212
The goal of this ADR is to provide better call stacks in `IO` exceptions.
1313
The problem with exceptions thrown from IO monad is that they do not carry call stack from where they were thrown.

0 commit comments

Comments
 (0)