You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve SemVer constraints through the index route, not the registry (#309)
`resolve_semver` / `try_merge_semver` took a `Fetcher&` and called
`read_xpkg_lua` on it, which only ever reads the shared registry under
`<XLINGS_HOME>/data`. Candidate selection, meanwhile, dispatches across all
three descriptor transports (local path index, project clone, registry).
The split meant a package served by a project `[indices]` entry resolved
fine as an exact version and failed the moment the same dependency carried
a constraint:
dependency 'acme.util' has SemVer constraint '^2.0' but the index entry
isn't cloned locally yet — run `mcpp index update` first
— advice that does nothing for a local path index, leaving no way forward.
Both functions now take `const IndexRoute&`, so the descriptor is reached
the same way everywhere. `mcpp new --template` passes a route with no
project indices, which is what it always meant: there is no project yet.
The not-found message drops the `mcpp index update` hint when a local path
index is what would have answered.
`prepare.cppm`'s `index_route` lambda moves above `resolveSemver` so the
resolver call can use it; nothing else about it changes.
Closes#308
Co-authored-by: sunrisepeak <speakshen@163.com>
0 commit comments