Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.2", repo_name = "json")
bazel_dep(name = "fmt", version = "12.2.0.bcr.1-codeql.1")
bazel_dep(name = "rules_kotlin", version = "2.4.21-codeql.1")
bazel_dep(name = "gazelle", version = "0.54.0")
bazel_dep(name = "rules_dotnet")
bazel_dep(name = "rules_dotnet", version = "0.23.0-codeql.1")
bazel_dep(name = "googletest", version = "1.18.0.bcr.1")
bazel_dep(name = "rules_rust", version = "0.75.0")
bazel_dep(name = "rules_swift", version = "4.2.2-codeql.1")
Expand All @@ -37,17 +37,6 @@ bazel_dep(name = "zstd", version = "1.5.7.bcr.3")

bazel_dep(name = "buildifier_prebuilt", version = "10.2.0", dev_dependency = True)

# Consider using a released version of rules_dotnet, when possible.
git_override(
module_name = "rules_dotnet",
commit = "8db43484722080564c2abd04bc09f43f61bf6c65",
patch_strip = 1,
# Keep the patch in a separate package so it can load when the enclosing build
# marks misc/bazel as deleted.
patches = ["//misc/bazel/patches:rules_dotnet_nuget_archive.patch"],
remote = "https://github.com/bazel-contrib/rules_dotnet.git",
)

# Pin the compiler to support the Kotlin 1.8 and 1.9 language versions required by older extractors.
kotlin = use_extension("@rules_kotlin//src/main/starlark/core/repositories:bzlmod_setup.bzl", "rules_kotlin_extensions")
kotlin.kotlinc_version(
Expand Down
1 change: 0 additions & 1 deletion misc/bazel/patches/BUILD.bazel

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
"rules_dotnet"

module(
name = "rules_dotnet",
version = "0.23.0-codeql.1",
bazel_compatibility = [">=9.0.0"],
compatibility_level = 0,
)

dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
dotnet.toolchain(dotnet_version = "11.0.100")
dotnet.bootstrap_toolchain(dotnet_version = "11.0.100")
use_repo(dotnet, "dotnet.apphost_packs", "dotnet.crossgen2_packs", "dotnet.ilcompiler_packs", "dotnet.nativeaot_packs", "dotnet.runtime_packs", "dotnet.targeting_packs", "dotnet.wasm_packs", "dotnet_bootstrap_toolchains", "dotnet_toolchains")

register_toolchains(
"@dotnet_toolchains//:all",
"@dotnet_bootstrap_toolchains//:all",
)

paket = use_extension("@rules_dotnet//dotnet:paket.bzl", "paket")
paket.parse(
dependencies = "//:paket.dependencies",
groups = [
"paket_cli",
"rules_dotnet_nuget_packages",
],
lock = "//:paket.lock",
)
use_repo(paket, "paket.paket_cli", "paket.rules_dotnet_nuget_packages")

bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "bazel_lib", version = "3.0.0")
bazel_dep(name = "rules_shell", version = "0.5.0")

# `publish_binary` links a NativeAOT publish with the cc toolchain APIs.
bazel_dep(name = "rules_cc", version = "0.2.19")
bazel_dep(name = "icu", version = "78.2.bcr.2")

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_dotnet_icu_data",
build_file_content = 'exports_files(["icudt78l.dat"])',
integrity = "sha256-b8UaiBgkK/2DIHq4lVEWasL7S/UC0B5BzdyMtqC6TNo=",
urls = ["https://github.com/unicode-org/icu/releases/download/release-78.2/icu4c-78.2-data-bin-l.zip"],
)

icu_sources = use_repo_rule("//dotnet/private/icu:sources.bzl", "icu_sources")

icu_sources(name = "rules_dotnet_icu_sources")

# Dev dependencies
bazel_dep(name = "rules_pkg", version = "1.1.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.51.3", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.9.0", dev_dependency = True)
bazel_dep(name = "rules_testing", version = "0.8.0", dev_dependency = True)
bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True)

