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

Allow alternate nodejs binaries #7405

Merged
merged 2 commits into from Mar 27, 2019

Conversation

Projects
None yet
5 participants
@codealchemy
Copy link
Contributor

commented Mar 19, 2019

Problem

Attempting to use the latest node LTS (10.15.3 - the latest LTS released March 5th) fails to install in pants as it seems the binary is not in pants' s3 - as seen in the error returned by pants:

Fetch of https://binaries.pantsbuild.org/bin/node/mac/10.13/v10.15.3/node.tar.gz failed with status code 404

The issue of binaries in s3 has come up before in another context (the motivation there was related to bandwidth costs, not unavailable binaries), and a solution was implemented for go and llvm in #5780.

Solution

This continues the work done in the #5780, leveraging the BinaryToolUrlGenerator to allow node binaries to be fetched from nodejs.org (see full list of binaries for the latest LTS release here).

Result

Users can now use any supported node release from nodejs.org - verified locally (on a Mac using the latest LTS)

@benjyw

benjyw approved these changes Mar 19, 2019

Copy link
Contributor

left a comment

Awesome!

@benjyw benjyw requested review from cosmicexplorer and nsaechao Mar 19, 2019

@stuhood stuhood requested a review from blorente Mar 19, 2019

@stuhood

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

Thanks! Delegating to @blorente , who is going to be looking at some other nodes.js stuff this week.

@stuhood stuhood removed the request for review from nsaechao Mar 19, 2019

@cosmicexplorer
Copy link
Contributor

left a comment

This is great! I've been meaning to do this for each of our no-op scripts in https://github.com/pantsbuild/binaries but haven't gotten around to it. I'm pretty enthusiastic about this, it's not clear that other build tools decide that reliably providing specific versions of the tools they rely on is part of their purview and avoiding having to re-provision your laptop/CI environment for every single tool you want to use is part of why I want to write build tools in the first place.

@blorente
Copy link
Contributor

left a comment

Thanks! This looks great :)

@codealchemy codealchemy force-pushed the codealchemy:node-alt-binary branch 2 times, most recently from f0bad1a to 6aee5f4 Mar 21, 2019

codealchemy added some commits Mar 19, 2019

Fix node bin path when installed from nodejs sources
The binary is extracted into a directory following the naming of the version and system id (ex. node-v8.11.3-darwin-x64)

@codealchemy codealchemy force-pushed the codealchemy:node-alt-binary branch from 6aee5f4 to f79ea33 Mar 27, 2019

@benjyw benjyw merged commit 6739a81 into pantsbuild:master Mar 27, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@codealchemy codealchemy deleted the codealchemy:node-alt-binary branch Mar 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.