The Wayback Machine - http://web.archive.org/web/20210818062933/https://github.com/atom/github/pull/2513
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

Sync electron-* devDependencies with atom/atom #2513

Merged
merged 4 commits into from Sep 10, 2020

Conversation

@DeeDeeG
Copy link
Contributor

@DeeDeeG DeeDeeG commented Sep 10, 2020

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

Match electron-* dependencies to match Atom.

  • Bump electron-link from 0.4.1 to 0.4.3
  • Bump electron-mksnapshot to 9.0.2
    • This newer version of the electron-mksnapshot module allows specifying an exact Electron version you want to target, down to the patch level. I added a script/redownload-electron-bins.js file to set this env var when appropriate, and re-download (the correct version of) the Electron-vendored mksnapshot binary.

Screenshot/Gif

N/A

Alternate Designs

  • We could just use electron-mksnapshot@6.0.0 and hope that it's similar enough to 6.1.12 to catch all the bugs we need to catch.

    • Pro: Less complexity in the repo. Simple.
    • Cons: Might not catch the same bugs? Hard to know. Also, the mksnapshot binaries on Linux are still huge for that release (~420-450 MB).
  • When this github module is being installed as a dependency in the main Atom repo, the new script/redownload-electron-bins.js reads the main Atom repo's { package.json }.electronVersionand downloads the mksnapshot binary for that version of Electron.

    • Pro: Atom CI should now fail earlier on the GitHub package tests if an Electron bump breaks the GitHub module.
    • Con: This automatic behavior might be unexpected and confusing.

Let me know if you prefer the version of the Electron-vendored mksnapshot binary simply be hard-coded at this repo, and not dynamically set based on the parent Atom repo.

Benefits

Sync with Atom, catch all the bugs! 🎉

Much smaller (~1/10th as large) mksnapshot binary should save Linux users network bandwidth, hard-drive space, memory consumption...

Possible Drawbacks

script/redownload-electron-bins.js adds some complexity to the repo.

Applicable Issues

#2509

Metrics

N/A?

Tests

I am currently relying on the existing CI for validating this.

Documentation

N/A

Release Notes

N/A

User Experience Research (Optional)

N/A

DeeDeeG added 4 commits Sep 10, 2020
This makes sure we download the correct version
of the electron-vendored "mksnapshot" binary.

This will also automatically download the version in sync with Atom,
if this module is being installed
as a dependency in the main Atom repository.
@DeeDeeG DeeDeeG changed the title Bump electron dependencies Bump electron-* devDependencies Sep 10, 2020
@codecov
Copy link

@codecov codecov bot commented Sep 10, 2020

Codecov Report

Merging #2513 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2513   +/-   ##
=======================================
  Coverage   93.42%   93.42%           
=======================================
  Files         236      236           
  Lines       13196    13196           
  Branches     1897     1897           
=======================================
  Hits        12329    12329           
  Misses        867      867           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0fa279...294fcef. Read the comment docs.

@DeeDeeG DeeDeeG changed the title Bump electron-* devDependencies Sync electron-* devDependencies with atom/atom Sep 10, 2020
@DeeDeeG
Copy link
Contributor Author

@DeeDeeG DeeDeeG commented Sep 10, 2020

cc @smashwilson here's my "updating the electron-* devDependencies" PR.

It adds a script to take advantage of the ELECTRON_CUSTOM_VERSION env var. Without that, we'd have to use electron-mksnapshot@6.0.0. For some reason the Electron 6 update at atom/atom didn't work with electron-chromedriver and electron-mksnapshot at v6.0.0, it had to be more precisely 6.1.12. so I thought I'd do the same thing at this repo, and use exact vendored mksnapshot binary down to the patch level.

@smashwilson
Copy link
Member

@smashwilson smashwilson commented Sep 10, 2020

✄1¤7 Excellent, this is really cool. Thank you!

@smashwilson smashwilson merged commit 2774baa into atom:master Sep 10, 2020
6 checks passed
6 checks passed
@github-actions
linux tests
Details
@github-actions
macos tests macos tests
Details
@github-actions
lint
Details
@github-actions
snapshot tests
Details
@codecov
codecov/patch Codecov Report
Details
@codecov
codecov/project Codecov Report
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants