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

add printing package folder sizes to the build script #5978

Merged
merged 15 commits into from
Dec 18, 2019

Conversation

bahmutov
Copy link
Contributor

@bahmutov bahmutov commented Dec 16, 2019

3:50:51 PM #printPackageSizes /Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages darwin
7.8M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/https-proxy
 11M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/desktop-gui
8.9M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/launcher
8.0K	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/web-config
6.3M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/extension
7.7M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/proxy
 20K	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/reporter
 12K	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/driver
1.1M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/example
 10M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/runner
 60M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/network
360M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/server
144K	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/static
456K	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/coffee
 12K	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/root
 27M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/electron
136K	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/ts
3.8M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages/socket
506M	/Users/gleb/git/cypress/build/darwin/Cypress.app/Contents/resources/app/packages

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 16, 2019

Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.

  • Please write [WIP] in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the [WIP] is removed.
  • Please familiarize yourself with the PR Review Checklist and feel free to make updates on your PR based on these guidelines.

PR Review Checklist

If any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'.

User Experience

  • The feature/bugfix is self-documenting from within the product.
  • The change provides the end user with a way to fix their problem (no dead ends).

Functionality

  • The code works and performs its intended function with the correct logic.
  • Performance has been factored in (for example, the code cleans up after itself to not cause memory leaks).
  • The code guards against edge cases and invalid input and has tests to cover it.

Maintainability

  • The code is readable (too many nested 'if's are a bad sign).
  • Names used for variables, methods, etc, clearly describe their function.
  • The code is easy to understood and there are relevant comments explaining.
  • New algorithms are documented in the code with link(s) to external docs (flowcharts, w3c, chrome, firefox).
  • There are comments containing link(s) to the addressed issue (in tests and code).

Quality

  • The change does not reimplement code.
  • There's not a module from the ecosystem that should be used instead.
  • There is no redundant or duplicate code.
  • There are no irrelevant comments left in the code.
  • Tests are testing the code’s intended functionality in the best way possible.

Internal

  • The original issue has been tagged with a release in ZenHub.

@bahmutov bahmutov requested a review from kuceb December 16, 2019 20:53
@cypress
Copy link

cypress bot commented Dec 16, 2019



Test summary

3584 0 47 0


Run details

Project cypress
Status Passed
Commit 2979ee7
Started Dec 17, 2019 10:26 PM
Ended Dec 17, 2019 10:31 PM
Duration 04:52 💡
OS Linux Debian - 9.11
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

flotwig
flotwig previously approved these changes Dec 16, 2019
@flotwig
Copy link
Contributor

flotwig commented Dec 17, 2019

Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

@bahmutov the changes to parse-domain cause building the PSL to fail:

[driver:install     ] Running sanity check... 
[driver:install     ] Could not update list of known top-level domains for parse-domain because of "Command failed: /home/flotwig/.n/bin/node /tmp/rfff/packages/driver/node_modules/jest/bin/jest.js"
[driver:install     ] Using possibly outdated prebuilt list from Sat Nov 02 2019

It's semi-important that we ship an up-to-date PSL, since Cypress needs to match the PSL behavior of the browser to avoid document.domain errors.

Reviewed in the parse-domain repo: peerigon/parse-domain#91

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 17, 2019

So I don't why it says "Nov 2019" in your case. It built the list yesterday when I pointed at my fork - the fact that it tries to run Jest to sanity check this is the 50MB question.

Here is my branch that we are installing https://github.com/bahmutov/parse-domain/tree/dist
It should already include the built files - check https://github.com/bahmutov/parse-domain/blob/dist/build/tries/meta.json

It should have been installed in packages/network too

~/git/cypress/packages/network on print-package-sizes
$ cat node_modules/parse-domain/build/tries/meta.json 
{"updatedAt":"2019-12-16T22:00:57.008Z"}

@flotwig
Copy link
Contributor

flotwig commented Dec 17, 2019

Lol, that's because the driver is still using parse-domain@2.3.4, not your fork. I guess it's good to know that it's broken even in the official package 🤦‍♂️

I can't tell if it's broken in our CI, since we cache dependencies, the postinstall step doesn't seem to run on every build. Any ideas how to tell?

I do still get an error using the fork in the network package:

[network:install    ] Could not update list of known top-level domains for parse-domain because of "Command failed: /home/flotwig/.n/bin/node /tmp/rfff/node_modules/jest/bin/jest.js"
[network:install    ] Using possibly outdated prebuilt list from Mon Dec 16 2019
[network:install    ] npm WARN sinon-chai@3.3.0 requires a peer of chai@^4.0.0 but none is installed. You must install peer dependencies yourself.
[network:install    ] 

It's a little dangerous to rely on a cached PSL stored in a git repo, since it will become stale almost immediately and nobody will check up on it - that is, until we get a bug report of the document.domain issue that occurs.


As a band-aid we could run the build-tries script in the build-binary stage.

@bahmutov
Copy link
Contributor Author

@flotwig I have added postinstall steps to force domain refetches 165978e

flotwig
flotwig previously approved these changes Dec 17, 2019
packages/driver/package.json Outdated Show resolved Hide resolved
Co-Authored-By: Zach Bloomquist <github@chary.us>
@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 17, 2019 via email

@bahmutov bahmutov merged commit 79545fc into develop Dec 18, 2019
@emilyrohrbough emilyrohrbough deleted the print-package-sizes branch August 1, 2024 13:47
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.

2 participants