Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: build backend with swc #9463

Merged
merged 6 commits into from Jan 12, 2023
Merged

Conversation

pikokr
Copy link
Contributor

@pikokr pikokr commented Jan 3, 2023

What

builds project with swc instead of tsc.

Why

swc builds misskey at least 12x build speed on 3.5GHz quad-core cpu. but, swc does not provide typescript type checking

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Jan 3, 2023
@tamaina
Copy link
Member

tamaina commented Jan 3, 2023

/deploy sha=12d554e

@github-actions
Copy link

github-actions bot commented Jan 3, 2023

Your preview environment pr-9463-syuilo has been deployed with errors.

@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Merging #9463 (dc499f4) into develop (c14063a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #9463   +/-   ##
========================================
  Coverage    22.33%   22.33%           
========================================
  Files          722      722           
  Lines        67127    67127           
  Branches      2169     2166    -3     
========================================
  Hits         14994    14994           
  Misses       52133    52133           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tamaina
Copy link
Member

tamaina commented Jan 3, 2023

(node:596280) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
INFO 2  [core nest]     NestFactory: Starting Nest application...
INFO 2  [core nest]     InstanceLoader: RootModule dependencies initialized
INFO 2  [core nest]     InstanceLoader: QueueModule dependencies initialized
ERR  2  [core nest]     ReferenceError: this hasn't been initialised - super() hasn't been called
    at _assertThisInitialized (file:///home/aqz/misskey/packages/backend/built/server/api/endpoints/admin/queue/deliver-delayed.js:3:15)
    at new _class (file:///home/aqz/misskey/packages/backend/built/server/api/endpoints/admin/queue/deliver-delayed.js:258:22)
    at Injector.instantiateClass (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/injector.js:340:19)
    at callback (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/injector.js:53:45)
    at async Injector.resolveConstructorParams (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/injector.js:132:24)
    at async Injector.loadInstance (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/injector.js:57:13)
    at async Injector.loadProvider (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/injector.js:84:9)
    at async Promise.all (index 46)
    at async InstanceLoader.createInstancesOfProviders (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/instance-loader.js:47:9)
    at async /home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/instance-loader.js:32:13
    at async Promise.all (index 5)
    at async InstanceLoader.createInstances (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/instance-loader.js:31:9)
    at async InstanceLoader.createInstancesOfDependencies (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/injector/instance-loader.js:21:9)
    at async /home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/nest-factory.js:96:17
    at async ExceptionsZone.asyncRun (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/errors/exceptions-zone.js:22:13)
    at async NestFactoryStatic.initialize (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/nest-factory.js:94:13)
    at async NestFactoryStatic.createApplicationContext (/home/aqz/misskey/node_modules/.store/@nestjs-core-virtual-6c144b51cf/node_modules/@nestjs/core/nest-factory.js:73:9): this hasn't been initialised - super() hasn't been called
INFO 2  [core]  The process is going to exit with code 1
ERR  *  [core cluster]  [2] died :(

I got that error and process killed during yarn start...

@tamaina
Copy link
Member

tamaina commented Jan 3, 2023

It must be thrown by deliver-delayed

@pikokr
Copy link
Contributor Author

pikokr commented Jan 4, 2023

fixed!

@tamaina
Copy link
Member

tamaina commented Jan 4, 2023

-Dを指定しているのでDockerなどのプロダクション環境にsrcを持っていく必要はなさそう?(このPRでやる必要はないが)

https://swc.rs/docs/usage/cli#--copy-files--d

@syuilo
Copy link
Member

syuilo commented Jan 4, 2023

image
ここから進まなかった

@pikokr
Copy link
Contributor Author

pikokr commented Jan 4, 2023

image ここから進まなかった

image

It works for me...?

@tamaina
Copy link
Member

tamaina commented Jan 4, 2023

Windowsだから?

@pikokr
Copy link
Contributor Author

pikokr commented Jan 4, 2023

Windowsだから?

I'm on arch linux

@CyberRex0
Copy link
Contributor

macOS Monterey (arm64) で正常にビルドできることを確認した

@syuilo
Copy link
Member

syuilo commented Jan 6, 2023

なんかでた
image

@syuilo
Copy link
Member

syuilo commented Jan 6, 2023

あー、yarn buildは出来るけどyarn devは出来ない
諸氏はyarn devも問題なく出来てるのかしら

@syuilo
Copy link
Member

syuilo commented Jan 10, 2023

ping

@tamaina
Copy link
Member

tamaina commented Jan 10, 2023

諸氏はyarn devも問題なく出来てるのかしら

できる

@syuilo
Copy link
Member

syuilo commented Jan 12, 2023

しゅい環ならまあなんとかするか

@syuilo syuilo merged commit 4579d02 into misskey-dev:develop Jan 12, 2023
@syuilo
Copy link
Member

syuilo commented Jan 12, 2023

👍🏻

@tamaina
Copy link
Member

tamaina commented Jan 12, 2023

WSLつかおうぜ!!!

syuilo added a commit that referenced this pull request Jan 13, 2023
@tamaina
Copy link
Member

tamaina commented Jan 14, 2023

なんでrevertしたんだっけ
(Windowsでyarn devが動かずかつWSLの導入を断念したから?)

@syuilo
Copy link
Member

syuilo commented Jan 15, 2023

そう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants