Bump electron to latest possible version, with "native" Superstring
Related to: https://github.com/pulsar-edit/pulsar/pull/484
Basically, the same code except that we're now using the native version of Superstring. This is to avoid slowdowns on files with too many lines.
Basically, this brings the time to a KeyDown event on files with 15k lines from 80ms (WASM Superstring) to 10ms (Native, this PR)
Currently, Electron 27.0.0
Bugs I found:
- [x] CTags is not context-aware
- [x] GitHub package is not working on this version
- [x] No terminal package will work (possible fix: https://github.com/Spiker985/x-terminal-reloaded/pull/41)
- [x] Spellchecker is also not context-aware
- [x] Tree-view doesn't delete files for some reason
- [ ] Hydrogen is not working
- [x] Some errors on keymaps -
Uncaught TypeError: Cannot read properties of undefined (reading '0')
Update on keymap error - fixed via https://github.com/pulsar-edit/atom-keymap/pull/3/commits/3a9a9b4cf791d15a87097099bdf5e228d6ae1c0b
With NAPI superstring, I also found this error on line 231 of autocomplete-plus/lib/subsequence-provider.js:
Uncaught (in promise) TypeError: Cannot set property score of #<SubsequenceMatch> which has only a getter
at bufferResultsToSuggestions (/home/mauricio/projects/pulsar_repos/autocomplete-plus/lib/subsequence-provider.js:231:27)
at async Promise.all (index 2)
bufferResultsToSuggestions @ /home/mauricio/projects/pulsar_repos/autocomplete-plus/lib/subsequence-provider.js:231
Promise.then (async)
getSuggestionsFromProviders @ /home/mauricio/projects/pulsar_repos/autocomplete-plus/lib/autocomplete-manager.js:354
findSuggestions @ /home/mauricio/projects/pulsar_repos/autocomplete-plus/lib/autocomplete-manager.js:250
autocomplete-plus:activate @ /home/mauricio/projects/pulsar_repos/autocomplete-plus/lib/autocomplete-manager.js:223
handleCommandEvent @ /home/mauricio/projects/pulsar_repos/pulsar/src/command-registry.js:405
dispatchCommandEvent @ /home/mauricio/projects/pulsar_repos/pulsar/node_modules/atom-keymap/src/keymap-manager.js:926
handleKeyboardEvent @ /home/mauricio/projects/pulsar_repos/pulsar/node_modules/atom-keymap/src/keymap-manager.js:671
handleDocumentKeyEvent @ /home/mauricio/projects/pulsar_repos/pulsar/src/window-event-handler.js:153
This probably can be solved by not re-setting the score at the builtin provider, or making a clone (which we probably should be doing anyway)