Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial example of generating ts_project #4

Closed
wants to merge 1 commit into from
Closed

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.

2 participants