-
Notifications
You must be signed in to change notification settings - Fork 522
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
Add support for Label in nodejs_binary and rollup_bundle entry_point #777
Add support for Label in nodejs_binary and rollup_bundle entry_point #777
Conversation
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
04a575f
to
9e0c317
Compare
2275c4d
to
6cb6b07
Compare
47b7bd4
to
b6efd59
Compare
936615d
to
0a63964
Compare
], | ||
entry_point = "internal/e2e/rollup/foo.js", | ||
srcs = ["bar.js"], | ||
entry_point = ":foo.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting that you don't have to specify foo.js in the srcs. It seems like it reduces one way users can fall off the happy path. on the other hand it means you have to consider entry_point when enumerating the inputs to a rule.
Should we give it more thought?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm. That's a good question. One strike against doing it this way is that if the user specifies :foo.ts
as the entry_point they still have to add the ts_library :foo_lib
to deps. I'm not sure what is best. On the other hand, the user adding :foo.js
to entry_point
and to srcs
doesn't break anything with the current approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some smell however with not having the file in srcs
as seen here: https://github.com/bazelbuild/rules_nodejs/pull/777/files#diff-6e8a939ed5da5eca956cd2f53701b77e. Probably better to force it to be specified
c849595
to
7220fbf
Compare
5de2223
to
d4bc308
Compare
ba05673
to
80415b5
Compare
…le entry_point change (bazel-contrib#480) Also updates parcel example entry_point to label
4d66dbd
to
02e19b7
Compare
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
Replaces #480
Closes #32
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
nodejs_binary#entry_point was a string.
What is the new behavior?
nodejs_binary#entry_point is now a Label.
Does this PR introduce a breaking change?
The
entry_point
accepts a target's name as an entry point. If the target is a rule, it should produce the JavaScript entry file that will be passed to the nodejs_binary rule). For example:If the entry JavaScript file belongs to the same package (as the BUILD file), you can simply reference it by its relative name to the package directory: