Skip to content

Conversation

@alexeagle
Copy link
Member

Note, we shouldn't need deps.bzl here - but without it, I see that go_repository generates wrong BUILD files for esbuild, missing the select clauses in deps for org_golang_x_sys. Seems like a bug in gazelle.

@alexeagle alexeagle requested a review from jbedard May 1, 2022 16:36

ts_project(
name = "ts_gazelle",
srcs = ["lib/foo.ts"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbedard I confirmed that from userland we get the same behavior as the gazelle_generation_test: we don't ever create new BUILD files

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems to be the case. As I understand it gazelle invokes the GenerateRules method based on which BUILDs already exist.

See the sub-directories logic which I essentially copied from python:
https://github.com/bazelbuild/rules_python/blob/0.8.1/gazelle/generate.go#L105
https://github.com/aspect-build/rules_ts/blob/2ae033f0e4ea0ec1081de67231f7c07347797d96/gazelle/generate.go#L192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants