• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2023 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15---
16expect:
17  exit_code: 1
18  stderr: |
19    gazelle: ERROR: failed to validate dependencies for target "//:invalid_imported_module":
20
21    "__init__.py", line 15: multiple targets (//foo:bar_1, //foo:bar_2) may be imported with "foo.bar": possible solutions:
22    	1. Disambiguate the above multiple targets by removing duplicate srcs entries.
23    	2. Use the '# gazelle:resolve py foo.bar TARGET_LABEL' BUILD file directive to resolve to one of the above targets.
24
25    "__init__.py", line 15: "foo" is an invalid dependency: possible solutions:
26    	1. Add it as a dependency in the requirements.txt file.
27    	2. Use the '# gazelle:resolve py foo TARGET_LABEL' BUILD file directive to resolve to a known dependency.
28    	3. Ignore it with a comment '# gazelle:ignore foo' in the Python file.
29
30    gazelle: ERROR: failed to validate dependencies for target "//:invalid_imported_module":
31
32    "__init__.py", line 18: "grpc" is an invalid dependency: possible solutions:
33    	1. Add it as a dependency in the requirements.txt file.
34    	2. Use the '# gazelle:resolve py grpc TARGET_LABEL' BUILD file directive to resolve to a known dependency.
35    	3. Ignore it with a comment '# gazelle:ignore grpc' in the Python file.
36