forge icon indicating copy to clipboard operation
forge copied to clipboard

feat: support pnpm

Open goosewobbler opened this issue 1 year ago • 6 comments

Signed-off-by: Yi Yang [email protected]

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x] The changes are appropriately documented (if applicable).
  • [x] The changes have sufficient test coverage (if applicable).
  • [x] The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

Adding PNPM support - picking up where https://github.com/electron/forge/pull/3351 left off.

Related issue: https://github.com/electron/forge/issues/2633

goosewobbler avatar Apr 24 '24 12:04 goosewobbler

Is this PR ready to go? If so, is there an ETA on when it might get merged?

emilbon99 avatar May 17 '24 18:05 emilbon99

I wasn't the original author of this code but happy to do what it takes to get this one released - we use PNPM in WDIO and native support here would definitely help.

goosewobbler avatar May 17 '24 22:05 goosewobbler

I think there are some legitimate test failures that we'll have to investigate in slow-tests.

It may be that pnpm is hanging somewhere along the line? It seems like all 3 platforms are hanging and CircleCI is cutting off the CI jobs.

erickzhao avatar May 21 '24 18:05 erickzhao

It is hanging on this line, the package step of the import test.

Added more logging to core/api/package.ts and it seems this await never resolves...

goosewobbler avatar May 21 '24 21:05 goosewobbler

More digging. All of the tests passed in d334388 and subsequently broke with the merge in cf43b13.

Debugging the utils/core-utils/src/rebuild.ts results in the following:

electron-forge:rebuild Spawning a remote rebuilder process with options: {
  buildPath: '/var/folders/g6/0tqr_59j76n0g6zxxq_0tq3c0000gn/T/electron-packager/tmp-ukJFul/Electron.app/Contents/Resources/app',
  electronVersion: '30.0.6',
  arch: 'arm64'
}
electron-forge:rebuild Received message from rebuilder: {
  msg: 'rebuild-error',
  err: {
    message: "ENOENT: no such file or directory, stat '/private/var/folders/g6/0tqr_59j76n0g6zxxq_0tq3c0000gn/T/electron-packager/tmp-ukJFul/Electron.app/Contents/Resources/app/node_modules/electron-squirrel-startup'",
    stack: "Error: ENOENT: no such file or directory, stat '/private/var/folders/g6/0tqr_59j76n0g6zxxq_0tq3c0000gn/T/electron-packager/tmp-ukJFul/Electron.app/Contents/Resources/app/node_modules/electron-squirrel-startup'"
  }
}

There are two symlinks in the node_modules dir:

lrwxr-xr-x@   electron -> .pnpm/[email protected]/node_modules/electron
lrwxr-xr-x@   electron-squirrel-startup -> .pnpm/[email protected]/node_modules/electron-squirrel-startup

I wonder if this is an issue with @electron/rebuild. Could be related to https://github.com/electron/rebuild/issues/547.

goosewobbler avatar May 22 '24 11:05 goosewobbler

Not sure what is going on here and at the moment I don't have the time to dedicate to it. Hopefully I get some more time, happy for someone else to pick this up though.

goosewobbler avatar Jun 11 '24 13:06 goosewobbler