-
Notifications
You must be signed in to change notification settings - Fork 83
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
The csharp_repositories functions reference to dotnet/nunit.BUILD doesn't work #6
Comments
This is a known issue which has a fix at head (see bazelbuild/bazel#855). The csharp rules should be updated to refer to nunit.BUILD by label, btu if you're using an older version of Bazel, you'll need to just copy the nunit.BUILD file to your current repository. |
Okay so I just tried using a fully qualified label with head bazel and I still get an error: /private/var/tmp/_bazel_jwall/a4f05aced329c5d1ca55a18062777a02/external/io_bazel_rules_dotnet/examples/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_framework', but this target could not be found because of: no such package '@nunit//': Unable to load package for @io_bazel_rules_dotnet//dotnet/nunit.BUILD: not found. Am I just doing this wrong or is the fix not in github yet? |
never mind. found the error. |
@davidzchen Looks like it has to be a fully qualified name to work. so |
The problem with fully-qualifying the label that way is that it would only work if there is an external repository called IIUC, this recent change by @kchodorow should fix this issue so that referring to @zaphar, which version of Bazel are you running? Can you try running Bazel at HEAD and see if this works for you? |
To verify I just git pulled and rebuilt bazel from head and then tested again. I still get this error: /private/var/tmp/_bazel_jwall/a4f05aced329c5d1ca55a18062777a02/external/io_bazel_rules_dotnet/examples/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_framework', but this target could not be found because of: no such package '@nunit//': Unable to load package for //dotnet:nunit.BUILD: not found. I can get this consistently by copying the examples directory from the rules_dotnet repo to a different directory and importing the rules_dotnet workspace as a local repo then trying to run the |
My bazel is on revision: e25642a2bcb68d553fe56b0c3d6262544b15a870 |
Hrmmm So after looking at the advice given to the Closure rules I think the fix is to do |
It works if you use it inside this repositories workspace but if you include this repository in a different workspace it can't find the build file. It looks for it in the current workspace instead.
/private/var/tmp/_bazel_jwall/a4f05aced329c5d1ca55a18062777a02/external/io_bazel_rules_dotnet/bazel-bazel_rules_dotnet/examples/example_test/BUILD:3:1: every rule of type csharp_nunit_test implicitly depends upon the target '@nunit//:nunit_exe_libs', but this target could not be found because of: no such package '@nunit//': In new_http_archive rule //external:nunit the 'build_file' attribute does not specify an existing file (/Users/jwall/Downloads/csharp_tests/dotnet/nunit.BUILD does not exist).
The text was updated successfully, but these errors were encountered: