Skip to content

Remove sh_* wrappers from nodejs_* rules - #791

Closed
alexeagle wants to merge 1 commit into
bazel-contrib:masterfrom
alexeagle:issue51
Closed

alexeagle wants to merge 1 commit into
bazel-contrib:masterfrom
alexeagle:issue51

Conversation

@alexeagle

Copy link
Copy Markdown
Collaborator

These were a clumsy workaround for Windows but cause a number of problems.

Fixes #51
Fixes #733

Note to reviewers: this will require a bunch of manual testing on Windows I think.

Comment thread internal/node/node.bzl Outdated
name = "%s_bin" % name,
data = all_data,
name = name,
data = data + ["@bazel_tools//tools/bash/runfiles"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any reason we could not add this as an implicit dependency to the rules to completely get rid of the macro?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes certainly, I was being lazy

@Globegitter

Copy link
Copy Markdown

@alexeagle Removing the wrapper has an additional benefit of making it easier to access any providers nodejs_binary exports, like the one introduced in #863. Right now one has to access the _bin target which is not entirely clear without reading the source code.

@Globegitter

Copy link
Copy Markdown

Also another benefit I am just noticing of having the bash runfiles as an implicit dependency, right now the nodejs provider I have written has to include the bash files in its sources attribute rather than in the node_runfiles where it really belongs to. It is a small file so it will not make much of a difference in regards to caching I presume but it would still be nice to be able to differentiate it.

These were a clumsy workaround for Windows but cause a number of problems.

Fixes bazel-contrib#51
Fixes bazel-contrib#733
@alexeagle

Copy link
Copy Markdown
Collaborator Author

okay as expected this works everywhere but Windows. I need to setup a new windows testing environment...

@alexeagle

Copy link
Copy Markdown
Collaborator Author

@meteorcloudy picked this up and finished in #1078 thank you!!

@alexeagle alexeagle closed this Sep 6, 2019
@alexeagle
alexeagle deleted the issue51 branch September 6, 2019 20:40
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.

nodejs_test seems to be ignoring the timeout attribute jasmine_node_test should not need an sh_binary wrapper macro for nodejs_test

3 participants