fix: wire post_extract hooks, fix bundled runtime detection, and correct provider URLs#795
Merged
loonghao merged 3 commits intoloonghao:mainfrom Apr 13, 2026
Conversation
added 3 commits
April 13, 2026 19:19
…fix bundled runtime detection - Add PostInstallFn type and post_install() implementation to ManifestDrivenRuntime that executes Starlark post_extract actions (set_permissions, run_command) - Add make_post_install_fn_owned bridge function to convert Starlark PostExtractAction to JSON descriptors consumed by the Rust runtime - Wire post_install into builder.rs for both single-runtime and multi-runtime providers - Fix bundled runtime executable detection: change path.exists() to path.is_file() to prevent directories (e.g. cargo/ CARGO_HOME) from being treated as executables This fixes the issue where `vx cargo --version` would re-install rust on every invocation because rustup-init was never executed after download, and the cargo/ directory was incorrectly matched as the cargo executable.
- cmake: update macOS platform mapping from Darwin-{arch} to macos-universal,
matching the actual GitHub release asset naming (cmake-4.3.1-macos-universal.tar.gz).
This fixes 404 errors on macOS that caused cmake to re-install on every invocation.
- jq: fix environment() dict key from "name" to "key". The Rust env parser only
recognizes "key", so the PATH prepend was silently ignored.
- grpcurl: use custom platform map (osx/x86_64) instead of github_go_provider which generated wrong names (darwin/amd64) - k3d: assets are plain binaries (no .tar.gz), switch to binary_layout - kind: fix get_execute_path to match binary_layout's bin/ subdirectory - duckdb: use arch-specific .zip (osx-arm64) instead of universal .gz on macOS
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
post_extracthooks intoManifestDrivenRuntime: AddPostInstallFntype, bridge function, and fullpost_install()implementation that executesset_permissionsandrun_commandactions from provider.star scripts. This ensures tools like Rust'srustup-initare actually executed after download.path.exists()topath.is_file()inManifestDrivenRuntimeto prevent directories (e.g.cargo/CARGO_HOME) from being incorrectly matched as executables.Darwin-{arch}tomacos-universalto match actual GitHub release asset naming (cmake-4.3.1-macos-universal.tar.gz). The old URLs returned 404, causing cmake to attempt re-installation on every invocation."name"to"key"inenvironment()dict. The Rust env parser only recognizes"key", so the PATH prepend was silently ignored.Root Cause
When running
vx cargo --versionon macOS, two bugs caused repeated⬇ Installing rust@1.29.0...messages:post_extracthooks were never executed —ManifestDrivenRuntimehad no wiring from Starlarkpost_extract()to Rustpost_install(). Sorustup-initwas downloaded but never run, leavingcargo/bin/empty.path.exists()matched directories — The bundled runtime search atmod.rs:955usedpath.exists()which returnstruefor directories. Thecargo/CARGO_HOME directory was treated as the cargo executable, causing "Permission denied" errors.After fixing rust,
⬇ Installing cmake@4.3.1...appeared on every run because cmake's macOS download URLs were 404 (asset naming changed fromDarwin-arm64tomacos-universal).Test plan
vx cargo --version— should install rust once, then detect as installed on subsequent runsvx cmake --version— should downloadcmake-*-macos-universal.tar.gzsuccessfully on macOSvx rustc --version— bundled runtime should resolve correctlyinstall_layoutstrip_prefix matches the new asset naming