Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make minified builds determinstic #4070

Merged
merged 2 commits into from
Apr 25, 2018
Merged

Conversation

danfinlay
Copy link
Contributor

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!)

May fix #3999, but will need to see if Mozilla can reproduce the build
with this updated repo.

Switches our `uglifyify` dependency from the production one
(under-maintained) to one that I've merged a critical patch into.

I'm open to discussion of how else we might approach this problem here.
Maybe we should use a different minification module entirely, remove
minification, or maybe refactor our build system!
@danfinlay danfinlay force-pushed the i3999-DeterministicBuilds branch from edfa70d to 0c5add5 Compare April 24, 2018 22:01
@metamaskbot
Copy link
Collaborator

Builds ready [0c5add5]: mascara, chrome, firefox, edge, opera

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should get possibly its own full QA pass.

(intentionally not approving, to avoid getting (@&^( from tools/QA)

@danfinlay
Copy link
Contributor Author

Note to QA: To QA this branch, you need to minify, which means doing a full npm run dist type production build, the npm start dev-environment does not pass through uglifyify, so that does not test this PR.

@danfinlay danfinlay requested a review from tmashuang April 25, 2018 17:01
@danfinlay danfinlay changed the base branch from master to develop April 25, 2018 17:42
@danfinlay
Copy link
Contributor Author

I've moved the module to the MetaMask org and protected the branch, requiring a review for any merge to that branch.

@metamaskbot
Copy link
Collaborator

Builds ready [9116173]: mascara, chrome, firefox, edge, opera

@danfinlay danfinlay merged commit b9e5ef9 into develop Apr 25, 2018
@danfinlay danfinlay deleted the i3999-DeterministicBuilds branch April 25, 2018 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get builds reproducible enough for Firefox to resume accepting
2 participants