feat(rfc-0040): implement version_info() for toolchain version indirection#746
Open
feat(rfc-0040): implement version_info() for toolchain version indirection#746
Conversation
…ction Add version_info() to provider.star DSL. Rust provider now stores by rustc version (O(1) check). lock.rs uses version_info() first.
3e033df to
eff2474
Compare
When stdout is not a TTY (e.g., test runner, CI), OutputRenderer auto-upgrades to JSON format. The where command outputs JSON with 'source: not_found' instead of human-readable 'not found' text. Updated 4 failing tests to also match 'not_found' (JSON source field): - test_where_unknown_tool - test_where_system_installed_tool - test_where_multiple_tools - test_imagemagick_where_detects_system
- Add cancelled state as acceptable in check_job function - Introduce check_optional_job for conditional jobs (test-full, cross-build, coverage, docs) - Only core jobs (build, test-targeted, code-quality, etc.) are strictly required - Conditional jobs that are legitimately skipped no longer cause CI failure
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
Implement RFC 0040: Toolchain Version Indirection —
version_info()Provider Interface.Solves the version mismatch in Rust support: users write
rust = "1.93.1"(rustc) invx.toml, but vx downloads rustup (e.g., 1.28.1). Previously this caused O(n) store scanning invx checkand complex passthrough logic invx lock.Changes
Core:
version_info()Provider InterfaceVersionInfoResultstruct +version_info()toRuntimetrait (defaultNone)VersionInfoResult::from_json(),execute_version_info(), bridgemake_version_info_fn_owned()version_info_fninto everyManifestDrivenRuntimeRust Provider (
vx-providers/rust/provider.star)version_info()mapping rustc versions → store layout + install paramspost_extract()to usectx.install_params["toolchain"]instead of hardcoded "stable"Lock Command Integration
resolve_tool_version()callsversion_info()first; usesstore_asfor lock version, fetches latest installer whendownload_versionisNoneTests (49 total)
from_json()parsing (null, valid, partial, edge cases) +StarlarkProvider::version_info()integrationeffective_store_version(), Rust/Python patterns, channels, Clone/DebugRFC Document
Key Design Decisions
VersionInfoResulttypes — avoid circular dependency between vx-runtime and vx-starlarkNoneby default; only toolchain-manager patterns need it~/.vx/store/rust/1.93.1/)Remaining Work (Phase 3)
vx checkfor O(1) detectioncommon.rsruntime/mod.rs