Skip to content

fix: ship a self-contained Chocolatey package (4.3.3) - #1079

Open
leoafarias wants to merge 3 commits into
mainfrom
claude/chocolatey-self-contained
Open

leoafarias wants to merge 3 commits into
mainfrom
claude/chocolatey-self-contained

Conversation

@leoafarias

Copy link
Copy Markdown
Collaborator

Summary

Fixes #1058. Chocolatey users can't upgrade dart-sdk because the FVM package pins it to the exact version it was built with.

Root cause: cli_pkg's Chocolatey package compiles fvm.exe on the user's machine at install time, so it declares dart-sdk as an exact-version dependency. Its source says why: "we need the exact same Dart version as we built with, since we ship a snapshot which isn't cross-version compatible."

Fix: package the prebuilt fvm.exe from the Windows x64 release archive instead. The package has no dart-sdk dependency, and nothing is compiled on install.

  • Release tool: new fvm-chocolatey-pack / fvm-chocolatey-deploy tasks stage tools/fvm.exe, tools/LICENSE.txt, and a generated tools/VERIFICATION.txt (release download URL + SHA-256), then run choco pack / choco push. The community feed requires VERIFICATION.txt for packages with embedded binaries. The API key is passed with Process.start, so it never appears in the release log.
  • Workflows: release.yml and deploy_windows.yml deploy with fvm-chocolatey-deploy. They already run pkg-github-windows first in the same job, which leaves the zip in build/, and the job runs after the GitHub release exists, so the URL in VERIFICATION.txt resolves.
  • CI: a new Chocolatey package job on windows-latest builds the zip and nupkg, installs it with choco, checks fvm --version, that there's no dart-sdk dependency, and that LICENSE.txt/VERIFICATION.txt are present, then uninstalls and checks the fvm shim is gone.
  • fvm.nuspec: rewritten as a minimal spec with btwld URLs.

Ported from fix/chocolatey-dart-sdk-constraint, without its unrelated parts: the Dart 3.13 / prepare-action default bump, the minimum-SDK CI jobs, and the outdated conceptadev URL rewrite.

Validation

  • Release tool: dart analyze --fatal-infos is clean, and all 10 tests pass, including a new VERIFICATION.txt test.
  • End to end against the real 4.3.1 release zip: the staged fvm.exe is byte-identical to the published one (d177f5af…), VERIFICATION.txt has the matching hash and a working download URL, and the package contains exactly fvm.nuspec, tools/fvm.exe, tools/LICENSE.txt, and tools/VERIFICATION.txt.
  • The new Windows CI job runs choco pack/install/uninstall on this PR.

Not covered

  • An upgrade from the old compile-on-install package (4.3.1) on a real machine. Chocolatey should replace the old fvm shim with the new one, but CI doesn't test this path because it would need the community feed. Worth one manual choco upgrade fvm after the first release.
  • The package is x64-only, the same as today. Windows arm64 via Chocolatey/winget stays in Windows: deliver native arm64 builds through package managers (winget, Chocolatey) #1050.

🤖 Generated with Claude Code

https://claude.ai/code/session_011SmK6LGRTwTTAD1GQuMw4q


Generated by Claude Code

cli_pkg's Chocolatey package compiles fvm.exe on the user's machine and
pins `dart-sdk` to the exact build version, which blocks Dart SDK
upgrades through Chocolatey (#1058).

Package the prebuilt fvm.exe from the Windows x64 release archive
instead, with no `dart-sdk` dependency:

- release tool: stage tools/fvm.exe, LICENSE.txt, and a generated
  VERIFICATION.txt (release URL + SHA-256, required by the community
  feed for embedded binaries); add fvm-chocolatey-pack/-deploy tasks
- release.yml / deploy_windows.yml: deploy with fvm-chocolatey-deploy
- test.yml: build, install, and uninstall the nupkg on Windows in CI
- fvm.nuspec: rewrite as a minimal spec with btwld URLs

Ported from the fix/chocolatey-dart-sdk-constraint branch, without its
unrelated SDK bump and conceptadev URL changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SmK6LGRTwTTAD1GQuMw4q
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fvm Ready Ready Preview Oct 15, 2026 4:07pm UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T16:10:06.741383Z 8669ede New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

- Bump to 4.3.3 with a changelog entry for the Chocolatey fix.
- Remove stageChocolateyPackage's unused outputDirectory parameter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011SmK6LGRTwTTAD1GQuMw4q
@leoafarias leoafarias changed the title fix: ship a self-contained Chocolatey package fix: ship a self-contained Chocolatey package (4.3.3) Oct 15, 2026

This branch was successfully deployed

1 active deployment
Preview — 8669ede6 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] FVM not comparable with dart-sdk v3.13.0

2 participants