newtab npm bundle command generates different bundle on windows
Categories
(Firefox :: Messaging System, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox122 | --- | unaffected |
firefox123 | --- | unaffected |
firefox124 | --- | wontfix |
firefox125 | --- | fixed |
People
(Reporter: aminomancer, Assigned: aminomancer)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
D201139 seems to have introduced a regression where building the newtab bundle on windows yields a different result than on mac/linux.
You can test it with cd browser/components/newtab && "../../../mach" npm install
Reverting the changes to the webpack config and resourceUriPlugin.js before bundling also eliminates the diff.
I ran a bisection to double check: Bug 1878731, https://phabricator.services.mozilla.com/D201139
The issue seems to be because the ResourceUriPlugin produces wrong URLs on windows, mixing forward slashes and back slashes, because it substitutes a windows path (forward slashes) for a substring of a URL (back slashes):
// resourceUriPlugin.js:ResourceUriPlugin::apply
// before the patch
pathname :>> C:\mozilla-git\mozilla-unified-2\browser\components\newtab\common\Actions.sys.mjs
pathname :>> C:\mozilla-git\mozilla-unified-2\browser\components\newtab\common\Dedupe.sys.mjs
// after the patch
pathname :>> C:\mozilla-git\mozilla-unified-2\browser\components\newtab\common/Actions.sys.mjs
pathname :>> C:\mozilla-git\mozilla-unified-2\browser\components\newtab\common/Dedupe.sys.mjs
Since the try-runner.js runs on linux, any time we submit a patch from windows, it will get backed out (see bug 1880371 for example), unless we first discard the changes to activity-stream.bundle.js
A simple fix is to reform the path from the URL before using it. path.join
knows how to handle slashes on Windows.
Assignee | ||
Comment 1•9 months ago
|
||
Updated•9 months ago
|
Comment 2•9 months ago
|
||
Set release status flags based on info from the regressing bug 1878731
Comment 3•9 months ago
|
||
Set release status flags based on info from the regressing bug 1878731
Updated•9 months ago
|
Comment 5•9 months ago
|
||
bugherder |
Updated•9 months ago
|
Comment 6•9 months ago
|
||
The patch landed in nightly and beta is affected.
:aminomancer, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox124
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Updated•9 months ago
|
Description
•