Skip to content
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

Newest version of rules_dotnet #259

Open
Clement-Jean opened this issue May 25, 2023 · 1 comment
Open

Newest version of rules_dotnet #259

Clement-Jean opened this issue May 25, 2023 · 1 comment
Labels
lang-csharp C# rules specific lang-fsharp F# rules specific

Comments

@Clement-Jean
Copy link

Clement-Jean commented May 25, 2023

Description

I saw that this is working with an older version of rules_dotnet. On top of that it is using the @io_bazel_rules_dotnet name which is not used in the rules_dotnet project. This makes overriding the version infeasible.

Right now, I have the following:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

# Dotnet
http_archive(
    name = "rules_dotnet",
    sha256 = "77575d68c609d98b92f3df8db79944e7b60c035766e1c233349aeb1659c86ff9",
    strip_prefix = "rules_dotnet-0.8.12",
    url = "https://github.com/bazelbuild/rules_dotnet/releases/download/v0.8.12/rules_dotnet-v0.8.12.tar.gz",
)

load(
    "@rules_dotnet//dotnet:repositories.bzl",
    "dotnet_register_toolchains",
    "rules_dotnet_dependencies",
)

rules_dotnet_dependencies()

dotnet_register_toolchains("dotnet", "7.0.101")

load("@rules_dotnet//dotnet:rules_dotnet_nuget_packages.bzl", "rules_dotnet_nuget_packages")

rules_dotnet_nuget_packages()

load("@rules_dotnet//dotnet:paket2bazel_dependencies.bzl", "paket2bazel_dependencies")

paket2bazel_dependencies()

load("//:paket.bzl", "paket")

paket()

# rules_proto

http_archive(
    name = "rules_proto_grpc",
    urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/1.0.2.tar.gz"],
    sha256 = "5f0f2fc0199810c65a2de148a52ba0aff14d631d4e8202f41aff6a9d590a471b",
    strip_prefix = "rules_proto_grpc-1.0.2",
)

load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_toolchains", "rules_proto_grpc_repos")
rules_proto_grpc_toolchains()
rules_proto_grpc_repos()

load("@rules_proto_grpc//csharp:repositories.bzl", rules_proto_grpc_csharp_repos="csharp_repos")

rules_proto_grpc_csharp_repos()

And this is returning this error:

No matching toolchains found for types

but the toolchain is defined for by rules_dotnet with dotnet_register_toolchains("dotnet", "7.0.101")

Could we update the names and version so that we can use rules_dotnet and rules_proto_grpc together?

@aaliddell aaliddell added lang-csharp C# rules specific lang-fsharp F# rules specific labels Jun 4, 2023
@saiimons
Copy link

saiimons commented Sep 8, 2023

As an FYI, it's not too difficult to integrate manuall, here's an example:

https://github.com/saiimons/bazel-dotnet-test/blob/main/BUILD.bazel

(Would be nice for this feature to work right out of the box, tho)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-csharp C# rules specific lang-fsharp F# rules specific
Projects
None yet
Development

No branches or pull requests

3 participants