# Copyright 2023 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- expect: exit_code: 1 stderr: | gazelle: ERROR: failed to validate dependencies for target "//:invalid_imported_module": "__init__.py", line 15: multiple targets (//foo:bar_1, //foo:bar_2) may be imported with "foo.bar": possible solutions: 1. Disambiguate the above multiple targets by removing duplicate srcs entries. 2. Use the '# gazelle:resolve py foo.bar TARGET_LABEL' BUILD file directive to resolve to one of the above targets. "__init__.py", line 15: "foo" is an invalid dependency: possible solutions: 1. Add it as a dependency in the requirements.txt file. 2. Use the '# gazelle:resolve py foo TARGET_LABEL' BUILD file directive to resolve to a known dependency. 3. Ignore it with a comment '# gazelle:ignore foo' in the Python file. gazelle: ERROR: failed to validate dependencies for target "//:invalid_imported_module": "__init__.py", line 18: "grpc" is an invalid dependency: possible solutions: 1. Add it as a dependency in the requirements.txt file. 2. Use the '# gazelle:resolve py grpc TARGET_LABEL' BUILD file directive to resolve to a known dependency. 3. Ignore it with a comment '# gazelle:ignore grpc' in the Python file.