Skip to content

Update foliage and make required changes#1271

Merged
neilmayhew merged 7 commits intomainfrom
nm/foliage-update
Mar 20, 2026
Merged

Update foliage and make required changes#1271
neilmayhew merged 7 commits intomainfrom
nm/foliage-update

Conversation

@neilmayhew
Copy link
Copy Markdown
Contributor

@neilmayhew neilmayhew commented Feb 20, 2026

This brings in input-output-hk/foliage#119 which drops the force-version field and uses only the presence of a revision-0 cabal file to determine whether the upstream cabal file needs to be overwritten.

Also:

  • Stop writing a force-version field in add-from-github
  • Drop all uses of the force-version field in the existing metadata files
  • Exclude the forced-version field when comparing package metadata (temporary change)
  • Make small improvements to the local-ci script that were helpful for testing this change

Note: The necessary revision-0 files were added to CHaP a while ago, but without using the version of foliage that requires them.

@neilmayhew neilmayhew requested a review from a team as a code owner February 20, 2026 00:03
@neilmayhew neilmayhew marked this pull request as draft February 20, 2026 00:04
@neilmayhew neilmayhew marked this pull request as ready for review February 20, 2026 00:06
@neilmayhew neilmayhew marked this pull request as draft February 20, 2026 04:56
@neilmayhew
Copy link
Copy Markdown
Contributor Author

I'm keeping this a draft until input-output-hk/foliage#119 is merged

@neilmayhew neilmayhew marked this pull request as ready for review February 20, 2026 05:05
@neilmayhew neilmayhew removed the request for review from a team February 20, 2026 05:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the foliage dependency to a version that changes how package version overwriting is handled. Instead of using an explicit force-version field in metadata files, the new version determines whether to overwrite versions based solely on the presence of revision-0 cabal files.

Changes:

  • Updated foliage dependency from rev 5283d01 to rev 94644ae (input-output-hk/foliage#119)
  • Removed all force-version = true fields from 53 package metadata files in _sources/
  • Modified add-from-github.sh to stop writing the force-version field when adding new packages
  • Updated compare-package-metadata.sh to temporarily filter out forced-version field during metadata comparison
  • Enhanced local-ci.sh to use revision-specific flake references and added archive extension validation

Reviewed changes

Copilot reviewed 48 out of 49 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
flake.lock Updates foliage dependency to version that drops force-version field support
scripts/local-ci.sh Adds revision-specific nix develop reference and archive extension check for better CI validation
scripts/compare-package-metadata.sh Filters forced-version field from OLD metadata to enable clean comparison during transition
scripts/add-from-github.sh Removes code that writes force-version field when adding packages from GitHub
_sources/*/meta.toml (53 files) Removes force-version = true field from all package metadata files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@angerman angerman force-pushed the nm/foliage-update branch from 1c5d6a8 to b87057c Compare March 9, 2026 04:36
@angerman
Copy link
Copy Markdown
Contributor

angerman commented Mar 9, 2026

@neilmayhew oof, after rebase everything fails now :(

@neilmayhew
Copy link
Copy Markdown
Contributor Author

@neilmayhew oof, after rebase everything fails now :(

I believe this is an upstream problem due to a recent change on Hackage. I'll wait a couple of days to see what happens with that and then try updating the Hackage index again.

@neilmayhew
Copy link
Copy Markdown
Contributor Author

neilmayhew commented Mar 9, 2026

I believe this is an upstream problem due to a recent change on Hackage

It's actually a problem on our main caused by f19c8f8. Updating the CHaP input (#1287) fixes it.

@neilmayhew neilmayhew force-pushed the nm/foliage-update branch 4 times, most recently from 23fa5c4 to a678bfa Compare March 10, 2026 03:53
@neilmayhew neilmayhew requested a review from andreabedini March 11, 2026 18:20
Copy link
Copy Markdown
Contributor

@andreabedini andreabedini left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Well executed plan @neilmayhew!

Occasionally the download-artifact action doesn't clean up after itself
and leaves behind a directory with the same name as the one we're about
to create.
This brings in input-output-hk/foliage#119 which drops the
`force-version` field and uses only the presence of a revision-0 cabal
file to determine whether the upstream cabal file needs to be
overwritten.
This is necessary to avoid false positives when detecting new packages
to build in CI

This commit can be reverted after #1271 is merged
@neilmayhew neilmayhew enabled auto-merge (rebase) March 20, 2026 14:46
@neilmayhew neilmayhew merged commit 2c3eef7 into main Mar 20, 2026
10 checks passed
@neilmayhew neilmayhew deleted the nm/foliage-update branch March 20, 2026 14:55
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