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

Pass electron version to checkers #23

Closed
JarLob opened this issue Nov 3, 2018 · 3 comments
Closed

Pass electron version to checkers #23

JarLob opened this issue Nov 3, 2018 · 3 comments

Comments

@JarLob
Copy link
Contributor

JarLob commented Nov 3, 2018

Some differences between electron versions were already found like https://github.com/electron/electron/blob/master/docs/api/breaking-changes.md#browserwindow
and it is likely more will be found in the future.

@ikkisoft
Copy link
Contributor

Just a quick summary of the current state and this issue:

  • Electron is quickly evolving, and many APIs are changing between major versions
  • Checks require precise naming for detecting misconfigurations. The current implementation is simply looking for multiple setting names
  • Ideally, we could detect the specific version in use and limit checks to the valid API names / syntax
  • As we may not be able to understand the specific version used (e.g. scan of a single file), we would need to check for all syntaxes anyway

Is this going to increase the overall complexity for just a minor performance gain? What do you think? Any additional benefit?

@JarLob
Copy link
Contributor Author

JarLob commented Dec 15, 2018

It should increase complexity only slightly in some checkers as the number of differences in electron versions is still low. Plus an additional scan step is needed to read version first. However it is not about performance gain but about precision of analysis. For example it is planned in the future to change the default values of webpreferences. Settings parsing was fixed
electron/electron#15594 although not sure in what version, so technically two settings parsing functions are needed for older and newer electrons.

@phosphore
Copy link
Contributor

A design proposal for this issue was submitted in #58 (comment).

phosphore added a commit that referenced this issue Jul 3, 2020
Consider Electron version and update checks according to new defaults (#23, #58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants