Better build orchestration
未关闭
还没有人认领这个 Issue。
- 主要语言
- Ruby
- 星标
- 875
- 派生
- 68
- 平均合并
- 9 天 5 小时
- 30 天内合并 PR
- 1
描述
The underlying build system of rbwasm build is quite messy.
- 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 - 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 - 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 - 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.
- Our cache mechanism is not sensitive to recipe changes. For instance, even if we change CFLAGS value, crossruby product will not be rebuilt.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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