misskey icon indicating copy to clipboard operation
misskey copied to clipboard

dev: fix pnpm dev is broken

Open anatawa12 opened this issue 1 year ago • 12 comments

What

Fix #14121

Why

Additional info (optional)

Checklist

  • [x] Read the contribution guide
  • [ ] Test working in a local environment
  • [ ] (If needed) Add story of storybook
  • [x] (If needed) Update CHANGELOG.md
  • [ ] (If possible) Add tests

anatawa12 avatar Jul 02 '24 12:07 anatawa12

手元のmacOS環境では動作確認取れたけど念の為他人にも確認してもらいたい

anatawa12 avatar Jul 02 '24 12:07 anatawa12

このPRによるapi.jsonの差分

差分はこちら

Get diff files from Workflow Page

github-actions[bot] avatar Jul 02 '24 12:07 github-actions[bot]

win環境だと死にました

[nodemon] restarting due to changes...
[nodemon] starting `pnpm run build`

> backend@ build D:\develop\misskey\packages\backend
> swc src -d built -D --strip-leading-paths

Successfully compiled: 823 files, copied 27 files with swc (271ms)
[nodemon] clean exit - waiting for changes before restart
file:///D:/develop/misskey/node_modules/.pnpm/[email protected]/node_modules/execa/lib/return/final-error.js:6
        return new ErrorClass(message, options);
               ^

ExecaError: Command was killed with SIGTERM (Termination): ./built/boot/entry.js

samunohito avatar Jul 02 '24 12:07 samunohito

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.16%. Comparing base (de1fe7c) to head (0255e28).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14123      +/-   ##
===========================================
+ Coverage    40.06%   40.16%   +0.10%     
===========================================
  Files         1517     1517              
  Lines       187210   187210              
  Branches      3471     3422      -49     
===========================================
+ Hits         74999    75189     +190     
+ Misses      111641   111453     -188     
+ Partials       570      568       -2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 02 '24 12:07 codecov[bot]

(結構無理やりやってるから、そこの軋みが出てる感じがすごくする)

samunohito avatar Jul 02 '24 12:07 samunohito

このPRで修正される問題というより、これ以外で変わった部分による影響が表出したような感じだと思います

samunohito avatar Jul 02 '24 12:07 samunohito

色々いじってたら同じエラーになったので修正ミスだな..

anatawa12 avatar Jul 02 '24 12:07 anatawa12

awaitされてないpromiseでエラーが発生してるのが原因なので

backendProcess.then(() => {}, () => {})

を挿入すればいいけどこれが正しいかは少し考えないといけない

anatawa12 avatar Jul 02 '24 12:07 anatawa12

breaking changesに載ってない気がするし、upstreamの意図しない変更の可能性がある?

anatawa12 avatar Jul 02 '24 12:07 anatawa12

調べた感じ、過去バージョンでもexceptionは発生してるけど、(おそらくexeca内部でthenをしていたため)ERR_UNHANDLED_REJECTIONがトリガーされていなかった。今回のバージョンで(おそらくexeca内部のthenが削除されて)ERR_UNHANDLED_REJECTIONがトリガーされるようになったっぽい。

anatawa12 avatar Jul 02 '24 12:07 anatawa12

取り柄会えずエラー残ってるのでdraftに一旦する

anatawa12 avatar Jul 02 '24 12:07 anatawa12

治ったっぽいかな

anatawa12 avatar Jul 02 '24 13:07 anatawa12

🙏

samunohito avatar Jul 02 '24 21:07 samunohito