Closed samreid closed 2 weeks ago
From https://github.com/phetsims/chipper/issues/1469 here are some checklist items:
I'll run performance tests of using the API or processes on cached or --clean, on mac and windows. That will help us know for sure whether we need both implementations.
mac
cache is fresh - API only => 9sec
cache is fresh - spawn only => 52sec
--clean - spawn only => 4m22s
--clean - API only => 54% then crash at 2m40s
windows
cache is fresh - API only => 16sec
cache is fresh - spawn only => 63s
--clean - spawn only => 4m23s
--clean - API only => 54% then crash at 4m14s
Design goals:
Next steps:
--verbose
flag? What do you think?~
Subject: [PATCH] add authors, https://github.com/phetsims/chipper/issues/1502
---
Index: js/grunt/lint.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/grunt/lint.ts b/js/grunt/lint.ts
--- a/js/grunt/lint.ts (revision 9c6461e0c47a003490903950a5c25b4448071083)
+++ b/js/grunt/lint.ts (date 1730747840002)
@@ -175,7 +175,8 @@
cache: true,
cacheLocation: path.resolve( getCacheLocation( repo ) ),
fix: options.fix,
- errorOnUnmatchedPattern: false
+ errorOnUnmatchedPattern: false,
+ flags: [ '--debug' ]
};
// Create ESLint instance
Ready for review in the chipper and perennial-alias branches lint-batches-chipper-1484
. Note there is one remaining TODO that I could not figure out how to solve and need help on.
config/
, and keep linting module and running code that the top level. SEE https://github.com/phetsims/perennial/issues/399grunt lint --clean --all
and it took 2 minutes before this commit https://github.com/phetsims/perennial/commit/8bc2e5238d298ba007ec367f2596e1b98a67cae9require( 'os').cpus().length
-> 20 on MK windows, and 128 on sparky.
mjkauzmann ~/PHET/git/perennial-alias (lint-batches-chipper-1484)
$ time grunt lint --all --clean
Running "lint" task
processes 4
Done.
real 2m18.486s
user 0m0.061s
sys 0m0.061s
mjkauzmann ~/PHET/git/perennial-alias (lint-batches-chipper-1484)
$ time grunt lint --all --clean
Running "lint" task
processes 15
Done.
real 1m56.170s
user 0m0.060s
sys 0m0.062s
I added 6 TODOs as part of the review. @samreid and I merged to main, and the rest is in his court. Thanks SR!1
TODOs addressed, --processes added which sets the maximum number of allowable processes. We are merged to main. Feature branches deleted. Closing.
On second thought, I'm very confused about all the entry points that are allowed to pass through LintOptions. The default occurs in several places. Would be good for @zepumph to review and comment.
@samreid and I agree it is awkward, and getLintOptions
shouldn't always provide defaults that are duplicated with the module defaults. We will make a separate side issue.
From https://github.com/phetsims/chipper/issues/1451 there were many TODOs to upgrade the lint process. Most of this should be done before #1415.