Uh oh!
There was an error while loading. Please reload this page.
compile-test: allow overriding nodejs binary location - #37611
Conversation
rust-highfive
commented
Nov 6, 2016
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
513a907 to
ed9a372CompareTimNN
commented
Nov 6, 2016
There already seems to be a |
bors
commented
Nov 6, 2016
☔ The latest upstream changes (presumably #37597) made this pull request unmergeable. Please resolve the merge conflicts. |
Mark-Simulacrum
commented
Nov 6, 2016
TimNN
commented
Nov 6, 2016
Mh, there is some detection in |
alexcrichton
commented
Nov 6, 2016
Thanks for the PR! I agree with @TimNN that the best place for this is probably in rustbuild itself, we already need the node executable to run other unit test suites like the standard library. Perhaps this logic could be moved there and continue to be communicated to compiletest via this flag? |
alexcrichton
commented
Nov 10, 2016
@Mark-Simulacrum thoughts about updating to place this logic in rustbuild's detection and passing it down to compiletest that way? |
TimNN
commented
Nov 10, 2016
@alexcrichton: I'm pretty sure that logic is already present in rustbuild, isn't it? See https://github.com/rust-lang/rust/blob/master/src/bootstrap/sanity.rs#L84-L89: // Look for the nodejs command, needed for emscripten testingifletSome(node) = have_cmd("node".as_ref()){
build.config.nodejs = Some(node);}elseifletSome(node) = have_cmd("nodejs".as_ref()){
build.config.nodejs = Some(node);} |
e9d9d46 to
c3ed357CompareMark-Simulacrum
commented
Nov 10, 2016
I think I updated this as @alexcrichton suggested (with rustbuild), but I don't have a good way to test, since I don't use rustbuild locally. If someone can give me a set of commands to run then I can run those. |
There was a problem hiding this comment.
No need for those extra checks, have_cmd will automatically consider .exe as well for each command.
TimNN
commented
Nov 10, 2016
I don't think the current implementation needs much adjusting -- the only problem I can see with it is that it does not allow specifying the path to node in |
Mark-Simulacrum
commented
Nov 10, 2016
Hmm, yeah, I see that now. Can someone point me to where I can make those changes (if we want to)? Otherwise we can just close this. |
There was a problem hiding this comment.
I think it's fine to leave this kind of error reporting to compiletest rather than in rustbuild itself
There was a problem hiding this comment.
This should be set at some point, right? (from the command-line flag)
There was a problem hiding this comment.
There already is a nodejs option for compiletest (a few lines down).
alexcrichton
commented
Nov 10, 2016
@Mark-Simulacrum you can take a look at |
TimNN
commented
Nov 10, 2016
Also you'll probably want to update the logic here to only try to auto detect node if it has not been specified by the user (somewhat like it's done for gdb just below). |
bfd3c58 to
f752c98CompareMark-Simulacrum
commented
Nov 10, 2016
Alright, rebased and [hopefully] made this work with the comments suggested above. |
alexcrichton
commented
Nov 10, 2016
@bors: r+ Thanks! |
bors
commented
Nov 10, 2016
📌 Commit f752c98 has been approved by |
Allow passing a custom nodejs directory in configure.
f752c98 to
c524c50Compare@bors did not seem to notice this was r+ed. Edit: Bors noticed, but I pushed afterwards for some reason. I'm not sure why. |
eddyb
commented
Nov 12, 2016
@bors r=alexcrichton |
bors
commented
Nov 12, 2016
📌 Commit c524c50 has been approved by |
Add a command-line argument to manually specify which nodejs binary should be used,
which disables the default search.
Original work done by @tari.
Fixes#34188.