Make minified builds determinstic #4070
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
May fix #3999, but will need to see if Mozilla can reproduce the build
with this updated repo.
Investigated a bit, looks very likely that browserify non-determinism is caused by a bug in uglifyify that deletes options flags when they pass through the transform.
There seems to be a good fix for it in this PR, but it's been sitting around for nearly a year, so I don't expect it merged any time soon.
We should probably move to a different minification strategy, but in the meanwhile, I've merged that patch into my own branch at danfinlay/uglifyify#keep-flags, so we can install from that and have control of our source, I can also move that into the MetaMask org.
Another fix could be to remove minification, but I know that could increase our bundle size beyond what Mozilla accepts (oh, the irony, that their requirements caused us to breach them!)