build: don't apply snow to builds when --snow=false#23234
build: don't apply snow to builds when --snow=false#23234davidmurdoch merged 4 commits intodevelopfrom
--snow=false#23234Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
2e3c1f9 to
92e0df4
Compare
--snow=false--snow=false
21570f9 to
59f4e66
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #23234 +/- ##
========================================
Coverage 67.49% 67.49%
========================================
Files 1264 1264
Lines 49362 49362
Branches 12863 12863
========================================
Hits 33313 33313
Misses 16049 16049 ☔ View full report in Codecov by Sentry. |
Builds ready [59f4e66]
Page Load Metrics (1500 ± 342 ms)
Bundle size diffs
|
59f4e66 to
b23c7a1
Compare
Builds ready [b23c7a1]
Page Load Metrics (1087 ± 436 ms)
Bundle size diffs
|
development/build/static.js
Outdated
There was a problem hiding this comment.
TL;DR: the rest of the PR prevents the code from ever trying to load snow, so we don't need to copy an empty file anymore.
package.json
Outdated
There was a problem hiding this comment.
Dear reviewer: does the addition of --snow=false seem appropriate here?
package.json
Outdated
There was a problem hiding this comment.
Dear reviewer: does the addition of --snow=false seem appropriate here?
b23c7a1 to
8c105ea
Compare
package.json
Outdated
There was a problem hiding this comment.
Note to reviewers:
I did not add --snow=false to the build:test:dev:mv3 script because I don't understand that script. It sets the task/buildTarget to testDev and sets --apply-lavamoat=false, but the MV3 build system running with the TEST_DEV buildTarget forces lavamoat anyway (but in "stats mode").
see (where buildTarget === testDev):
metamask-extension/development/build/utils.js
Lines 28 to 38 in f2be12c
metamask-extension/development/build/scripts.js
Lines 1175 to 1178 in f2be12c
metamask-extension/app/scripts/app-init.js
Lines 71 to 76 in f2be12c
metamask-extension/development/build/scripts.js
Lines 541 to 547 in f2be12c
It actually more like a start: script than a build: script, so that makes it even more confusing.
Since this isn't used in CI I stopped investigating why it is the way it is and am writing this comment instead.
Builds ready [4f97c9b]
Page Load Metrics (1499 ± 567 ms)
Bundle size diffs
|
397cfc6 to
0287c97
Compare
Builds ready [0287c97]
Page Load Metrics (685 ± 392 ms)
Bundle size diffs
|
65bec7c to
ebd9732
Compare
Builds ready [ebd9732]
Page Load Metrics (1671 ± 446 ms)
Bundle size diffs
|
Builds ready [ebd9732]
Page Load Metrics (1433 ± 586 ms)
Bundle size diffs
|
Builds ready [8f1c874]
Page Load Metrics (944 ± 563 ms)
Bundle size diffs
|
5f2fb57 to
ca95fcf
Compare
ca95fcf to
ae871bf
Compare
ae871bf to
a3786fc
Compare
Builds ready [a3786fc]
Page Load Metrics (727 ± 466 ms)
Bundle size diffs
|
|
@weizman could you review this one please? |
|
LGTM, let me know when the conflict is resolved ~ |
Builds ready [a84e42b]
Page Load Metrics (1646 ± 690 ms)
Bundle size diffs
|
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/tocbot@4.21.2 |
Builds ready [6d514b8]
Page Load Metrics (619 ± 539 ms)
Bundle size diffs
|
The build script has an option
--snowthat is supposed to enable or disable snow, but several parts of the build process don't respect it. This hasn't been a problem since thestatic.jspart of the build process just makes the snow.js file used by the application a no-op. This PR changes it so that the snow.js (and related) file just never get imported whensnowhas been disabled.This PR is also prep for the webpack build, which also uses this
snowflag.