Skip to content

Commit

Permalink
.Net 9 Support (#462)
Browse files Browse the repository at this point in the history
Added support for .Net 9
  • Loading branch information
purkhusid authored Nov 14, 2024
1 parent 4bc278e commit 5a8af18
Show file tree
Hide file tree
Showing 105 changed files with 1,990 additions and 3,672 deletions.
2 changes: 1 addition & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ matrix:
working_directory: ["", "examples"]
strict_deps: ["--@rules_dotnet//dotnet/settings:strict_deps=true", "--@rules_dotnet//dotnet/settings:strict_deps=false"]
flag_combo: [["--enable_bzlmod", "--@rules_dotnet//dotnet/settings:strict_deps=true"], ["--enable_bzlmod", "--@rules_dotnet//dotnet/settings:strict_deps=false"]]
e2e_working_directory: ["e2e/net6.0", "e2e/net7.0", "e2e/net8.0"]
e2e_working_directory: ["e2e/net8.0", "e2e/net9.0"]

tasks:
test_all:
Expand Down
1,002 changes: 505 additions & 497 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module(
)

dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
dotnet.toolchain(dotnet_version = "8.0.402")
dotnet.toolchain(dotnet_version = "9.0.100")
use_repo(dotnet, "dotnet_toolchains")

register_toolchains("@dotnet_toolchains//:all")
Expand Down
2 changes: 1 addition & 1 deletion dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"paket": {
"version": "8.0.0",
"version": "9.0.0",
"commands": [
"paket"
]
Expand Down
130 changes: 38 additions & 92 deletions dotnet/paket.paket2bazel_dependencies.bzl

Large diffs are not rendered by default.

43 changes: 21 additions & 22 deletions dotnet/paket.rules_dotnet_dev_nuget_packages.bzl

Large diffs are not rendered by default.

31 changes: 4 additions & 27 deletions dotnet/paket.rules_dotnet_nuget_packages.bzl

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions dotnet/private/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,3 @@ bzl_library(
srcs = ["toolchains_repo.bzl"],
visibility = ["//dotnet:__subpackages__"],
)

bzl_library(
name = "versions",
srcs = ["versions.bzl"],
visibility = ["//dotnet:__subpackages__"],
)
5 changes: 4 additions & 1 deletion dotnet/private/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _collect_transitive():
t[framework] = sets.union(sets.make([framework]), *[t[c] for c in compat])
return t

DEFAULT_TFM = "net8.0"
DEFAULT_TFM = "net9.0"
DEFAULT_RID = "base"

# A dict of target frameworks to the set of other framworks it can compile
Expand Down Expand Up @@ -73,6 +73,7 @@ FRAMEWORK_COMPATIBILITY = {
"net6.0": ["net5.0"],
"net7.0": ["net6.0"],
"net8.0": ["net7.0"],
"net9.0": ["net8.0"],
}

_subsystem_version = {
Expand Down Expand Up @@ -114,6 +115,7 @@ _subsystem_version = {
"net6.0": None,
"net7.0": None,
"net8.0": None,
"net9.0": None,
}

_default_lang_version_csharp = {
Expand Down Expand Up @@ -155,6 +157,7 @@ _default_lang_version_csharp = {
"net6.0": "10.0",
"net7.0": "11.0",
"net8.0": "12.0",
"net9.0": "13.0",
}

_net = FRAMEWORK_COMPATIBILITY.keys().index("net11")
Expand Down
10 changes: 10 additions & 0 deletions dotnet/private/sdk/apphost_packs/apphost_pack_lookup_table.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,14 @@ apphost_pack_lookup_table = {
"win-x64": "//dotnet/private/sdk/apphost_packs:net8.0_win-x64",
"win-arm64": "//dotnet/private/sdk/apphost_packs:net8.0_win-arm64",
},
"net9.0": {
"linux-x64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-x64",
"linux-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-arm64",
"linux-musl-x64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-musl-x64",
"linux-musl-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_linux-musl-arm64",
"osx-x64": "//dotnet/private/sdk/apphost_packs:net9.0_osx-x64",
"osx-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_osx-arm64",
"win-x64": "//dotnet/private/sdk/apphost_packs:net9.0_win-x64",
"win-arm64": "//dotnet/private/sdk/apphost_packs:net9.0_win-arm64",
},
}
40 changes: 24 additions & 16 deletions dotnet/private/sdk/apphost_packs/apphost_packs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def apphost_packs():
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
Expand All @@ -43,11 +43,19 @@ def apphost_packs():
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
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")
Loading

0 comments on commit 5a8af18

Please sign in to comment.