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

Scope naming for kt_jvm intermediate targets #3

Merged
merged 2 commits into from
Jul 20, 2022
Merged

Scope naming for kt_jvm intermediate targets #3

merged 2 commits into from
Jul 20, 2022

Conversation

sugarmanz
Copy link
Member

Release Notes

If the target name is the same as the local package name, the generated targets will omit the names.

Regular scope naming strategy:

# path/to/module-a/BUILD
kt_jvm(name = "module-a-sub-lib")

Generates linting targets against module-a-sub-lib:

//path/to/module-a:module-a-sub-lib-lint
//path/to/module-a:module-a-sub-lib-lint-fix

Optimized scope naming strategy:

# path/to/module-a/BUILD
kt_jvm(name = "module-a")

Generates linting targets against module-a-sub-lib:

//path/to/module-a:lint
//path/to/module-a:lint-fix

@adierkens
Copy link
Member

Seems reasonable. Might be worth following the same convention in the JS rules too.

With scoped package names (@foo/bar) the local package name won't ever match though which can be pretty annoying.

@sugarmanz
Copy link
Member Author

@adierkens would it be worth changing the target name vs NPM package name strategy to make that a bit more convenient?

@sugarmanz sugarmanz added the minor Increment the minor version when merged label Jul 19, 2022
@sugarmanz sugarmanz merged commit 808216b into main Jul 20, 2022
@sugarmanz sugarmanz deleted the scope_name branch July 20, 2022 22:42
@intuit-svc
Copy link

🚀 PR was released in v0.4.0 🚀

@intuit-svc intuit-svc added the released This issue/pull request has been released. label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants