Skip to content

Conversation

Lucsanszky
Copy link
Contributor

@Lucsanszky Lucsanszky commented Sep 26, 2025

Description

This PR adds a simple safeguard to CI that checks if CHANGELOGs need bumping, using our existing bump-changelogs.sh script.

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@Lucsanszky Lucsanszky force-pushed the ldan/check-changelogs branch 3 times, most recently from 86f8838 to 2e7838b Compare October 6, 2025 19:59
@Lucsanszky
Copy link
Contributor Author

Here's a demonstration of how this will look in action: https://github.com/IntersectMBO/cardano-ledger/actions/runs/18292660765/job/52083448456

@Lucsanszky Lucsanszky marked this pull request as ready for review October 6, 2025 20:04
@Lucsanszky Lucsanszky requested a review from a team as a code owner October 6, 2025 20:04
@Lucsanszky Lucsanszky enabled auto-merge (squash) October 6, 2025 20:05
CHAP=./cardano-haskell-packages
# Download a shallow copy of CHaP
git clone --depth 1 git@github.com:IntersectMBO/cardano-haskell-packages.git $CHAP
git clone --depth 1 https://github.com/IntersectMBO/cardano-haskell-packages $CHAP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't work on CI via SSH, probably because the key is not configured their, so reverting to HTTPS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can alternatively fetch a tarball using the archive URL.

However, even better I think is to use the CHaP index file rather than the repo. Although the git repo and the package repo should never be out of step, using the index guarantees that you see exactly what Cabal sees. It also avoids having to run a script to calculate the package list from the repo state.

You can see an example of doing this in a script I added to the CHaP git repo.

I think downloading the index file may also be a little faster because it's smaller than the whole repo.

@neilmayhew
Copy link
Contributor

neilmayhew commented Oct 7, 2025

BTW, I couldn't comment on this in the review because the line isn't changed in this PR, but I think it would be better to use git ls-files here rather than find:

CABAL_FILES=$(find . -wholename '*/eras/*.cabal' -o -wholename '*/libs/*.cabal')

find will end up searching dist-newstyle and other ignored directories (to depth 1, at least) and will also pick up stray cabal files that haven't been added to git.

With git ls-files it would look like this:

CABAL_FILES=$(git ls-files 'eras/*.cabal' 'libs/*.cabal')

However, this also works and is simpler:

CABAL_FILES=$(git ls-files '*.cabal')

@Lucsanszky Lucsanszky force-pushed the ldan/check-changelogs branch from a5cec43 to 7b233b8 Compare October 7, 2025 22:32
Comment on lines -3 to -6
## 1.1.2.1

*

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this section is not correct. So, this change is here to test whether this new CI check works correctly or not, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants