I'm a web developer and have been doing JavaScript both on client and server for quite a while. At some point I started to understand that I want to focus on JavaScript as a language and a tool for developers rather than using it as a JavaScript developer.
I'm wondering which theory basis and practical skills should I get if I want, for instance, to end up at V8 JavaScript runtime team?
So some information about the Atom editor I compiled from source.
Atom 1.23.0-dev.
Now if I do a search on the initial error I received when I installed the "original" tokamak-terminal I really get no help.
Here is the error that I first viewed:
TypeError: target[Symbol.iterator] is not a function
at TooltipManager.add (/usr/share/atom/resources/app/src/tooltip-manager.js:117:35)
at TokamakTerminalView.module.exports.TokamakTerminalView.initialize (/home/raoul/.atom/packages/tokamak-terminal/lib/view.coffee:47:38)
at TokamakTerminalView.View [as constructor] (/home/raoul/.atom/packages/build/node_modules/space-pen/lib/space-pen.js:184:25)
at new TokamakTerminalView (/home/raoul/.atom/packages/tokamak-terminal/lib/view.coffee:15:7)
at StatusBar.module.exports.StatusBar.createTerminalView (/home/raoul/.atom/packages/tokamak-terminal/lib/status-bar.coffee:167:27)
at StatusBar.module.exports.StatusBar.newTerminalView (/home/raoul/.atom/packages/tokamak-terminal/lib/status-bar.coffee:258:24)
I came across a similar error when I did a Google search for another extension. See the link that follows.
[(https://github.com/atom/settings-view/issues/962)]
Part of the error that appears in that discussion.
TypeError: packages[Symbol.iterator] is not a function
at InstallPanel.addPackageViews (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:390:30)
at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:461:26
at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:68:26
at AtomIoClient.module.exports.AtomIoClient.fetchFromCache (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:160:22)
at AtomIoClient.module.exports.AtomIoClient.featuredPackages (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:65:25)
What strikes me in that 4 months nobody seems to have been able to fix of what seems to a garden-variety defect. The issue is still open. So where does the problem lie? Once again does the function exist in this case, or is it called with the wrong parameters or what exactly? How does one easily find out? The whole coffeescript just adds another layer of confusion in the case of the tokamak-terminal scenario. Unfortunately Atom doesn't see the view.js source when I convert/transpile view.coffee to view.js, very hard to comprehend why.
Ok so I do a search within all extensions of my personal atom folder to see which other source files uses atom.tooltips.
I find quite a few and seemingly none of them triggers the same kind of error as with tokamak-terminal.
I do come across an interesting piece of code in space-pen.js
$.fn.setTooltip = function() {
throw new Error("setTooltip is no longer available. Please use
atom.tooltips.add
instead.\nSee the docs at https://atom.io/docs/api/latest/TooltipManager#instance-add");};
So the atom.tooltips.add function should exist, as I am using the latest development version of Atom!
In another extension tool-bar, in the file tool-bar-button-view.js, there is a piece of code that also uses atom.tooltips.add
if (options.tooltip) {
this.element.title = options.tooltip;
this.subscriptions.add(
atom.tooltips.add(this.element, {
title: options.tooltip,
placement: getTooltipPlacement
})
);
}
This seems to work fine. So what is happening here? Is the other errors related to atom.tooltips.add , false errors? Could be that atom.tooltips itself is not declared, in those source files where the error occurs as described at the start of this comment. So maybe the object doesn't exist because of something wonky going on when JS does the require imports.
This weird error messages and hard to trace issues with JS seems very common place. If you gain can the practical skills to improve JS error messages, improve on many JS quirks, e.g circular dependency detection you would be on a good start I believe.
https://stackoverflow.com/questions/37462055/detect-circular-dependencies-in-es6