feat: indices E2E integration - auto-clone, install routing, workspace inheritance#41
Merged
Merged
Conversation
9a2d372 to
2e91734
Compare
2fe10e4 to
0dec526
Compare
…e inheritance Fix 6 gaps that prevented end-to-end usability of the [indices] feature: 1. Auto-clone custom git indices on first build: after ensure_project_index_dir() seeds .mcpp/.xlings.json, check if .mcpp/data/ is empty and trigger xlings update to actually clone the repos before dependency resolution. 2. Custom git index install routing: use project-level xlings env (XLINGS_PROJECT_DIR) when installing packages from custom git indices, so they land in .mcpp/data/xpkgs/ and the custom index clone is visible. 3. Local path index install flow: remove the dead-end fall-through for local path indices. Local indices are for DISCOVERY only (finding xpkg.lua); actual artifacts come from URLs in the lua via normal install flow. 4. Workspace [indices] inheritance: members without their own [indices] section now inherit from the workspace root, matching the existing pattern for toolchain and target overrides. 5. Deterministic lockfile hashes: replace placeholder "sha:<from-xlings>" with fnv1a hash of namespace:name@version. Honest about what we have. 6. Lock skip for custom indices: verified that the existing install_path check already prevents re-download on subsequent builds when packages are installed, so no additional wiring needed.
0dec526 to
046811b
Compare
Merged
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.
Summary
Closes the 6 gaps that prevented the
[indices]feature from being end-to-end usable.Builds on #39 (IndexSpec + parsing) and #40 (lockfile v2 + CLI + routing scaffolding).
Gaps fixed
prepare_buildchecks if.mcpp/data/has index repos; if empty, callsxlings::update_index(projEnv)before dep resolutionloadVersionDepuses project-level xlings env (XLINGS_PROJECT_DIR) for install, formats target asindexName:shortName@version[indices]"sha:<from-xlings>"with"index+<ns>@<version>"source and"fnv1a:<hash>"deterministic hashinstall_path+install_path_from_project_datachecks already skip re-download. No code change neededChanges
src/cli.cppmprepare_buildandloadVersionDeptests/e2e/44_indices_e2e_integration.shEnd-to-end flow (after all 3 PRs)
Test plan
mcpp buildcompiles successfully44_indices_e2e_integration.shpasses (5 tests)42_custom_local_index.shpasses (no regression)43_indices_lockfile.shpasses (no regression)01_help_and_version.shpasses (no regression)