-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Hard crash due to "No such attribute testonly in new_http_archive rule //external:zlib" #3676
Comments
This looks like it is partially caused by the new_http_archive and bind call in the WORKSPACE file both using the name "zlib". If I change them to be different then it doesn't crash. |
Looks like we have the solution here, I'm closing this issue, please reopen if having any more questions. |
I have a workaround not a solution, so please reopen (the acls don't let me do it myself.) The bug here is that bazel crashes on some input, which it should never do, it should instead nicely print an error message if there is an error. There is also the problem that the workspace file is accepted, and many things work but some particular configuration of rules don't like the reused names. Either using the name twice is an error and there should be always be an error message in that scenario or what ever thing is erroring out needs to figure out how to handle this situation and not produce an error. |
https://bazel-review.googlesource.com/c/bazel/+/31892 is the work towards fixing the hard crash. We need to revisit the general question of duplicate names (see also #588, #1952) |
…: target. Work towards #3676. The behavior is still incorrect (we should in fact disallow this), but at least there is no hard crash. Change-Id: I5181dba73ad725d20b2ea82b2f19e86664b9dbff PiperOrigin-RevId: 181954820
Hard crash is fixed in 822a8b3 |
Source code:
https://github.com/endobson/examples/tree/testonly-crash
bazel version 0.5.4
The text was updated successfully, but these errors were encountered: