fix: Pin csharp-ls to exact NuGet version in Docker builds#85
Merged
GordonBeeming merged 1 commit intomainfrom Mar 24, 2026
Merged
fix: Pin csharp-ls to exact NuGet version in Docker builds#85GordonBeeming merged 1 commit intomainfrom
GordonBeeming merged 1 commit intomainfrom
Conversation
Always use an exact version for csharp-ls instead of "latest" to ensure reproducible builds and align with the requirement that tools be pinned to a specific release (like dotnet copilot cli). Add csharp_l s_version to the workflow outputs, capture the latest NuGet version in prepare-versions, propagate the value into the image build arguments, and replace the Dockerfile ARG default from "latest" to a fixed 0.22.0 to guarantee deterministic installations. fix: Pin csharp-ls to exact NuGet version in Docker builds The `dotnet tool install --version latest` is invalid because NuGet doesn't accept "latest" as a version range. Resolve the actual latest version from the NuGet API in the prepare-versions CI job and pass it as a build arg, matching the pattern used for copilot, playwright, and dotnet SDK versions. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes Docker image builds deterministic and reliable by ensuring csharp-ls is installed with an explicit NuGet version (instead of latest) and wiring CI to resolve and pass that exact version into relevant image builds.
Changes:
- Pin
CSHARP_LS_VERSIONdefault in thelsp-csharpDocker snippet to0.22.0(avoids invaliddotnet tool install --version latest). - Extend the
prepare-versionsworkflow job to resolve the latestcsharp-lsversion from NuGet and expose it as a job output. - Pass
CSHARP_LS_VERSIONbuild-arg to all generated Docker images that include thelsp-csharpsnippet (dotnet, dotnet-10, dotnet-playwright, dotnet-rust).
Reviewed changes
Copilot reviewed 2 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
docker/snippets/lsp-csharp.Dockerfile |
Changes CSHARP_LS_VERSION default from latest to a concrete version for deterministic installs. |
docker/generated/Dockerfile.dotnet |
Updates embedded snippet ARG default to 0.22.0 (generated output stays consistent). |
docker/generated/Dockerfile.dotnet-10 |
Updates embedded snippet ARG default to 0.22.0 (generated output stays consistent). |
docker/generated/Dockerfile.dotnet-playwright |
Updates embedded snippet ARG default to 0.22.0 (generated output stays consistent). |
docker/generated/Dockerfile.dotnet-rust |
Updates embedded snippet ARG default to 0.22.0 (generated output stays consistent). |
.github/workflows/publish.yml |
Resolves csharp-ls version from NuGet, plumbs it through job outputs, and injects it as a Docker build-arg for affected images. |
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
prepare-versionsCI job, matching the pattern used for copilot, playwright, and dotnet SDK versionsCSHARP_LS_VERSIONas a build arg to all Docker images that use thelsp-csharpsnippet (dotnet, dotnet-10, dotnet-playwright, dotnet-rust)latestto0.22.0for deterministic local buildsTest plan
prepare-versionsjob resolves a real version from NuGet APIdotnetanddotnet-10image builds succeed (previously failing)dotnet-playwrightanddotnet-rustimage builds succeedverify-generated-dockerfilesjob passesGenerated with Claude Code and GitButler