Skip to content

fix: Pin csharp-ls to exact NuGet version in Docker builds#85

Merged
GordonBeeming merged 1 commit intomainfrom
pin-csharp-ls-version
Mar 24, 2026
Merged

fix: Pin csharp-ls to exact NuGet version in Docker builds#85
GordonBeeming merged 1 commit intomainfrom
pin-csharp-ls-version

Conversation

@GordonBeeming
Copy link
Owner

Summary

  • Resolve the actual latest csharp-ls version from the NuGet API in the prepare-versions CI job, matching the pattern used for copilot, playwright, and dotnet SDK versions
  • Pass CSHARP_LS_VERSION as a build arg to all Docker images that use the lsp-csharp snippet (dotnet, dotnet-10, dotnet-playwright, dotnet-rust)
  • Change the Dockerfile ARG default from latest to 0.22.0 for deterministic local builds

Test plan

  • CI prepare-versions job resolves a real version from NuGet API
  • dotnet and dotnet-10 image builds succeed (previously failing)
  • dotnet-playwright and dotnet-rust image builds succeed
  • verify-generated-dockerfiles job passes

Generated with Claude Code and GitButler

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>
@GordonBeeming GordonBeeming marked this pull request as ready for review March 24, 2026 23:15
Copilot AI review requested due to automatic review settings March 24, 2026 23:15
@GordonBeeming GordonBeeming merged commit cddf42b into main Mar 24, 2026
29 checks passed
@GordonBeeming GordonBeeming deleted the pin-csharp-ls-version branch March 24, 2026 23:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_VERSION default in the lsp-csharp Docker snippet to 0.22.0 (avoids invalid dotnet tool install --version latest).
  • Extend the prepare-versions workflow job to resolve the latest csharp-ls version from NuGet and expose it as a job output.
  • Pass CSHARP_LS_VERSION build-arg to all generated Docker images that include the lsp-csharp snippet (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.

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.

2 participants