Skip to content

fix(loader): platform inheritance (ref/inherits) and a version's min_client (0.0.64) - #49

Merged
Sunrisepeak merged 2 commits into
mainfrom
fix/platform-inherits
Oct 16, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
fix/platform-inherits

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • xpm.inherits was parsed and never used. A platform written in the V1 form macosx = { ref = "linux" } became a version named ref whose url was "linux"; xlings then installed xim:luban-fonts@ref on macOS and Windows and failed with download failed: Only HTTPS is supported.
  • Both spellings (inherits = "<platform>", { ref = "<platform>" }) now record inheritance. After parsing, resolve_inheritance gives each inheriting platform the versions it lacks and, when it declares none, the deps, runtime_deps, build_deps, exports and source of the platform it inherits. The chain is followed and stops at a cycle or an unknown platform. A platform-level ref is no longer read as a version.
  • A version entry may name the oldest client that can use it: min_client = "2026.10.16.1" → PlatformResource::min_client. A client resolving a package with no version named passes over the versions it cannot use before fetching anything (xlings: a Luban edition newer than the client).
  • Version 0.0.64; docs/architecture.md describes both.

Test

  • mcpp test: LoaderTest.PlatformReferenceIsInheritanceNotAVersion, LoaderTest.InheritingPlatformKeepsItsOwnVersionsAndFollowsChains (V1 reference, inherits with own versions, a chain, a cycle), LoaderTest.AVersionNamesTheOldestClientThatCanUseIt; all suites pass.

Consumed by xlings 2026.10.16.2. The index no longer relies on the alias form (xim-pkgindex#987).

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 2 commits October 16, 2026 23:58
…nherits, and the loader fills it in (0.0.64)

`xpm.inherits` was parsed and never used, and a platform written in the V1
form `macosx = { ref = "linux" }` became a version named "ref" whose url
was "linux" (xlings: `xim:luban-fonts@ref ... Only HTTPS is supported` on
macOS and Windows). Both spellings now record inheritance; after parsing,
each inheriting platform receives the versions it lacks and, when it has
none of its own, the deps, exports and source of the platform it inherits,
along the chain, stopping at a cycle or an unknown platform.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… (min_client)

`["2026.10.16.1"] = { min_client = "2026.10.16.1" }` is parsed into
PlatformResource::min_client, so a client resolving a package with no
version named can pass over the versions it cannot use, before fetching
anything (xlings: a Luban edition newer than the client).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak Sunrisepeak changed the title fix(loader): a platform-level ref or inherits names the platform it inherits (0.0.64) fix(loader): platform inheritance (ref/inherits) and a version's min_client (0.0.64) Oct 16, 2026
@Sunrisepeak
Sunrisepeak merged commit 083f271 into main Oct 16, 2026
1 check passed
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.

1 participant