# Builds container layers from a publish in the tests.
bazel_dep(name = "rules_img", version = "0.3.22", dev_dependency = True)

# The LLVM toolchains are registered selectively in .bazelrc
bazel_dep(name = "llvm", version = "0.8.19", dev_dependency = True)

osx_sysroot = use_extension("@llvm//extensions:osx.bzl", "osx", dev_dependency = True)
osx_sysroot.frameworks(names = [
"CoreFoundation",
"CryptoKit",
"Foundation",
"GSS",
"Kernel",
"Network",
"OSLog",
"Security",
"SystemConfiguration",
])

bazel_dep(name = "dotnet_test_resources_other_repo", version = "", dev_dependency = True)
local_path_override(
module_name = "dotnet_test_resources_other_repo",
path = "dotnet/private/tests/resources/other_repo",
)

dev_paket = use_extension("@rules_dotnet//dotnet:paket.bzl", "paket", dev_dependency = True)
dev_paket.parse(
dependencies = "//:paket.dependencies",
groups = [
"rules_dotnet_dev_nuget_packages",
"rules_dotnet_nuget_resource_assemblies_tests",
"rules_dotnet_framework_override_not_provided_tests",
"rules_dotnet_nuget_pack_tests",
"rules_dotnet_nuget_tool_tests",
"rules_dotnet_static_web_assets_tests",
],
lock = "//:paket.lock",
)
use_repo(
dev_paket,
"paket.rules_dotnet_dev_nuget_packages",
"paket.rules_dotnet_framework_override_not_provided_tests",
"paket.rules_dotnet_nuget_pack_tests",
"paket.rules_dotnet_nuget_resource_assemblies_tests",
"paket.rules_dotnet_nuget_tool_tests",
"paket.rules_dotnet_static_web_assets_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")

nuget_fixtures = use_extension("//dotnet/private/tests/nuget_resolution/internal:fixtures.bzl", "nuget_fixtures", dev_dependency = True)
use_repo(nuget_fixtures, "nuget_fixtures")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -5 +5 @@
- version = "0.0.0",
+ version = "0.23.0-codeql.1",
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/dotnet/private/rules/nuget/nuget_archive.bzl
+++ b/dotnet/private/rules/nuget/nuget_archive.bzl
@@ -219,6 +219,9 @@ def _process_group_with_tfm(groups, group_name, file):
@@ -116,6 +116,9 @@ def _process_group_with_tfm(groups, group_name, file):
groups["unsupported_tfms"][folder] = True
return
-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"integrity": "sha256-r/Vaut6fAycUkHX7/QxHfIb35loOCHsd0nl0Rez7SwU=",
"strip_prefix": "rules_dotnet-0.23.0",
"docs_url": "https://github.com/bazel-contrib/rules_dotnet/releases/download/v0.23.0/rules_dotnet-v0.23.0.docs.tar.gz",
"url": "https://github.com/bazel-contrib/rules_dotnet/releases/download/v0.23.0/rules_dotnet-v0.23.0.tar.gz",
"patch_strip": 1,
"patches": {
"module_dot_bazel_version.patch": "sha256-bY7ebnFSe7mps4sGLOGZ+rFZzHnSwHD7jzK4APH0NUE=",
"rules_dotnet_nuget_archive.patch": "sha256-j59J6Oi1V6YMXZ4sO6aTDI9yKiTFcCLoVpDb29BmiB4="
}
}
19 changes: 19 additions & 0 deletions misc/bazel/registry/modules/rules_dotnet/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"homepage": "https://github.com/bazel-contrib/rules_dotnet",
"maintainers": [
{
"name": "Dan\u00edel Poul Purkh\u00fas",
"email": "purkhusid@gmail.com",
"github": "purkhusid",
"github_user_id": 5622403
}
],
"repository": [
"github:bazelbuild/rules_dotnet",
"github:bazel-contrib/rules_dotnet"
],
"versions": [
"0.23.0-codeql.1"
],
"yanked_versions": {}
}
Loading