-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
tools: add the bootstrapped _depot_tools dir to the PATH (for V8 tests) #38299
Closed
DeeDeeG
wants to merge
3
commits into
nodejs:master
from
DeeDeeG:put-depot_tools-ninja-on-PATH-for-test-v8
Closed
tools: add the bootstrapped _depot_tools dir to the PATH (for V8 tests) #38299
DeeDeeG
wants to merge
3
commits into
nodejs:master
from
DeeDeeG:put-depot_tools-ninja-on-PATH-for-test-v8
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target.
nodejs-github-bot
added
needs-ci
PRs that need a full CI run.
tools
Issues and PRs related to the tools directory.
v8 engine
Issues and PRs related to the V8 dependency.
labels
Apr 19, 2021
DeeDeeG
commented
Apr 19, 2021
This comment has been minimized.
This comment has been minimized.
richardlau
approved these changes
Apr 23, 2021
Simplifies the script... Also finds _depot_tools relative to the current path, rather than relative to the repo root. This seems like a good idea, given that the rest of the script is also relative to the current path (`deps/v8`), not the repo root.
I did some tiny updates:
(So, it's one less line of code, and slightly more robust to potential repo refactoring or moving folders around, or at least that's the idea.) I opted not to remove
|
richardlau
approved these changes
Apr 23, 2021
jasnell
approved these changes
Apr 27, 2021
Landed in 6e3ce65 |
jasnell
pushed a commit
that referenced
this pull request
Apr 27, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Apr 29, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 30, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 5, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 5, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 11, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short summary:
This script needs to execute a copy of
ninja
in order to complete.The script downloads Google's
depot_tools
early on. (depot_tools
includes a copy of theninja
binary.) I propose to add those to the PATH, so that runningninja
later in the script succeeds for users at home running this outside of CI.Background, context, more details:
The
make-v8.sh
script (used by thetest-v8
Makefile target) implicitly requires a separate copy ofninja
on the PATH, even though it bootstraps a copy ofninja
for you (that it proceeds to not use).This Pull Request adds the
_depot_tools
dir bootstrapped during this script to thePATH
, beforeninja
is executed, taking advantage of the fact that_depot_tools
conveniently includes a copy ofninja
. This makes for one less system requirement to be able to finish thetest-v8
Makefile target.(I am not sure why this script chooses to add
~/_depot_tools
to the PATH, as at least oiutside of CI on my personal machine, that directory never exists on my machine during the entiretest-v8
Makefile target from beginning to end. But I interpret that as evidence thatdepot_tools
is already meant to be on the PATH in some form or other.)I was looking into documenting the system requirements needed to finish the
test-v8
Makefile target. (I wanted to document that this is now the only part of this repository (that I know of) that still requires Python 2 after #36691, given that some Python scripts in the upstreamdepot_tools
andv8
repositories still aren't Python 3 compatible).When I was testing that Makefile target locally, I noticed something a bit strange (to my eyes) about an implicit
ninja
requirement:test-v8
Makefile target implicitly expectsninja
on the PATH in order to completetest-v8
Makefile target ends up bootstrapping a copy ofdepot_tools
before that, atdeps/v8/_depot_tools
ninja
~/_depot_tools
is added to the PATH, but this isn't ensured to exist/isn't bootstrapped by thetest-v8
Makefile targetdepot_tools
there, but I left it in case CI needs it... It should now be fully redundant as of this PR, so I think the script could probably skip adding that location to thePATH
. Unless CI needs a customdepot_tools
there with modifications? It works for me locally with upstreamdepot_tools
, so I can't think of why that would be needed.)deps/v8/_depot_tools
which was just bootstrapped is not put on the PATHninja
, and we went out of our way to get it, so I think we should take advantage.It feels like the bootstrapped
_depot_tools
is supposed to be on the PATH so we can use its copy ofninja
to complete the rest of building V8. Rather than documenting this quirky and redundant (maybe accidental)
ninja
requirement, I thought I'd have a go at making it unnecessary to manually ensureninja
is on the PATH, by using the copy that was just bootstrapped.An alternative might be simply directly executing the
deps/v8/_depot_tools/ninja
binary without altering the PATH whatsoever.But I haven't yet tested whether that works.Works for me, not sure whether it works just as well in CI.