Skip to content

Commit 5a8af18

Browse files
authored
.Net 9 Support (#462)
Added support for .Net 9
1 parent 4bc278e commit 5a8af18

File tree

105 files changed

+1990
-3672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1990
-3672
lines changed

.bazelci/presubmit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ matrix:
77
working_directory: ["", "examples"]
88
strict_deps: ["--@rules_dotnet//dotnet/settings:strict_deps=true", "--@rules_dotnet//dotnet/settings:strict_deps=false"]
99
flag_combo: [["--enable_bzlmod", "--@rules_dotnet//dotnet/settings:strict_deps=true"], ["--enable_bzlmod", "--@rules_dotnet//dotnet/settings:strict_deps=false"]]
10-
e2e_working_directory: ["e2e/net6.0", "e2e/net7.0", "e2e/net8.0"]
10+
e2e_working_directory: ["e2e/net8.0", "e2e/net9.0"]
1111

1212
tasks:
1313
test_all:

.paket/Paket.Restore.targets

+505-497
Large diffs are not rendered by default.

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module(
88
)
99

1010
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
11-
dotnet.toolchain(dotnet_version = "8.0.402")
11+
dotnet.toolchain(dotnet_version = "9.0.100")
1212
use_repo(dotnet, "dotnet_toolchains")
1313

1414
register_toolchains("@dotnet_toolchains//:all")

dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "8.0.0",
6+
"version": "9.0.0",
77
"commands": [
88
"paket"
99
]

dotnet/paket.paket2bazel_dependencies.bzl

+38-92
Large diffs are not rendered by default.

dotnet/paket.rules_dotnet_dev_nuget_packages.bzl

+21-22
Large diffs are not rendered by default.

dotnet/paket.rules_dotnet_nuget_packages.bzl

+4-27
Large diffs are not rendered by default.

dotnet/private/BUILD.bazel

-6
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,3 @@ bzl_library(
130130
srcs = ["toolchains_repo.bzl"],
131131
visibility = ["//dotnet:__subpackages__"],
132132
)
133-
134-
bzl_library(
135-
name = "versions",
136-
srcs = ["versions.bzl"],
137-
visibility = ["//dotnet:__subpackages__"],
138-
)

dotnet/private/common.bzl

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def _collect_transitive():
2222
t[framework] = sets.union(sets.make([framework]), *[t[c] for c in compat])
2323
return t
2424

25-
DEFAULT_TFM = "net8.0"
25+
DEFAULT_TFM = "net9.0"
2626
DEFAULT_RID = "base"
2727

2828
# A dict of target frameworks to the set of other framworks it can compile
@@ -73,6 +73,7 @@ FRAMEWORK_COMPATIBILITY = {
7373
"net6.0": ["net5.0"],
7474
"net7.0": ["net6.0"],
7575
"net8.0": ["net7.0"],
76+
"net9.0": ["net8.0"],
7677
}
7778

7879
_subsystem_version = {
@@ -114,6 +115,7 @@ _subsystem_version = {
114115
"net6.0": None,
115116
"net7.0": None,
116117
"net8.0": None,
118+
"net9.0": None,
117119
}
118120

119121
_default_lang_version_csharp = {
@@ -155,6 +157,7 @@ _default_lang_version_csharp = {
155157
"net6.0": "10.0",
156158
"net7.0": "11.0",
157159
"net8.0": "12.0",
160+
"net9.0": "13.0",
158161
}
159162

160163
_net = FRAMEWORK_COMPATIBILITY.keys().index("net11")

dotnet/private/sdk/apphost_packs/apphost_pack_lookup_table.bzl

+10
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ apphost_pack_lookup_table = {
5858
"win-x64": "//dotnet/private/sdk/apphost_packs:net8.0_win-x64",
5959
"win-arm64": "//dotnet/private/sdk/apphost_packs:net8.0_win-arm64",
6060
},
61+
"net9.0": {
62+
"linux-x64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-x64",
63+
"linux-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-arm64",
64+
"linux-musl-x64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-musl-x64",
65+
"linux-musl-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-musl-arm64",
66+
"osx-x64": "//dotnet/private/sdk/apphost_packs:net9.0_osx-x64",
67+
"osx-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_osx-arm64",
68+
"win-x64": "//dotnet/private/sdk/apphost_packs:net9.0_win-x64",
69+
"win-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_win-arm64",
70+
},
6171
}

dotnet/private/sdk/apphost_packs/apphost_packs.bzl

+24-16
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ def apphost_packs():
2727
apphost_pack(name = "net5.0_osx-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-x64.v5.0.17", target_framework = "net5.0", runtime_identifier = "osx-x64")
2828
apphost_pack(name = "net5.0_win-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-x64.v5.0.17", target_framework = "net5.0", runtime_identifier = "win-x64")
2929
apphost_pack(name = "net5.0_win-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-arm64.v5.0.17", target_framework = "net5.0", runtime_identifier = "win-arm64")
30-
apphost_pack(name = "net6.0_linux-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-x64.v6.0.33", target_framework = "net6.0", runtime_identifier = "linux-x64")
31-
apphost_pack(name = "net6.0_linux-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-arm64.v6.0.33", target_framework = "net6.0", runtime_identifier = "linux-arm64")
32-
apphost_pack(name = "net6.0_linux-musl-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-x64.v6.0.33", target_framework = "net6.0", runtime_identifier = "linux-musl-x64")
33-
apphost_pack(name = "net6.0_linux-musl-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-arm64.v6.0.33", target_framework = "net6.0", runtime_identifier = "linux-musl-arm64")
34-
apphost_pack(name = "net6.0_osx-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-x64.v6.0.33", target_framework = "net6.0", runtime_identifier = "osx-x64")
35-
apphost_pack(name = "net6.0_osx-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-arm64.v6.0.33", target_framework = "net6.0", runtime_identifier = "osx-arm64")
36-
apphost_pack(name = "net6.0_win-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-x64.v6.0.33", target_framework = "net6.0", runtime_identifier = "win-x64")
37-
apphost_pack(name = "net6.0_win-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-arm64.v6.0.33", target_framework = "net6.0", runtime_identifier = "win-arm64")
30+
apphost_pack(name = "net6.0_linux-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-x64.v6.0.36", target_framework = "net6.0", runtime_identifier = "linux-x64")
31+
apphost_pack(name = "net6.0_linux-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-arm64.v6.0.36", target_framework = "net6.0", runtime_identifier = "linux-arm64")
32+
apphost_pack(name = "net6.0_linux-musl-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-x64.v6.0.36", target_framework = "net6.0", runtime_identifier = "linux-musl-x64")
33+
apphost_pack(name = "net6.0_linux-musl-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-arm64.v6.0.36", target_framework = "net6.0", runtime_identifier = "linux-musl-arm64")
34+
apphost_pack(name = "net6.0_osx-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-x64.v6.0.36", target_framework = "net6.0", runtime_identifier = "osx-x64")
35+
apphost_pack(name = "net6.0_osx-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-arm64.v6.0.36", target_framework = "net6.0", runtime_identifier = "osx-arm64")
36+
apphost_pack(name = "net6.0_win-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-x64.v6.0.36", target_framework = "net6.0", runtime_identifier = "win-x64")
37+
apphost_pack(name = "net6.0_win-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-arm64.v6.0.36", target_framework = "net6.0", runtime_identifier = "win-arm64")
3838
apphost_pack(name = "net7.0_linux-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-x64.v7.0.20", target_framework = "net7.0", runtime_identifier = "linux-x64")
3939
apphost_pack(name = "net7.0_linux-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-arm64.v7.0.20", target_framework = "net7.0", runtime_identifier = "linux-arm64")
4040
apphost_pack(name = "net7.0_linux-musl-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-x64.v7.0.20", target_framework = "net7.0", runtime_identifier = "linux-musl-x64")
@@ -43,11 +43,19 @@ def apphost_packs():
4343
apphost_pack(name = "net7.0_osx-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-arm64.v7.0.20", target_framework = "net7.0", runtime_identifier = "osx-arm64")
4444
apphost_pack(name = "net7.0_win-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-x64.v7.0.20", target_framework = "net7.0", runtime_identifier = "win-x64")
4545
apphost_pack(name = "net7.0_win-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-arm64.v7.0.20", target_framework = "net7.0", runtime_identifier = "win-arm64")
46-
apphost_pack(name = "net8.0_linux-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-x64.v8.0.8", target_framework = "net8.0", runtime_identifier = "linux-x64")
47-
apphost_pack(name = "net8.0_linux-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-arm64.v8.0.8", target_framework = "net8.0", runtime_identifier = "linux-arm64")
48-
apphost_pack(name = "net8.0_linux-musl-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-x64.v8.0.8", target_framework = "net8.0", runtime_identifier = "linux-musl-x64")
49-
apphost_pack(name = "net8.0_linux-musl-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-arm64.v8.0.8", target_framework = "net8.0", runtime_identifier = "linux-musl-arm64")
50-
apphost_pack(name = "net8.0_osx-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-x64.v8.0.8", target_framework = "net8.0", runtime_identifier = "osx-x64")
51-
apphost_pack(name = "net8.0_osx-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-arm64.v8.0.8", target_framework = "net8.0", runtime_identifier = "osx-arm64")
52-
apphost_pack(name = "net8.0_win-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-x64.v8.0.8", target_framework = "net8.0", runtime_identifier = "win-x64")
53-
apphost_pack(name = "net8.0_win-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-arm64.v8.0.8", target_framework = "net8.0", runtime_identifier = "win-arm64")
46+
apphost_pack(name = "net8.0_linux-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-x64.v8.0.11", target_framework = "net8.0", runtime_identifier = "linux-x64")
47+
apphost_pack(name = "net8.0_linux-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-arm64.v8.0.11", target_framework = "net8.0", runtime_identifier = "linux-arm64")
48+
apphost_pack(name = "net8.0_linux-musl-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-x64.v8.0.11", target_framework = "net8.0", runtime_identifier = "linux-musl-x64")
49+
apphost_pack(name = "net8.0_linux-musl-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-arm64.v8.0.11", target_framework = "net8.0", runtime_identifier = "linux-musl-arm64")
50+
apphost_pack(name = "net8.0_osx-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-x64.v8.0.11", target_framework = "net8.0", runtime_identifier = "osx-x64")
51+
apphost_pack(name = "net8.0_osx-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-arm64.v8.0.11", target_framework = "net8.0", runtime_identifier = "osx-arm64")
52+
apphost_pack(name = "net8.0_win-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-x64.v8.0.11", target_framework = "net8.0", runtime_identifier = "win-x64")
53+
apphost_pack(name = "net8.0_win-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-arm64.v8.0.11", target_framework = "net8.0", runtime_identifier = "win-arm64")
54+
apphost_pack(name = "net9.0_linux-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-x64.v9.0.0", target_framework = "net9.0", runtime_identifier = "linux-x64")
55+
apphost_pack(name = "net9.0_linux-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-arm64.v9.0.0", target_framework = "net9.0", runtime_identifier = "linux-arm64")
56+
apphost_pack(name = "net9.0_linux-musl-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-x64.v9.0.0", target_framework = "net9.0", runtime_identifier = "linux-musl-x64")
57+
apphost_pack(name = "net9.0_linux-musl-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.linux-musl-arm64.v9.0.0", target_framework = "net9.0", runtime_identifier = "linux-musl-arm64")
58+
apphost_pack(name = "net9.0_osx-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-x64.v9.0.0", target_framework = "net9.0", runtime_identifier = "osx-x64")
59+
apphost_pack(name = "net9.0_osx-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.osx-arm64.v9.0.0", target_framework = "net9.0", runtime_identifier = "osx-arm64")
60+
apphost_pack(name = "net9.0_win-x64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-x64.v9.0.0", target_framework = "net9.0", runtime_identifier = "win-x64")
61+
apphost_pack(name = "net9.0_win-arm64", pack = "@dotnet.apphost_packs//microsoft.netcore.app.host.win-arm64.v9.0.0", target_framework = "net9.0", runtime_identifier = "win-arm64")

0 commit comments

Comments
 (0)