Skip to content

Comments

Revert foliage changes#1246

Merged
neilmayhew merged 1 commit intomainfrom
nm/foliage-revert
Feb 10, 2026
Merged

Revert foliage changes#1246
neilmayhew merged 1 commit intomainfrom
nm/foliage-revert

Conversation

@neilmayhew
Copy link
Contributor

There's a subtle difference in the built repo between when foliage is run on a PR branch and run on main. Currently this is:

2,3c2,3
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 25893888 2026-02-09 00:00 ./01-index.tar
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 3930889 2026-02-09 00:00 ./01-index.tar.gz
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 25893376 2026-02-09 00:00 ./01-index.tar
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 3930832 2026-02-09 00:00 ./01-index.tar.gz
9858c9858
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 27208 2026-02-09 00:00 ./package/plutus-core-1.0.0.1/revision/0.cabal
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 27088 2026-02-09 00:00 ./package/plutus-core-1.0.0.1/revision/0.cabal
9860c9860
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 903734 2026-02-09 00:00 ./package/plutus-core-1.0.0.1.tar.gz
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 903717 2026-02-09 00:00 ./package/plutus-core-1.0.0.1.tar.gz
10170c10170
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 34621 2026-02-09 00:00 ./package/plutus-core-1.5.0.0/revision/0.cabal
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 34545 2026-02-09 00:00 ./package/plutus-core-1.5.0.0/revision/0.cabal
10172c10172
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 1056670 2026-02-09 00:00 ./package/plutus-core-1.5.0.0.tar.gz
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 1056652 2026-02-09 00:00 ./package/plutus-core-1.5.0.0.tar.gz
10611,10612c10611,10612
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 4780 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0/index.html
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6197 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0/plutus-ledger-api.cabal
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 4820 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0/index.html
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6189 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0/plutus-ledger-api.cabal
10614,10615c10614,10615
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6197 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0/revision/0.cabal
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 53567 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0.tar.gz
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6189 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0/revision/0.cabal
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 53557 2026-02-09 00:00 ./package/plutus-ledger-api-1.5.0.0.tar.gz
11167c11167
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 5469 2026-02-09 00:00 ./package/plutus-tx-1.5.0.0/plutus-tx.cabal
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 5473 2026-02-09 00:00 ./package/plutus-tx-1.5.0.0/plutus-tx.cabal
11169,11170c11169,11170
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 5469 2026-02-09 00:00 ./package/plutus-tx-1.5.0.0/revision/0.cabal
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 75851 2026-02-09 00:00 ./package/plutus-tx-1.5.0.0.tar.gz
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 5473 2026-02-09 00:00 ./package/plutus-tx-1.5.0.0/revision/0.cabal
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 75850 2026-02-09 00:00 ./package/plutus-tx-1.5.0.0.tar.gz
11564c11564
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6073 2026-02-09 00:00 ./package/plutus-tx-plugin-1.5.0.0/plutus-tx-plugin.cabal
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6077 2026-02-09 00:00 ./package/plutus-tx-plugin-1.5.0.0/plutus-tx-plugin.cabal
11566,11567c11566,11567
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6073 2026-02-09 00:00 ./package/plutus-tx-plugin-1.5.0.0/revision/0.cabal
< -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 71253 2026-02-09 00:00 ./package/plutus-tx-plugin-1.5.0.0.tar.gz
---
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 6077 2026-02-09 00:00 ./package/plutus-tx-plugin-1.5.0.0/revision/0.cabal
> -rw-r--r-- github-runner-CHaP-3/github-runner-CHaP-3 71252 2026-02-09 00:00 ./package/plutus-tx-plugin-1.5.0.0.tar.gz

I'm not sure yet of the reason for this, so I'm reverting for the time being and will analyze more fully before trying again.

* Revert "Update foliage flake input"
  This reverts commit 708cb3c.

* Revert "Update all flake inputs except foliage"
  This reverts commit e82b45c.
@neilmayhew neilmayhew enabled auto-merge (rebase) February 10, 2026 01:04
@neilmayhew neilmayhew merged commit 2385cbf into main Feb 10, 2026
7 of 109 checks passed
@neilmayhew neilmayhew deleted the nm/foliage-revert branch February 10, 2026 01:16
@angerman
Copy link
Contributor

@neilmayhew so my understanding (after asking AI to dig into it a bit) is as follows:
The primary culprit is the update of the Cabal library; The Cabal 3.10→3.14 pretty-printer produces visibly different output.

Root Cause: Foliage's rewritePackageVersion function uses a parse-and-rerender approach (readGenericPackageDescription → modify version → writeGenericPackageDescription).
The Foliage update bumped the Cabal library from 3.10 to 3.14+, and the Cabal 3.14 pretty-printer produces different output for 5 complex Plutus .cabal files. This changes their byte sizes in the 01-index.tar, which the check-archive-extension.sh script detects as entries "missing from the new index" (really just different sizes for the same files).

Supposedly:

  Cabal 3.14 pretty-printer changes:

  1. Library subset syntax spacing: {plutus-core, plutus-ir} → {plutus-core,plutus-ir} (spaces removed after commas)
  2. Dependency consolidation: Separate library deps merged into subset notation, e.g.:
  -- OLD (Cabal 3.10):
  plutus-ledger-api ^>=1.5,
  plutus-ledger-api-testlib ^>=1.5,

  -- NEW (Cabal 3.14):
  plutus-ledger-api:{plutus-ledger-api,plutus-ledger-api-testlib} ^>=1.5,

@angerman
Copy link
Contributor

I think resetting the build repo seems like a sensible solution here. Anything else seems like we end up massive hacking around, or trying to fix Cabal upstream. Maybe that is a solution?

@neilmayhew
Copy link
Contributor Author

neilmayhew commented Feb 10, 2026

This does seem to be the cause of the problem. However, foliage rewrites Cabal files only when the meta.toml contains force-version = true. We don't have many instances of that, and in most cases the rewriting doesn't matter because the packages are old enough that they don't use subsets. The only packages for which it matters are the ones listed above, which explains why we don't see large numbers of differences.

At least one of those (plutus-core-1.5.0.0) can be worked around because the forced version is no different to the original version. I'm checking to see if there's a similar workaround for the others.

The force-version field tells foliage to replace the version in the cabal file that's taken from the git commit with the one from the metadata (which is taken from the directory name of the metadata file).

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.

2 participants