feat: lockfile v2, index pin/unpin CLI, fetcher routing for custom indices#40
Merged
Conversation
5 tasks
…indices Lockfile v2: add [indices.<name>] sections with url/rev fields, add namespace field to [package.*] entries, and v1->v2 migration on load. CLI: add `mcpp index pin <name> [<rev>]` and `mcpp index unpin <name>` commands for pinning/unpinning custom index revisions in mcpp.toml. Enhance `mcpp index update` to also refresh project-level custom indices. Fetcher routing: for deps whose namespace matches a custom git index, check project-level .mcpp/data/ before the global xlings home. For local path indices, read xpkg.lua directly from the index path. E2E test covering lockfile v2 format, v1 migration, pin/unpin commands.
9a2d372 to
2e91734
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
Builds on #39 to complete the
[indices]feature with three components:[indices.<name>]sections lock index commit SHA +namespacefield per package entry, with automatic v1→v2 migrationmcpp index pin <name> [<rev>]andmcpp index unpin <name>for hard-locking indices in mcpp.toml.mcpp/data/, or global xlings home based on the index typeChanges
src/pm/lock_io.cppmLockedIndexstruct, v2 schema (indices sections + namespace), v1→v2 auto-migration, updated serialize/deserializesrc/lockfile.cppmLockedIndexsrc/cli.cppmcmd_index_pin(text-based mcpp.toml editing, short→long form conversion),cmd_index_unpin(rev field removal), enhancedcmd_index_update(project-level refresh), fetcher routing inprepare_buildviafindIndexForNshelper, v2 lockfile write with namespace + index entriessrc/pm/package_fetcher.cppmread_xpkg_lua_from_project_data()for.mcpp/data/scanning,install_path_from_project_data()for project-level xpkgstests/e2e/43_indices_lockfile.shLockfile v2 format
Fetcher routing logic
Test plan
mcpp buildcompiles successfully43_indices_lockfile.shpasses (v2 structure, pin/unpin, index list)42_custom_local_index.shpasses (no regression)01_help_and_version.shpasses (no regression)