Skip to content

Commit e878350

Browse files
committed
Switch to herald for releasing
1 parent b017a00 commit e878350

25 files changed

Lines changed: 1179 additions & 374 deletions

.cardano-dev.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
project: cardano-api
2+
pr: 1164
3+
kind:
4+
- maintenance
5+
description: |
6+
Switch releasing process to herald
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
project: cardano-rpc
2+
pr: 1149
3+
kind:
4+
- compatible
5+
description: |
6+
Add lower bound to proto-lens >= 0.7.1.6
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
project: cardano-rpc
2+
pr: 1134
3+
kind:
4+
- bugfix
5+
description: |
6+
gRPC: add tip timestamp to ChainPoint response
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
project: cardano-wasm
2+
pr: 1008
3+
kind:
4+
- feature
5+
description: |
6+
Add implementation for stake certificate creation in `cardano-wasm`
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project: cardano-api
2+
pr: 1182
3+
kind:
4+
- feature
5+
- breaking
6+
description: |
7+
Bump ouroboros-consensus to ^>=3.0 and plutus to ^>=1.61.
8+
The golden file changes come from upstream plutus changes to the TokenName Show instance.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
project: cardano-api
2+
pr: 1181
3+
kind:
4+
- breaking
5+
- bugfix
6+
description: |
7+
makeUnsignedTx now returns Either MakeUnsignedTxError and errors when
8+
Plutus scripts are present but protocol parameters are missing, instead
9+
of silently omitting the script integrity hash (script_data_hash).

.changes/_TEMPLATE.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog fragment template - copy this file and fill in the fields.
2+
# Or use 'herald new' for interactive creation.
3+
#
4+
# Files starting with _ are ignored by herald.
5+
#
6+
# Available projects and kinds are defined in .herald.yml
7+
8+
# Which project this change belongs to (see 'projects' in .herald.yml)
9+
# Uncomment exactly one:
10+
# project: cardano-api
11+
# project: cardano-api-gen
12+
# project: cardano-rpc
13+
# project: cardano-wasm
14+
15+
# Pull request number associated with this change
16+
pr: 0
17+
18+
# One or more change kinds (see 'kinds' in .herald.yml)
19+
kind:
20+
# - breaking # the API has changed in a breaking way
21+
# - feature # introduces a new feature
22+
# - compatible # the API has changed but is non-breaking
23+
# - bugfix # fixes a defect
24+
# - optimisation # measurable performance improvements
25+
# - documentation # change in code docs, haddocks
26+
# - refactoring # code quality improvements
27+
# - test # fixes or modifies tests
28+
# - maintenance # not directly related to the code
29+
# - release # related to a new release preparation
30+
description: |
31+
Describe your change here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
1-
# Changelog
2-
3-
```yaml
4-
- description: |
5-
<insert-changelog-description-here>
6-
# uncomment types applicable to the change:
7-
type:
8-
# - feature # introduces a new feature
9-
# - breaking # the API has changed in a breaking way
10-
# - compatible # the API has changed but is non-breaking
11-
# - optimisation # measurable performance improvements
12-
# - refactoring # QoL changes
13-
# - bugfix # fixes a defect
14-
# - test # fixes/modifies tests
15-
# - maintenance # not directly related to the code
16-
# - release # related to a new release preparation
17-
# - documentation # change in code docs, haddocks...
18-
# uncomment at least one main project this PR is associated with
19-
projects:
20-
# - cardano-api
21-
# - cardano-api-gen
22-
# - cardano-rpc
23-
# - cardano-wasm
24-
```
1+
<!--
2+
Every PR needs a changelog fragment in `.changes/`.
3+
Create one from the template at .changes/_TEMPLATE.yml, or use `herald` for interactive creation.
4+
Run herald with nix: nix run github:input-output-hk/cardano-dev#herald
5+
6+
Interactive:
7+
herald new
8+
9+
Non-interactive:
10+
herald new -p cardano-api -k bugfix -d "Fix something" --pr 1234
11+
12+
See .herald.yml for full configuration.
13+
-->
2514

2615
# Context
2716

