citgm
citgm copied to clipboard
lookup: add next
Checklist
- [x]
npm testpasses - [x] contribution guidelines followed here
Related
- Closes https://github.com/nodejs/citgm/issues/1017
Co-authored-by: Ethan Arrowood [email protected]
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
419202a) 96.33% compared to head (a693d85) 95.04%.
Additional details and impacted files
@@ Coverage Diff @@
## main #1044 +/- ##
==========================================
- Coverage 96.33% 95.04% -1.29%
==========================================
Files 28 28
Lines 2181 2181
==========================================
- Hits 2101 2073 -28
- Misses 80 108 +28
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@GeoffreyBooth It looks like windows has been failing on main for awhile https://github.com/nodejs/citgm/commits/main
Furthermore, I'm not sure if citgm actually runs any tests against the lookup.json file that I modified.
@GeoffreyBooth does the CI run citgm-all ? I think that's the only way lookup.json is used, right?
I’m not very knowledgeable of how CITGM works. Perhaps @targos knows?
Here's a first test run: https://github.com/nodejs/citgm/actions/runs/7466807218
CI doesn't run citgm-all. It takes too long and must be run manually.
Looks like it didn't install correctly: https://github.com/nodejs/citgm/actions/runs/7466807218/job/20319001003#step:5:12
This should fix it: https://github.com/vercel/next.js/pull/60443
@targos Can you try once more now that its fixed?
https://github.com/nodejs/citgm/actions/runs/7466807218
Looks like we may need to skip on windows.
Otherwise it seems to have passed on mac and linux 🎉
@targos I added skip win32. Please run once more (Third time's the charm ☘️ )
OK, let's do a full run in Jenkins.
v18: https://ci.nodejs.org/job/citgm-smoker-nobuild/1579/ v20: https://ci.nodejs.org/job/citgm-smoker-nobuild/1580/ v21: https://ci.nodejs.org/job/citgm-smoker-nobuild/1581/
@targos Looks like pnpm support isn't quite working. Its not selecting the correct version of pnpm
https://ci.nodejs.org/job/citgm-smoker-nobuild/nodes=rhel8-x64/1580/testReport/(root)/citgm/next_v14_0_4/
ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
Your pnpm version is incompatible with "/home/iojs/tmp/citgm_tmp/12755dbb-db09-4e8a-975e-85e8c56c01ad/next".
Expected version: 8.14.0
Got: 8.14.1
I think we need to make sure corepack enable pnpm is run as the first step so the correct version is selected from package.json https://nodejs.org/api/corepack.html
pnpm is not installed on CI hosts. It's a dependency of the citgm package: https://github.com/nodejs/citgm/commit/46d35aef9057c081c8a04cbe9f01cdf1df72112f
@targos Interesting. Then perhaps citgm should utilize corepack. Or at least manually read the packageManger field in package.json to select the correct version of the package manger.
@targos Interesting. Then perhaps
citgmshould utilize corepack. Or at least manually read thepackageMangerfield in package.json to select the correct version of the package manger.
Why does it need to use a precise version of pnpm? Surely 8.14.0 and 8.14.1 aren’t that different?
@GeoffreyBooth Next.js is a highly visible project that receives many PRs. We lock down the package manager version so that contributors fail fast when they have the wrong pnpm installed rather than then submitting an issue saying it doesn't work and we have to ask for system details, etc.
In theory, a patch version should't matter, but in practice it can and there is no reason to leave it open for interpretation. Thats probably the same reason why the packageManager field doesn't allow ranges - it has to be exact.
Thankfully, there is a tool to solve this now: corepack. So most of the citgm logic for package manager selection could probably be deferred to corepack.
Okay, do you want to update CITGM accordingly?
Would that be this workflow file? https://github.com/nodejs/citgm/blob/44548b7226aa3d513f745834543f1342a6b79d10/.github/workflows/test-module.yml#L59 Where is the one that Node.js uses?
I can’t seem to find the place where package managers are installed? Can you share the line of code?
They're just dependencies of CITGM, so they'd get installed via that.
Should I add corepack support to citgm?
Perhaps right before install here?
https://github.com/nodejs/citgm/blob/12e6902b7a90c42edf60a1f4aa0ef9c19efdfddc/lib/package-manager/install.js#L99