Repository navigation
vibe 0.1.195
Dotnet feature: let code that resolves packages itself find the host's cache, and keep link-nuget's settings after sudo (#16)
A RazorLight template test failed in a sandbox with Cannot find compilation library location for package 'System.Security.Cryptography.Pkcs'. The package was in the host's cache, which the sandbox mounts read-only as NuGet's fallback folder. NuGet and MSBuild use fallback folders, but code that finds a package's assemblies itself does not. Microsoft.Extensions.DependencyModel, which RazorLight uses, only looks in the app's probing paths, then NUGET_PACKAGES, then ~/.nuget/packages. That only bites a package whose assemblies aren't copied to the output folder, such as a compile-only one.
Changes
link-nugetsetsGenerateRuntimeConfigDevFile=truein fallback mode. The SDK then writes the fallback folder intobin/**/*.runtimeconfig.dev.jsonas a probing path, whichDependencyModelreads. It is removed again in the shared and overlay modes, where the host cache isNUGET_PACKAGES. This keeps the fallback design. PointingNUGET_PACKAGESat the read-only cache would break restores that need a package the host lacks, asdocs/plan-nuget-feeds.mdalready notes.link-nugetreads the variables the sandbox was made with from PID 1's environment when its own lacks them. The session-start nudge runson-startundersudo, which dropsSBX_HOST_NUGET_PACKAGESand the like. So every run after the first boot logged "nothing to do".start-clipboardalready does the same for its own variable. A changed script still only reaches a sandbox by rebuilding it, so this fixes a misleading log and lets a failed first boot be put right at the next start. It does not make existing sandboxes pick up new settings without a rebuild.- Tests and readme. A new test builds a package-less project with the real SDK, using the variables
link-nugetpersists. It checks thatruntimeconfig.dev.jsonnames the fallback folder and that the app runs. A second part checks that no such file is written without the setting. It skips withoutdotnet. Other tests cover the PID 1 read, and the test harness now uses an empty PID 1 environment so results don't depend on the machine running them. The readme explains both changes and that each build leaves aruntimeconfig.dev.jsoninbin/.
Verified
- Reproduced under a real test host. A net8.0 xunit project with RazorLight and a compile-only Pkcs reference, with the host cache as a read-only fallback, failed. The same project passed with the variable set. It ran on the .NET 10 runtime with roll-forward, not a real runtime 8.
- The app runs with nonexistent probing paths. An app ran fine with two paths that don't exist added to its
runtimeconfig.dev.json. That check was by hand. - Go suite.
go test ./...passes.
Not verified
- No re-composed sandbox on the final code. The agent in the yumbi sandbox confirmed the setting and the resulting file on an earlier build, before the PID 1 read was added.
- Host side of the new
runtimeconfig.dev.jsonfiles. I haven't run a sandbox-written one on a real host. - CI hasn't run.
Notes
- Existing sandboxes need a rebuild (
vibe -C) once to get the setting. - The
df6100ccommit message overstates the PID 1 read, saying a changed script reaches existing sandboxes without a rebuild. The readme is correct. I didn't rewrite history. Squash-merging avoids carrying the message.
🤖 Generated with Claude Code
To install:
- Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/fluffynuts/vibe/master/install.sh | sh - Windows:
irm https://raw.githubusercontent.com/fluffynuts/vibe/master/install.ps1 | iex - Manual: download the zip for your platform (below), unzip it anywhere, and run
vibe --installfrom the folder it makes.
To upgrade, run the same command again, or vibe --upgrade once vibe is installed.
| Platform | Zip |
|---|---|
| Linux (x86-64) | vibe-linux-amd64.zip |
| Linux (ARM) | vibe-linux-arm64.zip |
| macOS (Apple Silicon) | vibe-macos-arm64.zip |
| macOS (Intel) | vibe-macos-amd64.zip |
| Windows (x86-64) | vibe-windows-amd64.zip |
| Windows (ARM) | vibe-windows-arm64.zip |
SHA256SUMS holds each zip's checksum. The install scripts and vibe --upgrade check it.
macOS: the binary isn't signed, so if it's blocked after downloading in a browser, run
xattr -dr com.apple.quarantine <folder> once.
What's Changed
- Dotnet feature: let code that resolves packages itself find the host's cache, and keep link-nuget's settings after sudo by @fluffynuts in #16
Full Changelog: v0.1.190...v0.1.195