Makefile dependency tree is incomplete, makefiles do not build only as necessary
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.4k
- 平均マージ
- 4日 3時間
- マージ済み PR(30日)
- 272
説明
- Version: master
- Platform:Linux samtu 4.18.0-12-generic #13-Ubuntu SMP Wed Nov 14 15:17:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: gyp/make
The makefiles generated by gyp are not working for development (they work better for single-shot CI builds). Perhaps I'm missing something, please tell me if I am, but I've done some asking around to people who know the gyp system, and have some agreement on these points.
-
make node; make nodeMake should do nothing if no source code has been changed, butmake noderelinks bothnodeandcctest(!?) every time it is run. -
make -C out nodeis faster,butand builds just node, not cctest, but it does it even if no source has changed. However, its build/dependency tree is incomplete! It doesn't run js2c so if any js source files are changed they will not be built-in with js2c. Fast and wrong is worse than slow. -
make -C out/Release nodeas above -
make -j4 node; make -j1 testoften required. parallel make is not working for test. Various symptoms of brokenness occur (irc has some discussion). Sounds like this could be related to the dependency relationships not being correctly specified, causing build rules to run in parallel when they cannot, and thus be racy. -
./configure --shared-openssl-includeswill cause openssl include paths to be passed to dependencies that don't use openssl. This might appear harmless, but it (for example) causes ccache to rebuild icu, even though icu doesn't use openssl. Possible fix: https://github.com/nodejs/node/blob/eef6504cf7b95ada170ec9878089ce57fde551d8/common.gypi#L549-L560, addOPENSSL_THREADSto the else clause (I haven't tried yet).
Ninja notes:
Ninja (./configure --ninja) doesn't have the above problems for building, its dependency tree is correct (it builds nothing when nothing has changed, and it reruns js2c when js files have changed).
However, it is either incomplete or not integrated with the rest of the build (I'm not sure how its intended to work). It doesn't make the top-level node symlink (at least test-doc relies on this), so a ln -s out/Release/node node is required for make test-doc. As for make test, it won't use the ninja build output, because it relies on .PHONY targets, so it always (effectively) does a make -C out all.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リポジトリのルートから、記載されている make コマンドと Ninja コマンドを再現し、その後、生成された Makefiles と common.gypi の依存関係設定を調べます。js2c とトップレベルの node symlink を含め、Make と Ninja の依存関係ツリーを比較します。変更のないビルドが no-op になり、JavaScript の変更で js2c が再実行され、並列テストビルドが信頼性を持ち、Ninja の出力が文書化されたテストコマンドで動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- build-system
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 20/100