bazel-contrib / bazel-contrib/rules_dotnet

Transitive dependencies of nuget packages don't contribute to build

Open
#413 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
209
Forks
98
Avg merge
3h 59m
Merged PRs (30d)
14

Description

Hi,

I'm running into a problem with using the `xunit` package from nuget with the paket/bazel integration.
The xunit package is itself empty, as far as I'm aware, and transitively depends on `xunit.core`, which in turn depends on `xunit.extensibility.core` which has the actual DLL which dotnet needs to compile against.

I have setup a simple project at https://github.com/criemen/rules-dotnet-repro, which compiles with `dotnet build`, but fails to compile with `bazelisk build //:Program`, as bazel can't find the `Xunit` namespace.
Looking into `Program.dll-0.params`, this seems to be the case as the transitive dependency `xunit.extensibility.core` doesn't contribute its DLL to the build invocation.

Adding `@paket.main//xunit.extensibility.core` to the deps of the project fixes the build, as expected.
As this is an implementation detail of the `xunit` package, as user I don't want to think about that and specify that dependency by hand.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.