-
-
Notifications
You must be signed in to change notification settings - Fork 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
Do not remove src dir after compilation #1299
Conversation
…eeds This will help speed up the installation time for the non-first time installation, especially can speed up the build time and test time on Travis-CI as we'll cache .cache dir.
d389b18
to
8dac2c3
Compare
To prove that the change can speed up the build time / CI test time, just send another commit come after the main change, as you'll rebase then merge PRs, it won't hurt at all. |
@@ -7,7 +7,6 @@ However, before submitting, please review the following: | |||
- Please include tests. Changes with tests will be merged very quickly. | |||
- Please manually confirm that your changes work in `bash`, `sh`/`dash`, `ksh`, and `zsh`. Fast tests do run in these shells, but it's nice to manually verify also. | |||
- Please maintain consistent whitespace - 2-space indentation, trailing newlines in all files, etc. | |||
- Any time you make a change to your PR, please rebase freshly on top of master. Nobody likes merge commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this. We absolutely will not use Github's rebase, as that destroys history. The rebase must be done on the command line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljharb I reverted, but how did you merge the PRs on GitHub? Squash and merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merge them on the command line, and with the "allow edits from maintainers" checkbox, I'm able to rebase PRs for people (and force push to their branch) and then fastforward-merge their PR - whereas Github's "rebase" or "squash" feature severs the connection to the actual git log that's on the PR.
@@ -1883,8 +1883,7 @@ nvm_install_source() { | |||
./configure --prefix="${VERSION_PATH}" $ADDITIONAL_PARAMETERS && \ | |||
$make -j "${NVM_MAKE_JOBS}" ${MAKE_CXX-} && \ | |||
command rm -f "${VERSION_PATH}" 2>/dev/null && \ | |||
$make -j "${NVM_MAKE_JOBS}" ${MAKE_CXX-} install && \ | |||
command rm -rf "${TMPDIR}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this dir cleared by nvm cache clear
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljharb yes, it'll be cleared by nvm cache clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd still like to remove the dir if the installation fails. Can we move this down to line 1906?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljharb for installation fails, would leave this dir for debug would be even better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's never been a problem before - usually the error message is sufficient, and since the majority of users won't have the skills to debug, the ones that will also have the skills to go comment out the rm
line (as they do now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I update it 👍
8dac2c3
to
0704ecb
Compare
9a02dd0
to
f045ddd
Compare
f045ddd
to
38ba71a
Compare
@@ -1904,6 +1904,8 @@ nvm_install_source() { | |||
fi | |||
|
|||
nvm_err "nvm: install ${VERSION} failed!" | |||
# shellcheck disable=SC2031 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by my reading of https://github.com/koalaman/shellcheck/wiki/SC2031, this shellcheck error is actually very serious and should not be bypassed.
I think that in order for TMPDIR
to be available outside of the if
chain, we need to refactor that chain so that it's defined at the function level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljharb I move that part out of the if, is that good for you? The function would be still the same.
38ba71a
to
c600b8c
Compare
@ljharb anything I need to do here? Since this can totally decrease the CI build time, I hope this can be merged as soon as possible 😄 |
c600b8c
to
0360829
Compare
This will help speed up the installation time for the install from source and non-first time
installation as
make
can use the "cache", this can speed up the build time and test time onTravis-CI as we'll cache .cache dir.
Ref: