Update docs and readme for 4.5.0

This commit is contained in:
Adam Liddell 2023-09-12 13:04:37 +01:00
parent 6dd1799084
commit 38f4d41424
11 changed files with 33 additions and 46 deletions

View File

@ -6,8 +6,6 @@ tasks:
environment:
CC: clang
build_flags:
- "--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101"
- "--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101"
- "--cxxopt=-std=c++17"
- "--host_cxxopt=-std=c++17"
build_targets:
@ -28,8 +26,6 @@ tasks:
- "//scala/..."
test_flags:
- "--test_output=errors"
- "--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101"
- "--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101"
- "--cxxopt=-std=c++17"
- "--host_cxxopt=-std=c++17"
test_targets:
@ -109,8 +105,6 @@ tasks:
environment:
CC: clang
build_flags:
- "--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101"
- "--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101"
- "--cxxopt=-std=c++17"
- "--host_cxxopt=-std=c++17"
build_targets:
@ -132,8 +126,6 @@ tasks:
- "//swift/..."
test_flags:
- "--test_output=errors"
- "--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101"
- "--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101"
- "--cxxopt=-std=c++17"
- "--host_cxxopt=-std=c++17"
test_targets:
@ -295,8 +287,6 @@ tasks:
shell_commands:
- set -x
- export CC=clang
- export BAZEL_EXTRA_FLAGS="--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- export BAZEL_EXTRA_FLAGS="--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- make csharp_csharp_proto_compile_example
- make csharp_csharp_grpc_compile_example
- make csharp_csharp_proto_library_example
@ -308,8 +298,6 @@ tasks:
shell_commands:
- set -x
- export CC=clang
- export BAZEL_EXTRA_FLAGS="--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- export BAZEL_EXTRA_FLAGS="--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- make csharp_csharp_proto_compile_example
- make csharp_csharp_grpc_compile_example
- make csharp_csharp_proto_library_example
@ -354,8 +342,6 @@ tasks:
shell_commands:
- set -x
- export CC=clang
- export BAZEL_EXTRA_FLAGS="--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- export BAZEL_EXTRA_FLAGS="--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- make fsharp_fsharp_proto_compile_example
- make fsharp_fsharp_grpc_compile_example
- make fsharp_fsharp_proto_library_example
@ -367,8 +353,6 @@ tasks:
shell_commands:
- set -x
- export CC=clang
- export BAZEL_EXTRA_FLAGS="--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- export BAZEL_EXTRA_FLAGS="--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101 $BAZEL_EXTRA_FLAGS"
- make fsharp_fsharp_proto_compile_example
- make fsharp_fsharp_grpc_compile_example
- make fsharp_fsharp_proto_library_example

View File

@ -14,6 +14,13 @@
## Announcements 📣
#### 2023/09/12 - Version 4.5.0
[Version 4.5.0 has been released](https://github.com/rules-proto-grpc/rules_proto_grpc/releases/tag/4.5.0),
which contains a number of version updates, bug fixes and usability improvements over 4.4.0.
Additionally, the Rust rules contain a major change of underlying gRPC and Protobuf library; the
rules now use Tonic and Prost respectively
#### 2023/05/03 - Version 4.4.0
[Version 4.4.0 has been released](https://github.com/rules-proto-grpc/rules_proto_grpc/releases/tag/4.4.0),

View File

@ -2,7 +2,7 @@
load("//csharp:csharp_grpc_compile.bzl", "csharp_grpc_compile")
load("//:defs.bzl", "bazel_build_rule_common_attrs", "proto_compile_attrs")
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "csharp_library")
load("@rules_dotnet//dotnet:defs.bzl", "csharp_library")
def csharp_grpc_library(name, **kwargs):
# Compile protos

View File

@ -2,7 +2,7 @@
load("//csharp:csharp_proto_compile.bzl", "csharp_proto_compile")
load("//:defs.bzl", "bazel_build_rule_common_attrs", "proto_compile_attrs")
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "csharp_library")
load("@rules_dotnet//dotnet:defs.bzl", "csharp_library")
def csharp_proto_library(name, **kwargs):
# Compile protos

View File

@ -1,5 +1,5 @@
load("//csharp:defs.bzl", "csharp_grpc_library")
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "csharp_binary", "csharp_library")
load("@rules_dotnet//dotnet:defs.bzl", "csharp_binary", "csharp_library")
csharp_grpc_library(
name = "routeguide.dll",

View File

@ -2,10 +2,10 @@
load(
"//:repositories.bzl",
"io_bazel_rules_dotnet",
"rules_dotnet",
"rules_proto_grpc_repos",
)
def csharp_repos(**kwargs): # buildifier: disable=function-docstring
rules_proto_grpc_repos(**kwargs)
io_bazel_rules_dotnet(**kwargs)
rules_dotnet(**kwargs)

View File

@ -92,9 +92,9 @@ notified of new releases, you can use GitHub's 'Watch Releases Only' on the repo
http_archive(
name = "rules_proto_grpc",
sha256 = "928e4205f701b7798ce32f3d2171c1918b363e9a600390a25c876f075f1efc0a",
strip_prefix = "rules_proto_grpc-4.4.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.4.0/rules_proto_grpc-4.4.0.tar.gz"],
sha256 = "9ba7299c5eb6ec45b6b9a0ceb9916d0ab96789ac8218269322f0124c0c0d24e2",
strip_prefix = "rules_proto_grpc-4.5.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.5.0/rules_proto_grpc-4.5.0.tar.gz"],
)
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_toolchains", "rules_proto_grpc_repos")

View File

@ -2,9 +2,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_proto_grpc",
sha256 = "928e4205f701b7798ce32f3d2171c1918b363e9a600390a25c876f075f1efc0a",
strip_prefix = "rules_proto_grpc-4.4.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.4.0/rules_proto_grpc-4.4.0.tar.gz"],
sha256 = "9ba7299c5eb6ec45b6b9a0ceb9916d0ab96789ac8218269322f0124c0c0d24e2",
strip_prefix = "rules_proto_grpc-4.5.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.5.0/rules_proto_grpc-4.5.0.tar.gz"],
)
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")

View File

@ -14,6 +14,13 @@
## Announcements 📣
#### 2023/09/12 - Version 4.5.0
[Version 4.5.0 has been released](https://github.com/rules-proto-grpc/rules_proto_grpc/releases/tag/4.5.0),
which contains a number of version updates, bug fixes and usability improvements over 4.4.0.
Additionally, the Rust rules contain a major change of underlying gRPC and Protobuf library; the
rules now use Tonic and Prost respectively
#### 2023/05/03 - Version 4.4.0
[Version 4.4.0 has been released](https://github.com/rules-proto-grpc/rules_proto_grpc/releases/tag/4.4.0),

View File

@ -49,7 +49,7 @@ nuget_rules_proto_grpc_packages()`)
var csharpLibraryRuleTemplateString = `load("//{{ .Lang.Dir }}:{{ .Lang.Name }}_{{ .Rule.Kind }}_compile.bzl", "{{ .Lang.Name }}_{{ .Rule.Kind }}_compile")
load("//:defs.bzl", "bazel_build_rule_common_attrs", "proto_compile_attrs")
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "csharp_library")
load("@rules_dotnet//dotnet:defs.bzl", "csharp_library")
def {{ .Rule.Name }}(name, **kwargs):
# Compile protos

View File

@ -22,21 +22,10 @@ var ciPlatformsMap = map[string][]string{
"macos": []string{"macos"},
}
// https://github.com/bazelbuild/rules_dotnet/issues/225
// TODO: Remove if becomes unnecessary
var dotnetPlatformFlags = map[string][]string{
"ubuntu2204": []string{
"--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101",
"--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:linux_amd64_6.0.101",
},
"windows": []string{
"--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:windows_amd64_6.0.101",
"--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:windows_amd64_6.0.101",
},
"macos": []string{
"--host_platform=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101",
"--platforms=@io_bazel_rules_dotnet//dotnet/toolchain:darwin_amd64_6.0.101",
},
var extraPlatformFlags = map[string][]string{
"ubuntu2204": []string{},
"windows": []string{},
"macos": []string{},
}
func main() {
@ -482,7 +471,7 @@ func mustWriteBazelCIPresubmitYml(dir string, languages []*Language, availableTe
out.w(" environment:")
out.w(` CC: clang`)
out.w(" build_flags:")
for _, flag := range dotnetPlatformFlags[ciPlatform] {
for _, flag := range extraPlatformFlags[ciPlatform] {
out.w(` - "%s"`, flag)
}
out.w(` - "--cxxopt=-std=c++17"`)
@ -496,7 +485,7 @@ func mustWriteBazelCIPresubmitYml(dir string, languages []*Language, availableTe
}
out.w(" test_flags:")
out.w(` - "--test_output=errors"`)
for _, flag := range dotnetPlatformFlags[ciPlatform] {
for _, flag := range extraPlatformFlags[ciPlatform] {
out.w(` - "%s"`, flag)
}
out.w(` - "--cxxopt=-std=c++17"`)
@ -545,7 +534,7 @@ func mustWriteBazelCIPresubmitYml(dir string, languages []*Language, availableTe
out.w(" - set -x")
out.w(" - export CC=clang")
if lang.Name == "csharp" || lang.Name == "fsharp" {
for _, flag := range dotnetPlatformFlags[ciPlatform] {
for _, flag := range extraPlatformFlags[ciPlatform] {
out.w(` - export BAZEL_EXTRA_FLAGS="%s $BAZEL_EXTRA_FLAGS"`, flag)
}
}