Question: Why Isn't Atom on Electron >1.0.0 yet?


#1

Just curious on why Atom isn’t leveraging Electron >1.0.0 yet?


#2

Short answer: we’re working on it.

Long answer: Upgrading to a new version of Electron, even just a patch release, is a heavily involved process. There needs to be thorough multi-platform regression testing to make sure everything works as expected. In addition, the changes just to make Atom work with a new version of Electron may be substantial. Sometimes, all of this effort just isn’t worth it compared to what the new Electron version would offer.

In this case, there are more factors at play than usual. First of all, Electron 1.0.0 removed many deprecated APIs, including the old require('app') syntax. While the core Atom codebase has been updated to use the new APIs, many packages are still using the deprecated ones, and need to be updated. Electron 1.1.0 and above also started using Node v6, which caused multiple problems with Atom. apm was stuck on Node 0.10.x until very recently, so first we needed to update that to a more modern version (in this case Node 4 LTS). Then the internal CI servers had to be updated. Then multiple dependencies had to be updated so that they would work using the new Node version. Then Atom had to be updated to be compatible with the new apm version. So now we’re very cautiously experimenting with the Electron upgrade.

Here’s the general procedure on how we update to new versions of Electron: https://github.com/atom/design-decisions/blob/master/electron-update-procedure.md

Hope that answered your question!


Where does the Electron version come from?
#3

@Wliu In regards to the list https://gist.github.com/50Wliu/ef22d45854415842d9c59f562eca99bc how did you generate this? One thing that has impressed me with Atom is the way that the team handles deprecating code over time (compared with a lot of other Node projects) and I’d like to learn more about how the team does this.


#4

So while I’d like to say that I’m a master of the command line and managed to get some scripts to do it automatically for me, it did take a lot more effort than that…

The first step is to download all the packages. Then using the APIs available at http://electron.atom.io/docs/api/, construct a grep regex similar to the following: require\s*\(\s*app|auto-updater|browser-window|...\s*\) and have it run through all the packages. That’ll catch 99+% of the require deprecations. I didn’t actually check for any other deprecations, such as BrowserWindow options or Url -> URL renaming. Then I manually created the Gist by copying over the data from the grep.