GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — build: don't store eslint locally by avivkeller · Pull Request #54231 · nodejs/node

Conversation

@avivkeller

@avivkeller avivkeller commented Aug 6, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR removes eslint as a local dependency and switches to downloading it from npm. It will still be updated regularly via @dependabot.

Why?

  1. eslint is the only linter stored locally (besides cpplint, which has patches, unlike ESLint).
  2. There are multiple issues related to file paths being too long and tarballs failing to lint properly (see: Missing ./tools/node_modules/eslint/eslint.js on make test? #39709, make -s test-doc fails with Error: Cannot find module '/node-v14.4.0/tools/doc/../node_modules/eslint/node_modules/js-yaml' #34005, Erbium: test regression in tarball #32765, and others).

Why was eslint set up like this initially?

When eslint was first added to the repository in #1539 around 10 years, it replaced a (not as large, but still large) library, closure-lint. Since then, the library has almost 4x its size. At the time, there was no discussion (AFAICT) about keeping or removing the directory—it was simply included as it was.

Size-wise, this'll save ~40MB, which is a decent amount.


(I'll add more fixes as I find more issues)
Fixes #39709
Fixes #54231

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Aug 6, 2024

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions
  • @nodejs/security-wg
  • @nodejs/tsc
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Aug 6, 2024
@avivkeller

avivkeller commented Aug 6, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

CC @nodejs/build @nodejs/linting

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller
avivkeller requested review from anonrig and targos August 6, 2024 18:09
@avivkeller avivkeller changed the title build: don't sure eslint locally build: don't store eslint locally Aug 6, 2024
@avivkeller
build: don't store eslint locally
1216ae5
@avivkeller avivkeller added the commit-queue-squash PRs the Commit Queue should land as one squashed commit. label Aug 6, 2024
@avivkeller

avivkeller commented Aug 6, 2024

Copy link
Copy Markdown
Member Author

Reviewers, please review the commit '(review changes)'. The first commit removes the node_modules directory and may be hard to review in the github UI.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller avivkeller mentioned this pull request Aug 6, 2024
build: don't store eslint locally #53974
Closed
@avivkeller

avivkeller commented Aug 6, 2024

Copy link
Copy Markdown
Member Author

Everything is passing! The failure is because of #54229. The original PR didn't see any objections, is this good to land in the coming days?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Aug 6, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.33%. Comparing base (1bcdba2) to head (6b95bab).
Report is 289 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54231      +/-   ##
==========================================
+ Coverage   87.10%   87.33%   +0.23%     
==========================================
  Files         647      648       +1     
  Lines      181693   182321     +628     
  Branches    34869    34972     +103     
==========================================
+ Hits       158256   159225     +969     
+ Misses      16733    16371     -362     
- Partials     6704     6725      +21     

see 90 files with indirect coverage changes

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnb

bnb commented Aug 7, 2024

Copy link
Copy Markdown
Member

I'm +1 to this approach, but feel like there's probably folks who have more domain knowledge about this who should actually be the ones to approve it.

bmuenzenmeyer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Aug 7, 2024

Copy link
Copy Markdown
Contributor

I don't think there was any specific reason why those linters were checked into the repo besides maybe offline functionality, but I think that's likely no longer needed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Aug 7, 2024

Copy link
Copy Markdown
Member Author

Great! I'm glad y'all are on board! Seeing as the linting is passing (except for the unrelated issue), all looks good in terms of land-ability.

Although, I assume this needs a CI to land.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@benjamingr benjamingr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 7, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 7, 2024
@nodejs-github-bot

nodejs-github-bot commented Aug 7, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/60949/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Aug 7, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

CI is passing. 🎉
Linting is passing except for an unrelated failured that was patched in 7327e44.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Aug 7, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/60955/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Aug 8, 2024
View reviewed changes
Comment thread Makefile Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 added dont-land-on-v18.x labels Aug 9, 2024
aduh95
aduh95 previously requested changes Aug 9, 2024
View reviewed changes

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

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.

Everytime I run e.g. make lint-js on this branch, it runs npm. Can you make it sure npm is run only when there were changes in the package-lock.json?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@silverwind

silverwind commented Aug 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Everytime I run e.g. make lint-js on this branch, it runs npm. Can you make it sure npm is run only when there were changes in the package-lock.json?

FWIW, it's possible to achieve on-demand node_modules installation with Make by tracking the folder timestamp, but it's not a 100% thing as Make timestamp tracking works best with files. Here is how I do it in my projects:

node_modules: package-lock.json
	npm install --no-save
	@touch node_modules
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Aug 9, 2024

Copy link
Copy Markdown
Member Author

FWIW, it's possible to achieve on-demand node_modules installation with Make by tracking the folder timestamp, but it's not a 100% thing as Make timestamp tracking works best with files. Here is how I do it in my projects:

node_modules: package-lock.json
	npm install --no-save
	@touch node_modules

I have it setup like:

tools/.jslintstamp:
	cd tools/eslint && $(call available-node,$(run-npm-ci))
	@touch $@

If the user wants to re-build the lint, they have to run make lint-clean.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller
avivkeller requested a review from aduh95 August 9, 2024 16:32
@avivkeller
avivkeller requested a review from aduh95 August 9, 2024 17:42
@avivkeller avivkeller mentioned this pull request Aug 11, 2024
tools: update eslint to 9.9.1 #54313
Closed
@avivkeller avivkeller added the review wanted PRs that need review. label Aug 11, 2024
@avivkeller

avivkeller commented Aug 11, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Hey, I'd love to get some reviews if there aren't any more objections. I don't want to pressure anyone tho.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos
targos reviewed Aug 11, 2024
View reviewed changes
Comment thread .github/dependabot.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller
avivkeller requested a review from targos August 12, 2024 22:07
@avivkeller

avivkeller commented Aug 18, 2024

Copy link
Copy Markdown
Member Author

Any more changes needed?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller
(review changes)
6b95bab
aduh95
aduh95 approved these changes Aug 18, 2024
View reviewed changes
@avivkeller

avivkeller commented Aug 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Thanks for approving! Does anyone else have any more feedback? It's been a while since any reviews.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Sep 1, 2024

Copy link
Copy Markdown
Member Author

No objections in a week, is this author ready?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Sep 1, 2024

Copy link
Copy Markdown
Contributor

node/doc/contributing/collaborator-guide.md

Lines 900 to 908 in 27f1306

* `author-ready` - A pull request is _author ready_ when:
* There is a CI run in progress or completed.
* There is at least one collaborator approval (or two TSC approvals for
semver-major pull requests).
* There are no outstanding review comments.
Please always add the `author ready` label to pull requests that qualify.
Please always remove it again as soon as the conditions are not met anymore,
such as if the CI run fails or a new outstanding review comment is posted.

so this is not author ready because there are no recent Jenkins CI run. If you start one, it would be.

avivkeller reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller avivkeller added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 1, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 1, 2024
@nodejs-github-bot

nodejs-github-bot commented Sep 1, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/61796/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller avivkeller added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Sep 1, 2024
@avivkeller

avivkeller commented Sep 1, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Per @aduh95's comment:

  • There is a CI run in progress or completed. 🟢
  • There is at least one collaborator approval.
  • There are no outstanding review comments.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 3, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/61882/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Sep 4, 2024

Copy link
Copy Markdown
Member Author

The MacOS CI appears to have failed to start, could someone restart it?

As for the linked linux OpenSSL one, see #54737

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 4, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/61895/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@avivkeller

avivkeller commented Sep 4, 2024

Copy link
Copy Markdown
Member Author

FWIW CI is 🟢 (Yay!)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 6, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 6, 2024
@nodejs-github-bot
nodejs-github-bot merged commit 437e168 into nodejs:main Sep 6, 2024
@nodejs-github-bot

nodejs-github-bot commented Sep 6, 2024

Copy link
Copy Markdown
Collaborator

Landed in 437e168

avivkeller reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95 pushed a commit that referenced this pull request Sep 12, 2024
@avivkeller @aduh95
build: don't store eslint locally
6200cf4
PR-URL: #54231
Reviewed-By: Antoine du Hamel <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Sep 16, 2024
v22.9.0 proposal #54966
Merged
@avivkeller avivkeller mentioned this pull request Oct 4, 2024
build: stop pre-compiling lint-md #55266
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@richardlau richardlau richardlau left review comments
@aduh95 aduh95 aduh95 approved these changes
@anonrig anonrig Awaiting requested review from anonrig
@targos targos Awaiting requested review from targos
+1 more reviewer
@nschonni nschonni nschonni left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. build Issues and PRs related to Node.js builds or CI infrastructure. commit-queue-squash PRs the Commit Queue should land as one squashed commit. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. review wanted PRs that need review. tools Issues and PRs related to the tools directory.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Missing ./tools/node_modules/eslint/eslint.js on make test?

Uh oh!

There was an error while loading. Please reload this page.

9 participants

@avivkeller @nodejs-github-bot @bnb @silverwind @aduh95 @nschonni @targos @richardlau @benjamingr
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.