Dedupe regression with browserify v8
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- build-system
調査の方向性
factor-bundle と browserify 8.0.0 で重複排除のシナリオを再現し、生成された A bundle とここに示す browserify v7 の出力を比較します。共通 bundle と A bundle がモジュール ID 100 および 200 をどのように参照しているかを追跡します。報告された TypeError が発生せずに重複排除されたモジュールが読み込まれ、異なる依存関係のケースが維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'm logging the issue here, but the error is due to changes in browserify 8.0.0.
This might be best explained with an example:
- Module
Adepends on moduleB - Other modules depend on module
B', which is identical toBbut a separate copy exists for whatever reason Bis deduped by browserify and points toB'Bgets routed to theAbundle, assigned ID of200B'gets routed to the common bundle, assigned ID of100- Page includes common bundle then
Abundle
A bundle in browserify v7:
200:[function(require,module,exports){
module.exports=require(100)
},{"dup":100}]}
A bundle in browserify v8:
200:[function(require,module,exports){
arguments[4][100][0].apply(exports,arguments)
},{"dup":100}]}
This results in an exception Uncaught TypeError: Cannot read property '0' of undefined because ID 100 is not defined in the current bundle.
This worked in v7 because it used require, which tries to resolve the module with previously defined requires from other bundles.
I realize this is an edge case and that if npm is correctly deduping dependencies, this situation should not occur. And the v8 behaviour is more correct in theory because B may have different dependencies from B'. However, assuming that any module is defined in the current bundle is dangerous when factor-bundle is involved.
- 主要言語
- JavaScript
- スター
- 397
- フォーク
- 24
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
browserify/factor-bundle のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
browserify/factor-bundle#95 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
browserify/factor-bundle#94 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
browserify/factor-bundle#92 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
browserify/factor-bundle#83 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
browserify/factor-bundle#82 · リアクション 3 件 ·
browserify/factor-bundle の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
Issue-Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sugarlabs/musicblocks#8924 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled オープンcustomer-eng status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100