Skip to content

C#: Add patched rules_dotnet 0.23.0 to the local registry - #23261

Draft
michaelnebel wants to merge 2 commits into
mainfrom
michaelnebel-rules-dotnet-0-23-codeql
Draft

michaelnebel wants to merge 2 commits into
mainfrom
michaelnebel-rules-dotnet-0-23-codeql

Conversation

@michaelnebel

@michaelnebel michaelnebel commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Use rules_dotnet version 0.23.0 and introduce a patched version.

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: d5533cb161e6a8bf1734aade8ee35fb1666d1eee

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Local registry module mirrors the earlier 0.22.2-codeql.1 layout; MODULE.bazel equals BCR 0.23.0 apart from the version; patch integrities verified.
↑ Fetched rules_dotnet reports version 0.23.0-codeql.1 and contains the len(parts) > 3 guard.
↑ Conflict-free rebase onto main 6d6871d2ea1e029394d213ad56155fd871d670d9; range-diff confirms both patches unchanged; uncached Semmle.Util.Tests (32 tests) and buildifier pass after rebase.
↓ Extractor binaries and other C# test suites need a dependency absent from the standalone build, so they are unverified here.

Upgrade rules_dotnet to the released 0.23.0, packaged as a locally patched module 0.23.0-codeql.1 in misc/bazel/registry, following the same pattern previously used for 0.22.2-codeql.1.

  • misc/bazel/registry/modules/rules_dotnet/0.23.0-codeql.1/ uses the v0.23.0 release archive with two patches:
    • module_dot_bazel_version.patch sets the module version to 0.23.0-codeql.1.
    • rules_dotnet_nuget_archive.patch adds the if len(parts) > 3: return guard in _process_group_with_tfm (the same change previously applied via git_override, rebased onto 0.23.0).
  • MODULE.bazel depends on rules_dotnet 0.23.0-codeql.1; the git_override is removed, along with the now-unused misc/bazel/patches package.
  • The .NET SDK version is unchanged (11.0.100).

Validation:

  • Fetched rules_dotnet reports version 0.23.0-codeql.1 and contains the guard.
  • bazel test --nocache_test_results //csharp/extractor/Semmle.Util.Tests:ut passes (32 tests), rerun after rebasing onto main.
  • bazel run //misc/bazel/buildifier -- --mode=check MODULE.bazel passes, rerun after rebasing onto main.

@michaelnebel michaelnebel changed the title C#: Use the rules_dotnet 0.23.0 release C#: Add patched rules_dotnet 0.23.0 to the local registry Nov 26, 2026
@michaelnebel michaelnebel changed the title C#: Add patched rules_dotnet 0.23.0 to the local registry C#: Add patched rules_dotnet 0.23.0 to the local registry Nov 26, 2026
michaelnebel and others added 2 commits November 26, 2026 15:18
Keep the existing NuGet archive patch through a single-version override and retain the .NET 11.0.100 SDK.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@michaelnebel
michaelnebel force-pushed the michaelnebel-rules-dotnet-0-23-codeql branch from e949852 to d5533cb Compare November 26, 2026 14:19
@michaelnebel michaelnebel added the no-change-note-required This PR does not need a change note label Nov 26, 2026
@michaelnebel
michaelnebel requested an adaptive review from Copilot November 26, 2026 14:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The upstream upgrade changes compiler and NuGet behavior affecting C# extractor builds and self-contained publishing, requiring compatibility validation in the full build context beyond the reported utility tests.

No open issues 🎉

What changed in this PR

Moves the C# build dependency from a Git override to the released rules_dotnet 0.23.0, packaged in the local Bazel registry as 0.23.0-codeql.1.

Changes:

  • Adds the registry module, release archive metadata, and version patch.
  • Preserves the existing NuGet archive guard, rebased onto 0.23.0.
  • Removes the Git override and obsolete patch package; leaves the .NET SDK unchanged.
File Description
MODULE.bazel Selects the patched registry version and removes the Git override.
misc/​bazel/​registry/​modules/​rules_dotnet/​metadata.json Lists the locally patched release.
misc/​bazel/​registry/​modules/​rules_dotnet/​0.23.0-codeql.1/​source.json Defines the release archive and patch integrity hashes.
misc/​bazel/​registry/​modules/​rules_dotnet/​0.23.0-codeql.1/​patches/​rules_dotnet_nuget_archive.patch Relocates and rebases the existing NuGet archive guard.
misc/​bazel/​registry/​modules/​rules_dotnet/​0.23.0-codeql.1/​patches/​module_dot_bazel_version.patch Sets the archive’s module version to the local patched version.
misc/​bazel/​registry/​modules/​rules_dotnet/​0.23.0-codeql.1/​MODULE.bazel Adds the patched release’s module definition.
misc/​bazel/​patches/​BUILD.bazel Deletes the obsolete patch-export package.

Review effort: Balanced (adaptive)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants