Skip to content

feat(model): a version entry's packaging revision (0.0.58) - #1

Closed
speak-agent wants to merge 1 commit into
mainfrom
feat/recipe-revision
Closed

speak-agent wants to merge 1 commit into
mainfrom
feat/recipe-revision

Conversation

@speak-agent

Copy link
Copy Markdown
Owner

Summary

A version entry may state revision, a non-negative integer that counts changes to what the recipe installs under an unchanged upstream version. An entry that states none, or states a value that is not a non-negative integer, reads as revision 0.

  • PlatformResource::revision (src/xpkg.cppm), read by the loader from the entry table itself (src/xpkg-loader.cppm). Every resource shape carries it the same way: single url, mirror map, per-arch map, template and res. A ref alias carries none.
  • Version 0.0.58 (mcpp.toml, mcpp.lock).

This is the only change the reference implementation needs for openxlings/xlings#620. The decision that uses the field belongs to the client: a recorded revision that differs from the recipe's means the payload is not installed. The xpkg V2 specification states that contract (openxlings/xim-pkgindex, docs/V2/xpackage-spec.md).

Compatibility

The change is additive in both directions. A client built on 0.0.57 ignores the key, and a recipe may state it before any client reads it.

Tests

  • Fixture tests/fixtures/pkgindex/pkgs/v/v2revision.lua.
  • V2_Revision_ParsedPerVersionEntry (tests/test_loader.cpp) covers stated, absent and malformed values across the resource shapes.
  • The full loader test suite passes locally.

Ecosystem

Repository Change
openxlings/xlings records the installed revision; reinstalls when the recipe's differs; reports install_targets
openxlings/xim-pkgindex V2 spec revision; CI guard; glibc 2.44.3 revision 1
mcpp-community/mcpp reads the revision in dependency completeness and the runtime contract

This PR is merged first, because xlings pins libxpkg 0.0.58.


🤖 Generated with Claude Code

https://claude.ai/code/session_01MajuX4J8ewFeWvZJjzRJt5


Generated by Claude Code

A version entry may state `revision`, a non-negative integer that counts
changes to what the recipe installs under an unchanged upstream version.
An entry that states none, and an entry whose value is not a non-negative
integer, reads as revision 0. The loader reads the field from the entry
table itself, so every resource shape (single url, mirror map, per-arch
map, template, res) carries it the same way; a `ref` alias carries none.

This is the one addition the reference implementation needs for
openxlings/xlings#620. The decision that uses the field -- a recorded
revision that differs from the recipe's means not installed -- belongs to
the client, and the contract is stated in the xpkg V2 specification. The
V2 compatibility rule makes the addition safe in both directions: a client
built on 0.0.57 ignores the key, and a recipe may state it before any
client reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MajuX4J8ewFeWvZJjzRJt5
@speak-agent

Copy link
Copy Markdown
Owner Author

Superseded by openxlings#42.

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