bazel-contrib / bazel-contrib/rules_dotnet

Bazel fetch on nuget_repo no longer works post bazel 7.2.0

Open
#476 8 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 trying to use this with bazel 8 and it appears as if there's some compat issues

If I upgrade the bazel version used in `e2e/net8.0` and then run bazel fetch for the paket deps I get the following snippet from a much larger output

Log output

```
ERROR: /private/var/tmp/_bazel_adam/ecda83633f5cd2436ab4868e2f1f2ac2/external/+main_extension+paket.main/newtonsoft.json/13.0.3/BUILD.bazel:5:15: configurable attribute "deps" in @@+main_extension+paket.main//newtonsoft.json/13.0.3:13.0.3 doesn't match this configuration. Would a default condition help?

Conditions checked:
@@rules_dotnet+//dotnet:tfm_net11
@@rules_dotnet+//dotnet:tfm_net20
@@rules_dotnet+//dotnet:tfm_net30
@@rules_dotnet+//dotnet:tfm_net35
@@rules_dotnet+//dotnet:tfm_net40
@@rules_dotnet+//dotnet:tfm_net403
@@rules_dotnet+//dotnet:tfm_net45
@@rules_dotnet+//dotnet:tfm_net451
@@rules_dotnet+//dotnet:tfm_net452
@@rules_dotnet+//dotnet:tfm_net46
@@rules_dotnet+//dotnet:tfm_net461
@@rules_dotnet+//dotnet:tfm_net462
@@rules_dotnet+//dotnet:tfm_net47
@@rules_dotnet+//dotnet:tfm_net471
@@rules_dotnet+//dotnet:tfm_net472
@@rules_dotnet+//dotnet:tfm_net48
@@rules_dotnet+//dotnet:tfm_net5.0
@@rules_dotnet+//dotnet:tfm_net6.0
@@rules_dotnet+//dotnet:tfm_net7.0
@@rules_dotnet+//dotnet:tfm_net8.0
@@rules_dotnet+//dotnet:tfm_net9.0
@@rules_dotnet+//dotnet:tfm_netcoreapp1.0
@@rules_dotnet+//dotnet:tfm_netcoreapp1.1
@@rules_dotnet+//dotnet:tfm_netcoreapp2.0
@@rules_dotnet+//dotnet:tfm_netcoreapp2.1
@@rules_dotnet+//dotnet:tfm_netcoreapp2.2
@@rules_dotnet+//dotnet:tfm_netcoreapp3.0
@@rules_dotnet+//dotnet:tfm_netcoreapp3.1
@@rules_dotnet+//dotnet:tfm_netstandard
@@rules_dotnet+//dotnet:tfm_netstandard1.0
@@rules_dotnet+//dotnet:tfm_netstandard1.1
@@rules_dotnet+//dotnet:tfm_netstandard1.2
@@rules_dotnet+//dotnet:tfm_netstandard1.3
@@rules_dotnet+//dotnet:tfm_netstandard1.4
@@rules_dotnet+//dotnet:tfm_netstandard1.5
@@rules_dotnet+//dotnet:tfm_netstandard1.6
@@rules_dotnet+//dotnet:tfm_netstandard2.0
@@rules_dotnet+//dotnet:tfm_netstandard2.1

To see a condition's definition, run: bazel query --output=build .

This instance of @@+main_extension+paket.main//newtonsoft.json/13.0.3:13.0.3 has configuration identifier 1f4b099. To inspect its configuration, run: bazel config 1f4b099.

For more help, see https://bazel.build/docs/configurable-attributes#faq-select-choose-condition.
```

I'm not sure where to start trying to debug this, so if you've any pointers would be happy to help out.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by upgrading the Bazel version used in e2e/net8.0 and running bazel fetch for the Paket dependencies. Start with the generated BUILD.bazel for newtonsoft.json/13.0.3 and the listed configuration conditions; done means the fetch completes successfully under Bazel 8.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.