Skip to content

Skip npm step if node_modules already exists#640

Merged
sbc100 merged 1 commit into
masterfrom
skip_npm
Mar 10, 2021
Merged

Skip npm step if node_modules already exists#640
sbc100 merged 1 commit into
masterfrom
skip_npm

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Oct 10, 2020

Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Is there a downside to running npm ci? If this is just meant to save a few seconds, it might be safer to keep doing it to avoid corner cases (such as the node_modules dir being out of date, or maybe we ship only part of the files some day).

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Oct 10, 2020

You are perhaps correct... I was kind thinking that if we ever do end up a situation where the node_modules we ship is not correct in some way we really would like to know about it ASAP. But I guess you are right that this might be safer..

@kripken
Copy link
Copy Markdown
Member

kripken commented Oct 10, 2020

It would be good to test that the node_modules we ship is correct, I agree. How about a test that manually copies the downloaded node_modules over after the emsdk runs npm ci (so we force it to use the downloaded version) and then we verify that it works with that?

@sbc100 sbc100 mentioned this pull request Oct 21, 2020
@sbc100 sbc100 force-pushed the skip_npm branch 3 times, most recently from f6fc333 to f0db4b2 Compare March 9, 2021 22:42
@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Mar 9, 2021

I've verified locally that all the emscripten tests pass with the downloaded version of node_modules.

Also, the tests we have in scripts/test.py are now all run with the downloaded version (since this changes makes that the only option). What more testing are you envisaging other than that?

@sbc100 sbc100 requested a review from kripken March 9, 2021 22:52
@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Mar 9, 2021

For me as a developer the ability to quickly install different SDKs without running npm is something I am looking forward to.

@kripken
Copy link
Copy Markdown
Member

kripken commented Mar 9, 2021

What more testing are you envisaging other than that?

How about adding a test that uses closure? That would give more coverage here of npm stuff. lgtm with that.

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Mar 10, 2021

What more testing are you envisaging other than that?

How about adding a test that uses closure? That would give more coverage here of npm stuff. lgtm with that.

OK.. maybe.. but I'm not sure this repo is where we test "does the SDK work". In general "does it SDK work" is tests by the emscripten-releases builder. If anything this change makes the installed SDK more like the SDK what we already tested there, so it should require less testing than it did before this change.

another way of putting it: The requirement for a test that closure works should have been there before this change since emskd itself was installing closure. Now that emsdk just relies on the bundled version don't we need less testing :)

But I guess either way its a good smoketest.. even it it should have been there before.

@sbc100 sbc100 force-pushed the skip_npm branch 2 times, most recently from 716217f to 5255421 Compare March 10, 2021 00:22
@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Mar 10, 2021

Added closure test

@sbc100 sbc100 merged commit d342821 into master Mar 10, 2021
@sbc100 sbc100 deleted the skip_npm branch March 10, 2021 00:56
akoeplinger pushed a commit to akoeplinger/emsdk that referenced this pull request Dec 13, 2024
[main] Update dependencies from dotnet/arcade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants