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

[WIP] tools: s/npm install/npm ci #21538

Closed
wants to merge 2 commits into from
Closed

Conversation

MylesBorins
Copy link
Contributor

npm ci is substantially faster than npm install.

Can't see why we wouldn't want to do this... only catch would be if we don't support package-lock... but we have those currently checked in afaik

`npm ci` is substantially faster than `npm install`.
@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Jun 26, 2018
@MylesBorins
Copy link
Contributor Author

MylesBorins commented Jun 26, 2018

Before w/ hot cache

added 228 packages from 101 contributors and audited 346 packages in 6.726s
found 0 vulnerabilities

Markdown linter: installing remark-preset-lint-node into tools/
npm WARN You are using a pre-release version of node and things may not work as expected

added 54 packages from 13 contributors and audited 300 packages in 5.312s

after w/ cold cache

make lint-md-build
Markdown linter: installing remark-cli into tools/
added 160 packages in 7.724s
Markdown linter: installing remark-preset-lint-node into tools/
added 53 packages in 3.015s

After w/ hot cache

Markdown linter: installing remark-cli into tools/
added 160 packages in 1.305s
Markdown linter: installing remark-preset-lint-node into tools/
added 53 packages in 0.862s

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

I think you can remove --no-package-lock now

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

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

LGTM with @targos's comment addressed.

@MylesBorins
Copy link
Contributor Author

@MylesBorins MylesBorins added blocked PRs that are blocked by other issues or PRs. wip Issues and PRs that are still a work in progress. and removed blocked PRs that are blocked by other issues or PRs. labels Jun 28, 2018
@MylesBorins MylesBorins changed the title tools: s/npm install/npm ci [WIP] tools: s/npm install/npm ci Jun 28, 2018
@MylesBorins
Copy link
Contributor Author

It would appear that this PR may actually slow things down based on how things are currently set up. I noticed when testing on master that we are currently calling to make test-doc-build (or whatever the job is called) everytime we run make test. This ends up essentially being a no-op with npm install, but it will introduce some latency. Going to dig in to see if there is a better way to do this.

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

Don't forget to update vcbuild.bat too. (You can dismiss this review once that's happened.)

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

A second blocker on this is that make tools/doc/node_modules/js-yaml/package.json will pollute checked-in files currently. (We float patches on the marked module--something we probably started doing only after this PR was opened already--anyway, that make`` command will overwrite those patches if we use npm ci. This will be a non-issue if/when we move to remarkinstead ofmarked`. There's a PR for that.)

So if someone using a source tarball runs make doc-only, it will overwrite marked with an unpatched version and produce a broken all.html file. Subsequent runs will have breakage in other doc files too. 😱

Because of this, I'm going to label this one blocked.

@MylesBorins
Copy link
Contributor Author

@Trott should we perhaps close this?

@Trott
Copy link
Member

Trott commented Aug 18, 2018

@MylesBorins My second objection has been fixed (I think by work done by @rubys). So it's just about vcbuild.bat at this point.

This still might be worth closing (or at least modifying) because there is now a run-npm-ci task that can allow us to phase in npm ci where it makes sense but avoid it where it doesn't.

@refack refack mentioned this pull request Aug 19, 2018
2 tasks
@refack
Copy link
Contributor

refack commented Aug 19, 2018

@MylesBorins I've followed up on this in #22399

@refack
Copy link
Contributor

refack commented Aug 23, 2018

Completed in d320511

@refack refack closed this Aug 23, 2018
@refack refack removed the wip Issues and PRs that are still a work in progress. label Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants