Repository navigation
fix(loader): a recipe outside an index is read with the host's index libs (0.0.69) - #56
Merged
Merged
Conversation
…libs, as its hooks run (0.0.69) load_package re-runs a spec 3 recipe's top level in the spec 3 environment (check_spec3_top_level), and that run took index libs only from the recipe's own index, three levels up. The executor's top level already read the host's index for a recipe in no index with libs (ReadTarget::pkgindex_dir), so a recipe the host keeps outside an index -- xlings' local overlay (`config --add-xpkg`), a recipe given by path -- installed but could not be read: "import: "xim.pkgindex.sysroot": this recipe is not in an index, which has no libs". Found by xim-pkgindex's registration test with xlings 2026.12.5.1. LoaderContext gains pkgindex_dir, the host's answer, and the check uses it the way the executor does: the recipe's own index first. The specification states it (§6.2); 0.0.69. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…t's context build_index_impl's branch without boundaries read each recipe with an empty context and skipped what failed to load, so a host building its local overlay in process (xlings with no policy, the common home) left out a recipe that imports the host's index libs at its top level, silently. build_index(repo, ns, context, output) is that builder with the host's context (platform, architecture, pkgindex_dir); the three-argument one is unchanged (an empty context). Test: an index without libs built with the host's context has the recipe, and without it does not. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What | 内容
load_packagere-runs a spec 3 recipe's top level in the spec 3 environment (check_spec3_top_level). That run read index libs only from the recipe's own index, three levels up the path. The executor's top level already used the host's index for a recipe in no index with libs (ReadTarget::pkgindex_dir, 0.0.68). So a recipe the host keeps outside an index could be installed but not read:That covers xlings' local overlay (
xlings config --add-xpkg) and a recipe given by path. xim-pkgindex's registration test found it with xlings 2026.12.5.1 (openxlings/xim-pkgindex#1477).LoaderContextgainspkgindex_dir, the host's answer. The top-level check uses it the way the executor does: the recipe's own index comes first.Spec3EnvTest.ALoadedRecipeOutsideAnIndexReadsTheHostsIndexLibscovers three cases:Verification | 验证
mcpp test: 15 test programs, all passed. xlings passespkgindex_root_for(recipe)in its metadata reads (openxlings/xlings#752).Authorship | 作者
Authorship: ai-and-human