Rewatch: in-process bsc prototype
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ocaml
調査の方向性
#8653 の OCaml Rewatch の再実装から始め、解析およびコンパイルの手順で bsc 実行ファイルがどのように呼び出されるかを、stdlib とテストのビルドも含めて追跡してください。関係するアーティファクトと共有状態を文書化し、その後、逐次プロトタイプのベンチマークと、後続の実装が何を対象にすべきかについての具体的な推奨事項を定義してください。
索引モデルが issue の本文から書いたものです。
説明
Based on the OCaml rewatch reimplementation from #8653, we can prototype integrating the compiler directly into the rewatch executable to avoid having to spawn a bsc binary for each compilation step.
@cristianoc fed the prompt below into Fable, and I fed the same one into Astra.
I'll post the responses we got as separate comments. These can serve as a basis for further discussion.
We are porting Rewatch to OCaml as a drop-in for the Rust version. Next I want to see whether in-process bsc is worth it: stop spawning a bsc process per module, and ideally stop writing cmj/cmt (and maybe cmi) to disk at all.
Do not implement yet. Think this through with me.
Context:
- A lot of build time is process creation and artifact I/O, not typechecking.
- Integration might be >2x. I want a dirty prototype that measures that, even if it is incorrect and single-threaded.
- The compiler has lots of global/shared mutable state (Clflags, Config.load_path, Env cache, Ident, Js_config, typechecker mutation, etc.). There are essentially no tests that reuse one compiler process across modules.
- Getting rid of global state is probably much easier than the Rewatch port, but only if we know what to reset/isolate.
- No multicore required for the prototype. Sequential in-process with no cm* writes may already be faster.
- A real compiler service / parallel-from-one-process comes later.
Please:
- Survey how bsc is invoked today (parse vs compile), what it reads/writes (ast, cmi, cmj, cmt, js), and which globals would leak across compilations.
- Propose the smallest prototype that can give a real speedup signal on stdlib + tests (or a real project). What can stay on disk? What must be in memory? What must be reset between modules?
- Argue whether that prototype is the right next step, or whether something else is better (reset-and-reuse API, keep writing cmi only, compiler service still spawning-free but still on disk, etc.).
- Explicitly list what is likely to go well, what is likely to go wrong, and how we would get fooled by a misleading benchmark.
- Recommend a concrete goal we could later implement with /goal.
- 主要言語
- OCaml
- スター
- 7.5k
- フォーク
- 485
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 55
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rescript-lang/rescript のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
rescript-lang/rescript#8647 ·
-
rescript-lang/rescript#8632 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
rescript-lang/rescript#8624 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
rescript-lang/rescript#8596 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
rescript-lang/rescript#8573 · リアクション 1 件 ·
rescript-lang/rescript の issue をすべて見る
似ている issue
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
kubernetes-sigs/prow#953 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
out-of-date
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
CachyOS/CachyOS-PKGBUILDS#1894 ·
-
comp/dashboard P3 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
NousResearch/hermes-agent#117722 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
objectionary/jeo-maven-plugin#1760 ·