Publish patched rules_dotnet as 0.21.5-codeql.2 - #22550
Open
redsun82 wants to merge 1 commit into
Open
Conversation
`tfm_filegroup` binds a TFM to a RID without gating on it when the TFM maps to a single RID, so a package shipping only e.g. `netstandard1.6_unix` is published for every RID. Its PascalCase DLL then collides with the lowercase one from the matching `.Runtime.Win` package on case-insensitive filesystems, breaking `unzip` of the Windows CLI zip. The same function also omits `//conditions:default` for TFMs that only have RIDs, which fails analysis on every other platform. No-op for this repo: all 7 RID-bound TFM groups here have a `default` sibling and already take the gated multi-RID path. Landing it in the shared registry so consumers of that registry pick it up. `codeql.1` stays until those consumers bump their pin. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
Rerun has been triggered: 3 restarted 🚀 |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The public PR description references an organization-protected internal repository and should use generic wording instead.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: None
What changed in this PR
Publishes and adopts a patched rules_dotnet release that correctly gates RID-specific target framework groups.
Changes:
- Adds RID gating and empty fallback behavior.
- Preserves the existing NuGet archive patch.
- Registers and adopts version
0.21.5-codeql.2.
| File | Description |
|---|---|
MODULE.bazel |
Bumps rules_dotnet. |
misc/bazel/registry/modules/rules_dotnet/metadata.json |
Registers the release. |
misc/bazel/registry/modules/rules_dotnet/0.21.5-codeql.2/source.json |
Defines source and patches. |
misc/bazel/registry/modules/rules_dotnet/0.21.5-codeql.2/patches/revert_additional_files_in_nuget_archive.patch |
Preserves the prior patch. |
misc/bazel/registry/modules/rules_dotnet/0.21.5-codeql.2/patches/gate_rid_specific_tfm_groups.patch |
Fixes RID-specific selection. |
misc/bazel/registry/modules/rules_dotnet/0.21.5-codeql.2/MODULE.bazel |
Defines module metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
Nope, microsoft/codeql is a public fork. |
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.
Patches
rules_dotnet'stfm_filegroup, which binds a target framework to a RID without gating on that RID in two cases:len(rids) == 1branch aliases straight at that RID's files with noselect, so a package whose only key is e.g.netstandard1.6_unixgets published for every RID. Its PascalCaseMicrosoft.Management.Infrastructure.dllthen collides with the lowercasemicrosoft.management.infrastructure.dllfrom the matching.Runtime.Winpackage, which is the same path on a case-insensitive filesystem:unzipof the Windows CLI zip prompts, gets EOF, and exits 1.//conditions:default, failing analysis on every other platform.rid_filegroupalready resolves to an empty list there.Both are still present in v0.21.5, v0.22.2 and
master, so upgrading does not remove the need for the patch.Developed and validated in microsoft#398, where the collision actually breaks the powershell extractor zip. It lands here so to avoid any future conflicts on this change. This has no actual impact on any of our own builds.
Notes
0.21.5-codeql.1is kept until consumers of this registry bump their pin, then it can go.