ruby / ruby/ruby.wasm

Better build orchestration

オープン
#483 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Ruby
スター
875
フォーク
68
平均マージ
9日 5時間
マージ済み PR(30日)
1

説明

The underlying build system of rbwasm build is quite messy.

  1. Each build step has to have its ad-hoc up-to-date check like followings:
    https://github.com/ruby/ruby.wasm/blob/a5d06a01873130fda0f07f4401a3b018c6f1d753/lib/ruby_wasm/build/product/baseruby.rb#L26 https://github.com/ruby/ruby.wasm/blob/a5d06a01873130fda0f07f4401a3b018c6f1d753/lib/ruby_wasm/build/product/crossruby.rb#L171
  2. Uses of build product and cache key computation are placed far, so we often forget to update the cache key and get a wrong cache restored.
    https://github.com/ruby/ruby.wasm/blob/a5d06a01873130fda0f07f4401a3b018c6f1d753/lib/ruby_wasm/build.rb#L78
  3. The current cache mechanism cannot restore two or more artifacts produced within a single rake task job. This usually happens for PIC & non-PIC builds invoked by rake npm:ruby-head-wasm-wasi:build
  4. Our cache mechanism does not allow partial cache-hit, so even if we change only crossruby source revision, we have to rebuild openssl from scratch.
  5. Our cache mechanism is not sensitive to recipe changes. For instance, even if we change CFLAGS value, crossruby product will not be rebuilt.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず lib/ruby_wasm/build.rb と、lib/ruby_wasm/build/product/baseruby.rb および crossruby.rb にあるプロダクト実装を読みます。エントリーポイント rake npm:ruby-head-wasm-wasi:build と、その PIC および非 PIC アーティファクトを追跡します。ビルドキャッシュが複数のアーティファクトと部分的なヒットを処理し、ソースリビジョンやレシピの変更があっても誤った結果を復元しないことが完了条件です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
ruby, wasm
領域
build-system
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。