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

feat: add support for Label in nodejs_binary#entry_point #480

Closed
wants to merge 1 commit into from
Closed

feat: add support for Label in nodejs_binary#entry_point #480

wants to merge 1 commit into from

Conversation

manekinekko
Copy link
Collaborator

@manekinekko manekinekko commented Dec 21, 2018

Closes #32

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

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?

  • Yes
  • No

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:

       filegroup(
           name = "entry_file",
           srcs = ["workspace/path/to/entry/file"]
       )
       nodejs_binary(
         name = "my_binary",
         ...
         entry_point = ":entry_file",
       )

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:

        nodejs_binary(
          name = "my_binary",
          ...
          entry_point = ":file.js",
        )

⚠️ Downstream Rules That Need To Be Updated ⚠️

@manekinekko
Copy link
Collaborator Author

Please ignore the failing tests. This PR is in WIP.

@manekinekko
Copy link
Collaborator Author

@alexeagle you mentioned that we shouldn't actually use the expand_path_into_runfiles helpe and that Bazel has built-in function to get the path for a file. Which function did you have in mind?

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to determine that you authored the commits in this PR. Maybe you used a different email address in the git commits than was used to sign the CLA? If someone else authored these commits, then please add them to this pull request and have them confirm that they're okay with them being contributed to Google. If there are co-authors, make sure they're formatted properly.

In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@manekinekko manekinekko changed the title WIP: feat: add support for Label in nodejs_binary#entry_point feat: add support for Label in nodejs_binary#entry_point Mar 26, 2019
@googlebot
Copy link

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.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to determine that you authored the commits in this PR. Maybe you used a different email address in the git commits than was used to sign the CLA? If someone else authored these commits, then please add them to this pull request and have them confirm that they're okay with them being contributed to Google. If there are co-authors, make sure they're formatted properly.

In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels Apr 1, 2019
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@manekinekko
Copy link
Collaborator Author

manekinekko commented Apr 12, 2019

Blocked by #691

@manekinekko
Copy link
Collaborator Author

manekinekko commented Apr 17, 2019

Status updates (with #691 applied locally):
./scripts/test_packages_all.sh
./scripts/test_examples_all.sh
./scripts/test_legacy_e2e_all.sh
./scripts/test_e2e_all.sh(because of firefox)

@gregmagolan
Copy link
Collaborator

Replaced by #777

gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request May 23, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 23, 2019
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request May 24, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 24, 2019
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request May 29, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 30, 2019
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request May 31, 2019
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 2, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 2, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 2, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 3, 2019
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 5, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 5, 2019
Also updates rollup_bundle entry_point and parcel example entry_point to labels
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 5, 2019
Also updates rollup_bundle entry_point and parcel example entry_point to labels
gregmagolan pushed a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 6, 2019
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 6, 2019
Also updates rollup_bundle entry_point and parcel example entry_point to labels
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 6, 2019
Also updates rollup_bundle entry_point and parcel example entry_point to labels
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 6, 2019
Also updates rollup_bundle entry_point and parcel example entry_point to labels
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 6, 2019
Also updates rollup_bundle entry_point and parcel example entry_point to labels
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 6, 2019
Also updates rollup_bundle entry_point and parcel example entry_point to labels
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this pull request Jun 6, 2019
…le entry_point change (bazel-contrib#480)

Also updates parcel example entry_point to label
alexeagle pushed a commit that referenced this pull request Jun 6, 2019
…le entry_point change (#480)

Also updates parcel example entry_point to label
alexeagle pushed a commit to alexeagle/rules_nodejs that referenced this pull request Oct 17, 2020
Closes bazel-contrib#480

PiperOrigin-RevId: 288497658
alexeagle pushed a commit to alexeagle/rules_nodejs that referenced this pull request Oct 18, 2020
Closes bazel-contrib#480

PiperOrigin-RevId: 288497658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for entry points relative to current BUILD file directory
4 participants