Skip to content

Conversation

@bazel-contrib-bot
Copy link
Contributor

@bazel-io
Copy link
Member

Hello @purkhusid, modules you maintain (rules_dotnet) have been updated in this PR.
Please review the changes. You can view a diff against the previous version in the "Generate module diff" check.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds version 0.20.3 of the rules_dotnet module to the Bazel Central Registry. The overall structure of the new module version follows the BCR guidelines, including the necessary MODULE.bazel, source.json, and presubmit.yml files. However, I've found a critical issue in the new MODULE.bazel file where use_extension calls use incorrect, non-portable labels (//...) instead of the required module-qualified labels (@rules_dotnet//...). This will cause build failures for downstream users and must be corrected. I have provided specific comments and code suggestions to resolve this.

Comment on lines +16 to +29
paket2bazel_dependencies_extension = use_extension("//dotnet:paket.paket2bazel_dependencies_extension.bzl", "paket2bazel_dependencies_extension")
use_repo(paket2bazel_dependencies_extension, "paket.paket2bazel_dependencies")

rules_dotnet_nuget_packages_extension = use_extension("//dotnet:paket.rules_dotnet_nuget_packages_extension.bzl", "rules_dotnet_nuget_packages_extension")
use_repo(rules_dotnet_nuget_packages_extension, "paket.rules_dotnet_nuget_packages")

targeting_packs_extension = use_extension("//dotnet/private/sdk/targeting_packs:dotnet.targeting_packs_extension.bzl", "targeting_packs_extension")
use_repo(targeting_packs_extension, "dotnet.targeting_packs")

runtime_packs_extension = use_extension("//dotnet/private/sdk/runtime_packs:dotnet.runtime_packs_extension.bzl", "runtime_packs_extension")
use_repo(runtime_packs_extension, "dotnet.runtime_packs")

apphost_packs_extension = use_extension("//dotnet/private/sdk/apphost_packs:dotnet.apphost_packs_extension.bzl", "apphost_packs_extension")
use_repo(apphost_packs_extension, "dotnet.apphost_packs")
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The use_extension calls are using repository-relative labels starting with //. This syntax refers to the main workspace, not the module's own source files. When another project uses rules_dotnet, these labels will fail to resolve. The labels should be qualified with the module's own repository name, @rules_dotnet. For example, //dotnet:paket.paket2bazel_dependencies_extension.bzl should be @rules_dotnet//dotnet:paket.paket2bazel_dependencies_extension.bzl. This is a critical issue as it will break downstream users.

Suggested change
paket2bazel_dependencies_extension = use_extension("//dotnet:paket.paket2bazel_dependencies_extension.bzl", "paket2bazel_dependencies_extension")
use_repo(paket2bazel_dependencies_extension, "paket.paket2bazel_dependencies")
rules_dotnet_nuget_packages_extension = use_extension("//dotnet:paket.rules_dotnet_nuget_packages_extension.bzl", "rules_dotnet_nuget_packages_extension")
use_repo(rules_dotnet_nuget_packages_extension, "paket.rules_dotnet_nuget_packages")
targeting_packs_extension = use_extension("//dotnet/private/sdk/targeting_packs:dotnet.targeting_packs_extension.bzl", "targeting_packs_extension")
use_repo(targeting_packs_extension, "dotnet.targeting_packs")
runtime_packs_extension = use_extension("//dotnet/private/sdk/runtime_packs:dotnet.runtime_packs_extension.bzl", "runtime_packs_extension")
use_repo(runtime_packs_extension, "dotnet.runtime_packs")
apphost_packs_extension = use_extension("//dotnet/private/sdk/apphost_packs:dotnet.apphost_packs_extension.bzl", "apphost_packs_extension")
use_repo(apphost_packs_extension, "dotnet.apphost_packs")
paket2bazel_dependencies_extension = use_extension("@rules_dotnet//dotnet:paket.paket2bazel_dependencies_extension.bzl", "paket2bazel_dependencies_extension")
use_repo(paket2bazel_dependencies_extension, "paket.paket2bazel_dependencies")
rules_dotnet_nuget_packages_extension = use_extension("@rules_dotnet//dotnet:paket.rules_dotnet_nuget_packages_extension.bzl", "rules_dotnet_nuget_packages_extension")
use_repo(rules_dotnet_nuget_packages_extension, "paket.rules_dotnet_nuget_packages")
targeting_packs_extension = use_extension("@rules_dotnet//dotnet/private/sdk/targeting_packs:dotnet.targeting_packs_extension.bzl", "targeting_packs_extension")
use_repo(targeting_packs_extension, "dotnet.targeting_packs")
runtime_packs_extension = use_extension("@rules_dotnet//dotnet/private/sdk/runtime_packs:dotnet.runtime_packs_extension.bzl", "runtime_packs_extension")
use_repo(runtime_packs_extension, "dotnet.runtime_packs")
apphost_packs_extension = use_extension("@rules_dotnet//dotnet/private/sdk/apphost_packs:dotnet.apphost_packs_extension.bzl", "apphost_packs_extension")
use_repo(apphost_packs_extension, "dotnet.apphost_packs")

Comment on lines +49 to +59
rules_dotnet_dev_nuget_packages_extension = use_extension("//dotnet:paket.rules_dotnet_dev_nuget_packages_extension.bzl", "rules_dotnet_dev_nuget_packages_extension", dev_dependency = True)
use_repo(rules_dotnet_dev_nuget_packages_extension, "paket.rules_dotnet_dev_nuget_packages")

rules_dotnet_nuget_resource_assemblies_tests_extension = use_extension("//dotnet:paket.rules_dotnet_nuget_resource_assemblies_tests_extension.bzl", "rules_dotnet_nuget_resource_assemblies_tests_extension", dev_dependency = True)
use_repo(rules_dotnet_nuget_resource_assemblies_tests_extension, "paket.rules_dotnet_nuget_resource_assemblies_tests")

internal_dev_deps = use_extension("//dotnet:internal_dev_deps.bzl", "internal_dev_deps", dev_dependency = True)
use_repo(internal_dev_deps, "buildkite_config")

rules_dotnet_nuget_tool_tests_extension = use_extension("//dotnet:paket.rules_dotnet_nuget_tool_tests_extension.bzl", "rules_dotnet_nuget_tool_tests_extension", dev_dependency = True)
use_repo(rules_dotnet_nuget_tool_tests_extension, "paket.rules_dotnet_nuget_tool_tests")
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

The use_extension calls for dev dependencies are using repository-relative labels starting with //. This syntax refers to the main workspace, not the module's own source files. This will cause resolution failures when tests for this module are run from another workspace (e.g., in presubmit). The labels should be qualified with the module's own repository name, @rules_dotnet. For example, //dotnet:paket.rules_dotnet_dev_nuget_packages_extension.bzl should be @rules_dotnet//dotnet:paket.rules_dotnet_dev_nuget_packages_extension.bzl.

Suggested change
rules_dotnet_dev_nuget_packages_extension = use_extension("//dotnet:paket.rules_dotnet_dev_nuget_packages_extension.bzl", "rules_dotnet_dev_nuget_packages_extension", dev_dependency = True)
use_repo(rules_dotnet_dev_nuget_packages_extension, "paket.rules_dotnet_dev_nuget_packages")
rules_dotnet_nuget_resource_assemblies_tests_extension = use_extension("//dotnet:paket.rules_dotnet_nuget_resource_assemblies_tests_extension.bzl", "rules_dotnet_nuget_resource_assemblies_tests_extension", dev_dependency = True)
use_repo(rules_dotnet_nuget_resource_assemblies_tests_extension, "paket.rules_dotnet_nuget_resource_assemblies_tests")
internal_dev_deps = use_extension("//dotnet:internal_dev_deps.bzl", "internal_dev_deps", dev_dependency = True)
use_repo(internal_dev_deps, "buildkite_config")
rules_dotnet_nuget_tool_tests_extension = use_extension("//dotnet:paket.rules_dotnet_nuget_tool_tests_extension.bzl", "rules_dotnet_nuget_tool_tests_extension", dev_dependency = True)
use_repo(rules_dotnet_nuget_tool_tests_extension, "paket.rules_dotnet_nuget_tool_tests")
rules_dotnet_dev_nuget_packages_extension = use_extension("@rules_dotnet//dotnet:paket.rules_dotnet_dev_nuget_packages_extension.bzl", "rules_dotnet_dev_nuget_packages_extension", dev_dependency = True)
use_repo(rules_dotnet_dev_nuget_packages_extension, "paket.rules_dotnet_dev_nuget_packages")
rules_dotnet_nuget_resource_assemblies_tests_extension = use_extension("@rules_dotnet//dotnet:paket.rules_dotnet_nuget_resource_assemblies_tests_extension.bzl", "rules_dotnet_nuget_resource_assemblies_tests_extension", dev_dependency = True)
use_repo(rules_dotnet_nuget_resource_assemblies_tests_extension, "paket.rules_dotnet_nuget_resource_assemblies_tests")
internal_dev_deps = use_extension("@rules_dotnet//dotnet:internal_dev_deps.bzl", "internal_dev_deps", dev_dependency = True)
use_repo(internal_dev_deps, "buildkite_config")
rules_dotnet_nuget_tool_tests_extension = use_extension("@rules_dotnet//dotnet:paket.rules_dotnet_nuget_tool_tests_extension.bzl", "rules_dotnet_nuget_tool_tests_extension", dev_dependency = True)
use_repo(rules_dotnet_nuget_tool_tests_extension, "paket.rules_dotnet_nuget_tool_tests")

@purkhusid
Copy link
Contributor

This PR can be closed.

@Wyverald Wyverald closed this Oct 23, 2025
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.

4 participants