Conversation
`misc/bazel/csharp.bzl` is language-shared infra and should not reach into `csharp/`. Widen the moved targets to public, matching `misc/bazel`, so non-C# languages can use them. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Neither script imports runfiles; they are plain `argparse`. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
`.bazelrc` already overrides `semmle_code` with the in-repo stub, but the stub had no root package, so `@semmle_code//:git_info` could not resolve. Emit the three logs `gen-git-assembly-info` reads. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
Rerun has been triggered: 1 restarted 🚀 |
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.
Targets used by
misc/bazel/csharp.bzlshould live inmisc/bazel/, not be reached sideways out of//csharp/scripts:. That holds on its own; PowerShell picking upcsharp.bzlin microsoft#398 is just what surfaced it.Three renames plus their three label references in
misc/bazel/csharp.bzl. The.pyfiles are 100% renames;BUILD.bazelis 70% because of two deliberate changes:gen-assembly-infoandgit-assembly-info-srcgo from//csharp:__subpackages__to//visibility:public, matching the rest ofmisc/bazel/. Without it the first non-C# caller ofcodeql_csharp_binarygets a bare visibility error.gen-git-assembly-infostays private (only the in-package genrule uses it), hence per-target declarations rather than a package default.@rules_python//python/runfilesdep that neither imports; they are plainargparse. Dropped.create-extractor-pack.shandstubs/stay put: C#-specific, not Bazel, and they follow theruby/scripts/,ql/scripts/convention.Stubbing
git_info.bazelrcalready overridessemmle_codewithmisc/bazel/semmle_code_stub, but that stub had no root package, so@semmle_code//:git_infocould not resolve and anything reachinggit-assembly-info-srcfailed to analyse here. Adding the missing rootBUILD.bazelfixes that, takingbazel build --nobuild //csharp/...from 28 to 52 of 62 targets analysable without the internal repository.The remaining 10 are all
@semmle_code//extractor-asp, a prebuilt internal jar that a stub genrule cannot stand in for, so the C# pack itself still needs the internal repository.The stub emits only the three logs
gen-git-assembly-infoactually reads, and yieldsAssemblyInformationalVersion("unknown (unknown)"). It does not shadow the real target: built against the internal repository, the live version string is still produced.