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

(wip) feat: エンドポイントの情報やpacked schemaはmisskey-jsから提供する #10752

Closed
wants to merge 170 commits into from

Conversation

tamaina
Copy link
Contributor

@tamaina tamaina commented May 2, 2023

What

  • Packed Schema (json-schema)を最新のJSON Schema仕様に置き換えてmisskey-jsに移植
  • エンドポイントのmetaやparamDefをmisskey-jsに移植
  • 書かれたスキーマをmisskey-jsのテストでvalidate
  • backendをmisskey-jsの情報に依拠するよう書き換える
  • SchemaType, Schema型をなんとかする(他のパッケージで提供されているものにしたい)

Why

  • Packed Schemaやエンドポイント応答がJSON Schemaの古い仕様に基づいているのを解消する
  • APIの情報をmisskey-jsで一元的に管理する

Additional info (optional)

Checklist

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

@tamaina tamaina changed the title (wip) feat: エンドポイントの情報やpacked schemaはmisskey-js提供する (wip) feat: エンドポイントの情報やpacked schemaはmisskey-jsから提供する May 2, 2023
@github-actions github-actions bot requested a review from EbiseLutica May 2, 2023 12:06
@tamaina tamaina marked this pull request as draft May 2, 2023 12:14
@tamaina
Copy link
Contributor Author

tamaina commented May 2, 2023

移行作業者募集中

@tamaina
Copy link
Contributor Author

tamaina commented May 2, 2023

json-schema-to-tsを使ってよりいい感じにしてみた

@tamaina
Copy link
Contributor Author

tamaina commented May 2, 2023

image

recursive schemasはやっぱ怒られる

@tamaina
Copy link
Contributor Author

tamaina commented May 2, 2023

recursive schemasはやっぱ怒られる

そもそも内製SchemaTypeで怒られてないのが奇跡的

@tamaina
Copy link
Contributor Author

tamaina commented May 2, 2023

@syuilo
Copy link
Member

syuilo commented May 2, 2023

paramDefとかをクライアントでも持つとなるとサイズの肥大化が気になる
あとバックエンドを1年以内にGoかRustで書き直す計画がありそうした場合一元管理というメリットは失われる

@syuilo
Copy link
Member

syuilo commented May 2, 2023

バックエンド側にソースがあってそこからクライアント用型定義を自動生成できれば良いんだけど

@tamaina
Copy link
Contributor Author

tamaina commented May 3, 2023

paramDefとかをクライアントでも持つとなるとサイズの肥大化が気になる

import typeで上手いことなってくれると期待してる

あとバックエンドを1年以内にGoかRustで書き直す計画

ぞれなら今開発してるものがすべて無駄では?
(とりあえず半年でも正常な状態で使えればいいと思ってる)

バックエンド側にソースがあってそこからクライアント用型定義を自動生成

TypeScriptベースをやめるなら探して実装するほうが無駄

@tamaina
Copy link
Contributor Author

tamaina commented May 4, 2023

tscでJavaScript heap out of memoryしちゃった

@tamaina
Copy link
Contributor Author

tamaina commented May 4, 2023

解決したわ

@syuilo
Copy link
Member

syuilo commented Jul 3, 2023

pnpm i で直らない?

@tamaina
Copy link
Contributor Author

tamaina commented Jul 3, 2023

pnpm install --forceしても治らない

@syuilo
Copy link
Member

syuilo commented Jul 3, 2023

@tamaina
Copy link
Contributor Author

tamaina commented Jul 3, 2023

とりあえず握りつぶした

@u1-liquid
Copy link
Sponsor Contributor

古い@types/msが悪さしてる?

@tamaina
Copy link
Contributor Author

tamaina commented Jul 3, 2023

古い@types/ms

backendから消してみたけど効果なかった

@chocolate-pie
Copy link
Contributor

chocolate-pie commented Jul 3, 2023

@tamaina 自分の場合はCtrl + Shift + PRestart TS Serverで直ったけどどうです?

@tamaina
Copy link
Contributor Author

tamaina commented Jul 3, 2023

どうです?

ダメでしたね(私が握りつぶしたからでは

@tamaina
Copy link
Contributor Author

tamaina commented Jul 17, 2023

普通にやる気がなくなってきたけどやる必要がある

苦痛

@hilot06
Copy link

hilot06 commented Oct 2, 2023

参加します
とりあえず、endpoint-base.tsからmisskey.jsのtype Endpointsを呼んでそうなので、misskey.js/src/api.types.tsEndpointsのTODOを潰して行こうと思っています
それより先にこれやってくれと言うやつがあれば書きます

@tamaina
Copy link
Contributor Author

tamaina commented Oct 22, 2023

変更が多すぎるため無期限にclose

@tamaina
Copy link
Contributor Author

tamaina commented Feb 6, 2024

機運が高まっているもののこの作業は二度とやりたくない

@tamaina
Copy link
Contributor Author

tamaina commented Feb 6, 2024

(あとendpoints.tsはもうちょっとファイルに分割したいかな)

@tamaina
Copy link
Contributor Author

tamaina commented Feb 6, 2024

🙁がついてるのは本当に意味がわからん、🤬🤬🤬🤬

@tamaina
Copy link
Contributor Author

tamaina commented Feb 6, 2024

(私の手が遅いのもいけないんだけど、作業をやっている間にも開発が進んで無限に変更が発生するので意欲が持たない)

@KisaragiEffective
Copy link
Sponsor Collaborator

😭

@KisaragiEffective
Copy link
Sponsor Collaborator

KisaragiEffective commented Feb 13, 2024

作業をやっている間にも開発が進んで無限に変更が発生する

自分の答えとしてはコードベースが巨大でconflictするリスクが高い上、リファクタリングのために全体の変更をフリーズさせることができる機運がないので、このPRを細かくパーツ分けして少しずつやっていきたいと思います

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants