ruby / ruby/ruby.wasm

Better build orchestration

未关闭
#483 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Ruby
星标
875
派生
68
平均合并
9 天 5 小时
30 天内合并 PR
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. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 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
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。