Skip to content

libxpkg 0.0.53: install_dir says why it has no answer (openxlings/xlings#487) - #37

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/install-dir-diagnostic
Aug 6, 2026
Merged

libxpkg 0.0.53: install_dir says why it has no answer (openxlings/xlings#487)#37
Sunrisepeak merged 1 commit into
mainfrom
fix/install-dir-diagnostic

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Fixes the diagnostic half of openxlings/xlings#487.

The message named an internal state

cannot get install dir for xim:libcuda-host-link@0.0.1 covers two causes
that point in opposite directions:

cause where the reader should look
not a dependency of this package on this platform the recipe's platform sections / the hook's branch
declared here, but the payload never landed the dependency install

The old message pointed at neither, and the issue reasonably read it as a
path problem — hypothesising that dependency resolution was not filtering by
platform.

It was neither of those

Resolution is platform-filtered (resolver.cppm:
pkg->xpm.runtime_deps.find(platform)), and the recipe was right too —
ollama declares the CUDA sentinel only under xpm.linux. The real cause was
ollama's install hook branching on is_host("windows") when the real
distinction was linux, so macOS took the linux path and asked for a
package macOS never resolves. That half is fixed in the index
(openxlings/xim-pkgindex#532).

What changed

deps_list is what the resolver produced for this platform, so a name
missing from it is not "unresolvable" — it is "not a dependency here". The
message now says which of the two cases it is, and names the package asked
for, the platform, and what the deps here actually are:

install dir for xim:linux-only-thing@0.0.1: NOT a dependency of ollama on
this platform (macosx). Its deps here are: xim:something-else@1.0.0. A
package declared only under another platform's xpm section is never resolved
on this one -- guard the hook that asks for it with the platform it belongs
to.

Two tests, one per branch. The declared-but-absent test asserts the platform
wording is absent — describing an incomplete install as a platform
mismatch would send the reader to the same wrong place, one door down. The
Lua log goes to the process's stdout rather than HookResult::output, so
they capture it.

117 tests pass.

"cannot get install dir for xim:libcuda-host-link@0.0.1" names an
internal state, and it covers two causes that point in opposite
directions:

  - the package is not a dependency of this package on this platform;
  - it is, but its payload never landed.

The first sends the reader to the recipe's platform sections. The second
sends them to the dependency install. The old message sent them to
neither -- openxlings/xlings#487 read it as a path problem and
hypothesised that dependency resolution was not filtering by platform.

It is filtered (xlings resolver.cppm: `runtime_deps.find(platform)`), and
the recipe was correct too -- ollama declares the CUDA sentinel only
under `xpm.linux`. The actual cause was ollama's install hook branching
on `is_host("windows")` when the real distinction was linux, so macOS
took the linux path and asked for a package macOS never resolves. Fixed
separately in the index.

`deps_list` is what the resolver produced FOR THIS PLATFORM, so a name
missing from it is not "unresolvable" -- it is "not a dependency here".
The message now says which of the two it is, names the package asked
for, the platform, and what the deps actually are.

Two tests, one per branch. The declared-but-absent case asserts the
platform wording is ABSENT: describing an incomplete install as a
platform mismatch would send the reader to the same wrong place, one
door down. The Lua log goes to the process's stdout rather than
HookResult::output, so they capture it.
@Sunrisepeak
Sunrisepeak merged commit 2feb189 into main Aug 6, 2026
1 check passed
@Sunrisepeak
Sunrisepeak deleted the fix/install-dir-diagnostic branch August 6, 2026 06:47
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