Repository navigation
Use patched latest fmt and rules_dotnet modules #22954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
bc71b4e
0eb898f
972a631
77a4a35
aed0286
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,10 +25,10 @@ bazel_dep(name = "rules_shell", version = "0.8.0") | |
| bazel_dep(name = "bazel_skylib", version = "1.9.2") | ||
| bazel_dep(name = "abseil-cpp", version = "20260817.0", repo_name = "absl") | ||
| bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.2", repo_name = "json") | ||
| bazel_dep(name = "fmt", version = "12.1.0-codeql.1") | ||
| 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", version = "0.21.5-codeql.1") | ||
| bazel_dep(name = "rules_dotnet", version = "0.22.2-codeql.1") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an internal PR updating the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not yet. That's next on my list.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's also not critical. Bazel will pick up |
||
| 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.0.0-rc5-codeql.3") | ||
|
|
@@ -206,7 +206,7 @@ http_archive( | |
| ) | ||
|
|
||
| dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet") | ||
| dotnet.toolchain(dotnet_version = "10.0.100") | ||
| dotnet.toolchain(dotnet_version = "10.0.201") | ||
|
jketema marked this conversation as resolved.
Resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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)? |
||
| use_repo(dotnet, "dotnet_toolchains") | ||
|
|
||
| register_toolchains("@dotnet_toolchains//:all") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ runs: | |
| - name: Setup dotnet | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: 10.0.100 | ||
| dotnet-version: 10.0.201 | ||
| - name: Build Extractor | ||
| shell: bash | ||
| run: scripts/create-extractor-pack.sh | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll update, but my understanding of this is that it is unrelated to what we actually ship, as we do not use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 77a4a35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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). |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| module( | ||
| name = "fmt", | ||
| version = "12.2.0.bcr.1-codeql.1", | ||
| bazel_compatibility = [">=7.2.1"], | ||
| compatibility_level = 10, | ||
| ) | ||
|
|
||
| bazel_dep(name = "package_metadata", version = "0.0.13") | ||
| bazel_dep(name = "rules_cc", version = "0.2.20") | ||
| bazel_dep(name = "rules_license", version = "1.0.0") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| load("@package_metadata//licenses/rules:license.bzl", package_metadata_license = "license") | ||
| load("@package_metadata//purl:purl.bzl", "purl") | ||
| load("@package_metadata//rules:package_metadata.bzl", "package_metadata") | ||
| load("@rules_cc//cc:cc_library.bzl", "cc_library") | ||
| load("@rules_license//rules:license.bzl", "license") | ||
|
|
||
| package( | ||
| default_package_metadata = [ | ||
| ":license", | ||
| ":package_metadata", | ||
| ], | ||
| ) | ||
|
|
||
| exports_files([ | ||
| "LICENSE", | ||
| ]) | ||
|
|
||
| license( | ||
| name = "license", | ||
| license_kinds = ["@rules_license//licenses/spdx:MIT"], | ||
| license_text = "LICENSE", | ||
| ) | ||
|
|
||
| package_metadata_license( | ||
| name = "package_metadata_license", | ||
| kind = "@package_metadata//licenses/spdx:MIT", | ||
| text = "LICENSE", | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| package_metadata( | ||
| name = "package_metadata", | ||
| attributes = [":package_metadata_license"], | ||
| purl = purl.bazel( | ||
| module_name(), | ||
| module_version(), | ||
| ), | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| cc_library( | ||
| name = "fmt", | ||
| srcs = [ | ||
| #"src/fmt.cc", # No C++ module support, yet in Bazel (https://github.com/bazelbuild/bazel/pull/19940) | ||
| "src/format.cc", | ||
| "src/os.cc", | ||
| ], | ||
| hdrs = glob([ | ||
| "include/fmt/*.h", | ||
| ]), | ||
| # CodeQL change: disable UTF8 support, it's causing issues on Windows | ||
| defines = select({ | ||
| "@rules_cc//cc/compiler:msvc-cl": ["FMT_UNICODE=0"], | ||
| "//conditions:default": [], | ||
| }), | ||
| includes = ["include"], | ||
| strip_include_prefix = "include", # workaround: only needed on some macOS systems (see https://github.com/bazelbuild/bazel-central-registry/issues/1537) | ||
| visibility = ["//visibility:public"], | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| module( | ||
| name = "fmt", | ||
| version = "12.2.0.bcr.1-codeql.1", | ||
| bazel_compatibility = [">=7.2.1"], | ||
| compatibility_level = 10, | ||
| ) | ||
|
|
||
| bazel_dep(name = "package_metadata", version = "0.0.13") | ||
| bazel_dep(name = "rules_cc", version = "0.2.20") | ||
| bazel_dep(name = "rules_license", version = "1.0.0") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "url": "https://github.com/fmtlib/fmt/releases/download/12.2.0/fmt-12.2.0.zip", | ||
| "integrity": "sha256-ovSo1RF4+VTkwzkAf3ft12ugyy42+HpI5aVAPZvlh48=", | ||
| "strip_prefix": "fmt-12.2.0", | ||
| "overlay": { | ||
| "BUILD.bazel": "sha256-Zn5kky5jBkuqoek9UpzuHX4sTkqyhUKnjENJwJxRCEI=", | ||
| "MODULE.bazel": "sha256-WdW/GI1Ho1qVF/BZ8ZQTa71rB8F5QHkLv07kySMJfGI=" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| "rules_dotnet" | ||
|
|
||
| module( | ||
| name = "rules_dotnet", | ||
| version = "0.22.2-codeql.1", | ||
| bazel_compatibility = [">=8.0.0"], | ||
| compatibility_level = 0, | ||
| ) | ||
|
|
||
| dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet") | ||
| dotnet.toolchain(dotnet_version = "10.0.201") | ||
|
|
||
| # This toolchain is used for building the apphost shimmer only. The apphost shimmer | ||
| # can not be buit with the toolchain that the end-user picks because the apphost builder | ||
| # always targets the latest SDK and the end-user can pick an older SDK that is incompatible with the apphost builder. | ||
|
jketema marked this conversation as resolved.
Resolved
|
||
| dotnet.toolchain( | ||
| name = "dotnet_apphost", | ||
| dotnet_version = "10.0.201", | ||
| ) | ||
| use_repo(dotnet, "dotnet_toolchains") | ||
|
|
||
| # These toolchains are used to build the apphost shimmer | ||
| use_repo(dotnet, "dotnet_apphost_x86_64-unknown-linux-gnu") | ||
| use_repo(dotnet, "dotnet_apphost_arm64-unknown-linux-gnu") | ||
| use_repo(dotnet, "dotnet_apphost_aarch64-apple-darwin") | ||
| use_repo(dotnet, "dotnet_apphost_x86_64-apple-darwin") | ||
| use_repo(dotnet, "dotnet_apphost_x86_64-pc-windows-msvc") | ||
| use_repo(dotnet, "dotnet_apphost_arm64-pc-windows-msvc") | ||
|
|
||
| register_toolchains("@dotnet_toolchains//:all") | ||
|
|
||
| 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") | ||
|
|
||
| bazel_dep(name = "bazel_skylib", version = "1.7.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.6.1") | ||
|
|
||
| # 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_cc", version = "0.2.19", 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) | ||
| 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", | ||
| ) | ||
|
|
||
| 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_framework_override_not_provided_tests_extension = use_extension("@rules_dotnet//dotnet:paket.rules_dotnet_framework_override_not_provided_tests_extension.bzl", "rules_dotnet_framework_override_not_provided_tests_extension", dev_dependency = True) | ||
| use_repo(rules_dotnet_framework_override_not_provided_tests_extension, "paket.rules_dotnet_framework_override_not_provided_tests") | ||
|
|
||
| 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") | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- a/MODULE.bazel | ||
| +++ b/MODULE.bazel | ||
| @@ -6 +6 @@ | ||
| - version = "0.0.0", | ||
| + version = "0.22.2-codeql.1", |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- a/dotnet/private/rules/nuget/nuget_archive.bzl | ||
| +++ b/dotnet/private/rules/nuget/nuget_archive.bzl | ||
| @@ -142 +142 @@ | ||
| - if file.endswith(tfm) or file.endswith(tfm + "/"): | ||
| + if file.find("/", tfm_end + 1) != -1: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "integrity": "sha256-zjXa0Y2zHNaDI7Vo3AnGicxtdewW66FRDM0Si7XxJk4=", | ||
| "strip_prefix": "rules_dotnet-0.22.2", | ||
| "docs_url": "https://github.com/bazel-contrib/rules_dotnet/releases/download/v0.22.2/rules_dotnet-v0.22.2.docs.tar.gz", | ||
| "url": "https://github.com/bazel-contrib/rules_dotnet/releases/download/v0.22.2/rules_dotnet-v0.22.2.tar.gz", | ||
| "patches": { | ||
| "module_dot_bazel_version.patch": "sha256-jS0bNBAwNeJOylIjBXVvQApWA4+pWAxWuD2FBbaBHX4=", | ||
| "revert_additional_files_in_nuget_archive.patch": "sha256-DgXRtEr+vmKXPJnWNDEmDw7VqFCpGh6zrHyVBclQ+/Q=" | ||
| }, | ||
| "patch_strip": 1 | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use the runtime shipped with .NET 10.0.201, we should update
-p:RuntimeFrameworkVersion=10.0.0top:RuntimeFrameworkVersion=10.0.5(see my comment below)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
77a4a35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the tests the RuntimeFrameworkVersion is set here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aed0286