Remove version-forcing and use 0.cabal whenever it exists#119
Remove version-forcing and use 0.cabal whenever it exists#119neilmayhew merged 4 commits intomainfrom
0.cabal whenever it exists#119Conversation
This makes available the functionality that was previously used on the fly when a package version is forced. Now, it should be done ahead of time and stored along with the metadata in the git repo, to ensure future reproducability.
|
|
There was a problem hiding this comment.
Pull request overview
This PR removes the metadata-driven “force version” mechanism and instead standardizes on using a stored revisions/0.cabal file whenever it exists, plus adds a CLI command to rewrite a Cabal file’s version.
Changes:
- Remove
force-versionfrommeta.tomlschema and downstream data flow/metadata output. - In source preparation, copy
revisions/0.cabalinto the extracted source tree when present. - Add
foliage rewrite-version VERSION FILEcommand and remove the oldUpdateCabalFilemodule.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
foliage.cabal |
Wire in new CmdRewriteVersion module; drop removed UpdateCabalFile. |
app/Main.hs |
Route new RewriteVersion command to its handler. |
app/Foliage/UpdateCabalFile.hs |
Delete old Cabal rewriting helper module. |
app/Foliage/PrepareSource.hs |
Copy revisions/0.cabal into the source tree when available; remove force-version gating. |
app/Foliage/PreparePackageVersion.hs |
Remove pkgVersionForce from prepared package representation. |
app/Foliage/Options.hs |
Add rewrite-version subcommand and Command constructor. |
app/Foliage/Meta.hs |
Remove force-version field from PackageVersionSpec and TOML codec. |
app/Foliage/CmdRewriteVersion.hs |
New implementation for rewriting a Cabal file’s version from CLI input. |
app/Foliage/CmdImportIndex.hs |
Stop emitting packageVersionForce in imported metadata. |
app/Foliage/CmdBuild.hs |
Stop emitting forced-version metadata field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I didn't deprecate use of the |
|
I took out the |
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 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 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 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 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 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 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 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 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 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 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 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.
See #118 for the suggestion