Skip to content

Commit c74a8ce

Browse files
committed
(gazelle) Always generate BUILD rules in a new folder regardless if it has entrypoint file
1 parent f6feca1 commit c74a8ce

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

gazelle/python/generate.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ func (py *Python) GenerateRules(args language.GenerateArgs) language.GenerateRes
8585
if parent != nil && parent.CoarseGrainedGeneration() {
8686
return language.GenerateResult{}
8787
}
88-
} else if !hasEntrypointFile(args.Dir) {
89-
return language.GenerateResult{}
9088
}
9189
}
9290

gazelle/python/testdata/subdir_sources/foo/has_main/BUILD.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ py_binary(
1111
srcs = ["__main__.py"],
1212
main = "__main__.py",
1313
visibility = ["//:__subpackages__"],
14-
deps = [":has_main"],
14+
deps = ["//foo"],
1515
)

gazelle/python/testdata/subdir_sources/foo/has_test/BUILD.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ py_test(
1010
name = "has_test_test",
1111
srcs = ["__test__.py"],
1212
main = "__test__.py",
13-
deps = [":has_test"],
13+
deps = ["//foo"],
1414
)

0 commit comments

Comments
 (0)