@@ -36,6 +25,7 @@ Highlight important bits of the PR that will make the review faster. If there ar
3625
- [ ] Commit sequence broadly makes sense and commits have useful messages
3726
- [ ] New tests are added if needed and existing tests are updated. See [Running tests](https://github.com/input-output-hk/cardano-node-wiki/wiki/Running-tests) for more details
3827
- [ ] Self-reviewed the diff
28+
- [ ] Changelog fragment added in `.changes/`
3929

4030
<!--
4131
### Note on CI ###

.github/copilot-instructions.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,81 @@ source-repository-package
3030
```
3131

3232
These lines are **comments** (ignored by cabal) but are consumed by Nix tooling to fetch the package source. The hash is computed using a different fetch method than the `sha256` in `flake.nix` (which uses `fetchgit`), so the two values will **intentionally differ**. Do **not** flag a mismatch between a `--sha256:` comment in `cabal.project` and the corresponding `sha256` in `flake.nix` as an error.
33+
34+
## Breaking Change Detection (CRITICAL)
35+
36+
When reviewing PRs, you MUST rigorously check for breaking changes and verify they are correctly classified in the changelog fragment (`.changes/*.yml`). This is the single most important aspect of PR review for this project. cardano-api is a foundational library -- downstream consumers (cardano-cli, cardano-node, dApps, tooling) break silently when we get this wrong.
37+
38+
### What constitutes a breaking change
39+
40+
Any of the following in an **exposed module** is a breaking change. Exposed modules are those listed under `exposed-modules:` in the `library` stanza of a `.cabal` file. Changes to `other-modules:` (internal modules) are NOT breaking unless they affect the behaviour of exposed API.
41+
42+
#### Type-level breaks
43+
- Removing or renaming an exported type, data constructor, type class, or type family
44+
- Adding a field to a record that uses non-record syntax (positional constructors)
45+
- Adding a required field to a record constructor (even with named fields)
46+
- Removing a field from any data constructor
47+
- Changing the type of an existing field or function argument
48+
- Changing a type synonym or type family equation
49+
- Narrowing a type signature (making it less polymorphic) on an exported function
50+
- Adding a new constraint to an exported function's type signature
51+
- Changing the kind of a type variable
52+
- Removing a type class instance that was previously exported
53+
54+
#### Value-level breaks
55+
- Removing or renaming an exported function or value
56+
- Changing the number or order of arguments to an exported function
57+
- Changing default values or smart constructor behaviour in ways that alter semantics
58+
- Changing the semantics of an exported function (different return value for same input) -- this is a **behavioural** break even if the type signature is unchanged
59+
60+
#### Module-level breaks
61+
- Removing an exposed module entirely
62+
- Removing re-exports from an exposed module (e.g. a module that re-exported `Foo(..)` no longer does)
63+
- Moving a definition from an exposed module to an internal module without re-exporting it
64+
65+
#### Dependency-level breaks
66+
- Bumping a major version of a dependency that is transitively exposed in the public API (e.g. types from `cardano-ledger-api` appear in cardano-api's signatures)
67+
- Removing a dependency whose types appear in the public API
68+
69+
#### Things that are NOT breaking
70+
- Adding new exported functions, types, or modules (this is `feature` or `compatible`)
71+
- Adding new type class instances (unless orphans that could cause overlap)
72+
- Adding optional fields with defaults to records using `HasField` / lenses
73+
- Changes to internal modules (`Cardano.Api.Internal.*`, `other-modules:`) that do not change exposed behaviour
74+
- Documentation, test, or refactoring changes with no API surface impact
75+
- Performance improvements with identical semantics
76+
77+
### Verifying the changelog fragment
78+
79+
Every PR must include a `.changes/*.yml` file. When reviewing:
80+
81+
1. **Check the `kind:` field** -- if the PR contains ANY breaking change from the list above, the kind MUST include `breaking`. A PR marked as `feature`, `compatible`, `bugfix`, or anything else that introduces a breaking change is **incorrectly classified** and must be flagged.
82+
83+
2. **Check the `project:` field** -- the project must match whichever package's exposed API changed. The projects are: `cardano-api`, `cardano-api-gen`, `cardano-rpc`, `cardano-wasm`.
84+
85+
3. **Check the `description:`** -- for breaking changes, the description MUST clearly state what broke and what downstream consumers need to do to adapt. Vague descriptions like "update API" are not acceptable for breaking changes.
86+
87+
4. **If no changelog fragment exists**, flag the PR as incomplete. Every PR requires one.
88+
89+
5. **If multiple packages are affected**, there should be separate changelog fragments for each, or a single fragment listing multiple projects.
90+
91+
### How to review for breaking changes
92+
93+
When reviewing a diff:
94+
95+
1. First, identify which files are in exposed modules by cross-referencing with the `exposed-modules:` list in the relevant `.cabal` file.
96+
2. For each changed exposed module, check every removed or modified line against the breaking change categories above.
97+
3. Pay special attention to:
98+
- Removed exports in module headers (`module Foo (thing1, thing2, ...)`)
99+
- Changed type signatures
100+
- Modified data type definitions
101+
- Removed or renamed pattern synonyms
102+
- Changes to re-export modules like `Cardano.Api` (the main entry point re-exports heavily)
103+
4. If a change touches `Cardano.Api` or `Cardano.Api.Experimental` (the main re-export modules), scrutinize especially carefully -- these are the most widely imported modules.
104+
105+
### Err on the side of caution
106+
107+
When uncertain whether something is breaking:
108+
- **Flag it as potentially breaking** and ask the author to confirm
109+
- It is far worse to miss a breaking change than to over-flag one
110+
- A false positive costs a conversation; a false negative costs every downstream consumer

0 commit comments

Comments
 (0)