Fix imports when --experimental_python_import_all_repositories=false #593
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes breakage for users of this repository when
--experimental_python_import_all_repositories=false
is set, which the Bazel team would like to do in bazelbuild/bazel#2636.Without this change, users get the error:
Because imports can always be done with the absolute workspace name, changing these imports still works fine for tests in this repository and for users who have
--experimental_python_import_all_repositories=true
.I am not clear on the intention of
not_named_rules_pkg
in the tests and what the implications are of me changing that torules_pkg
. It was important to change because otherwise the source files would all need to importnot_named_rules_pkg.blah.blah
which of course would be nonsense.There is some error in the build rules for
//tests/rpm:analysis_tests_conflicting_inputs_base
that occurs at head, but otherwise all tests appear to pass with this change.