Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Active findings remain, including a moderate Windows build-regression risk from removing the prior MSVC workaround and a typo in a new comment.
2 open issues
What changed in this PR
Updates CodeQL’s Bazel dependencies to patched releases of fmt 12.2.0 and rules_dotnet 0.22.2, while retaining the .NET SDK pin at 10.0.100.
Changes:
- Upgrades root dependencies to
fmt 12.2.0-codeql.1andrules_dotnet 0.22.2-codeql.1. - Adds registry metadata, source definitions, overlays, and integrity information for both modules.
- Adds
rules_dotnetpatches for module versioning and NuGet archive behavior. - Validation confirmed metadata hashes, patch application, and buildifier formatting; Bazel resolution remains blocked by TLS certificate validation.
| File | Description |
|---|---|
MODULE.bazel |
Selects the updated fmt and rules_dotnet modules. |
misc/bazel/registry/modules/rules_dotnet/metadata.json |
Registers the new rules_dotnet version. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/source.json |
Defines the release archive, integrity hash, and patches. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/patches/revert_additional_files_in_nuget_archive.patch |
Restores the desired NuGet archive behavior. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/patches/module_dot_bazel_version.patch |
Sets the patched module version. |
misc/bazel/registry/modules/rules_dotnet/0.22.2-codeql.1/MODULE.bazel |
Configures the pinned .NET SDK and module dependencies. Review note: the comment contains the typo buit, which should be built. |
misc/bazel/registry/modules/fmt/metadata.json |
Registers the new fmt version. |
misc/bazel/registry/modules/fmt/12.2.0-codeql.1/source.json |
Defines the fmt archive, overlays, and integrity hashes. |
misc/bazel/registry/modules/fmt/12.2.0-codeql.1/overlay/MODULE.bazel |
Provides patched module metadata and dependencies. |
misc/bazel/registry/modules/fmt/12.2.0-codeql.1/overlay/BUILD.bazel |
Defines the fmt Bazel target, licensing, and package metadata. Review note: preserve the MSVC FMT_UNICODE=0 define from the prior overlay unless the upgrade has a verified fix for the known Windows UTF-8 build failure. |
misc/bazel/registry/modules/fmt/12.2.0-codeql.1/MODULE.bazel |
Provides the versioned fmt module definition. |
This pull request requires changes.
Review effort: Lite (auto)
0ac7b21 to
e4e9f06
Compare
Add and use patched registry versions for fmt 12.2.0 and rules_dotnet 0.22.2, preserving the Windows Unicode workaround, NuGet archive patch, and rules_shell declaration. Update the root and module .NET SDK toolchains to 10.0.201. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use fmt 12.2.0.bcr.1 metadata with a CodeQL version suffix, preserving the existing Windows FMT_UNICODE=0 overlay instead of the upstream /utf-8 option. Regenerate module declarations and overlay integrity hashes.
e4e9f06 to
0eb898f
Compare
There was a problem hiding this comment.
🟡 Changes recommended
An active moderate finding remains because the Bazel SDK pin and the companion dependency-fetching SDK pin are inconsistent, requiring synchronized updates.
1 open issue
2 resolved since last review
Review effort: Lite (auto)
Use 10.0.201 for dependency fetching without global.json, extractor and test setup, and stub generation, matching the updated Bazel build SDK.
michaelnebel
left a comment
There was a problem hiding this comment.
Thank you for doing this!
I have added a couple of comments.
We should also run DCA after the comments have been addressed.
| dotnet-version: 10.0.201 | ||
| - name: Build Extractor | ||
| shell: bash | ||
| run: scripts/create-extractor-pack.sh |
There was a problem hiding this comment.
In the create-extractor-pack.sh script we should also update -p:RuntimeFrameworkVersion=10.0.0 to -p:RuntimeFrameworkVersion=10.0.5 (otherwise the extractor still targets the runtime shipped with .NET 10.0.100).
There was a problem hiding this comment.
I'll update, but my understanding of this is that it is unrelated to what we actually ship, as we do not use create-extractor-pack.sh when we create actual releases.
There was a problem hiding this comment.
If the actual release automatically target the runtime framework version shipped with the .NET version (10.0.201), then we should probably update here anyway (otherwise there is a discrepancy between what the scripts creates and what we ship).
| dotnet-version: 10.0.201 | ||
| - name: Extractor unit tests | ||
| run: | | ||
| dotnet tool restore |
There was a problem hiding this comment.
To use the runtime shipped with .NET 10.0.201, we should update -p:RuntimeFrameworkVersion=10.0.0 to p:RuntimeFrameworkVersion=10.0.5 (see my comment below)
There was a problem hiding this comment.
For the tests the RuntimeFrameworkVersion is set here
| bazel_dep(name = "rules_kotlin", version = "2.4.21-codeql.1") | ||
| bazel_dep(name = "gazelle", version = "0.54.0") | ||
| bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1") | ||
| bazel_dep(name = "rules_dotnet", version = "0.22.2-codeql.1") |
There was a problem hiding this comment.
Is there an internal PR updating the rules_dotnet version number in MODULE.bazel in semmle-code?
There was a problem hiding this comment.
Not yet. That's next on my list.
There was a problem hiding this comment.
It's also not critical. Bazel will pick up 0.22.2-codeql.1 when you're on a new enough ql commit.
|
|
||
| dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet") | ||
| dotnet.toolchain(dotnet_version = "10.0.100") | ||
| dotnet.toolchain(dotnet_version = "10.0.201") |
There was a problem hiding this comment.
In relation to your comment about what we ship: I suppose that bazel will automatically target the runtime shipped with .NET 10.0.201 SDK (which is 10.0.5)?
michaelnebel
left a comment
There was a problem hiding this comment.
Excellent - thank you for the updates and clarifications.
| dotnet-version: 10.0.201 | ||
| - name: Build Extractor | ||
| shell: bash | ||
| run: scripts/create-extractor-pack.sh |
There was a problem hiding this comment.
If the actual release automatically target the runtime framework version shipped with the .NET version (10.0.201), then we should probably update here anyway (otherwise there is a discrepancy between what the scripts creates and what we ship).
michaelnebel
left a comment
There was a problem hiding this comment.
Excellent, thank you!
Please run DCA before merging.
Also, we will need to do this again in the very near future as soon as rules_dotnet has support for .NET 11.
Started one. |
|
@michaelnebel DCA eventually finished. Results look a bit messy, but that might be normal? |


Summary
12.2.0.bcr.1-codeql.1, based on the BCR 12.2.0.bcr.1 entry.FMT_UNICODE=0workaround without restoring the upstream/utf-8compiler option.Validation