Community
Participate
Working Groups
1) Create a .tern-project file 2) Add 'plugins: { 'mongodb': [] }' entry to it 3) Create a new JS file in the same project 4) Add '/*eslint-env node, express*/ exp' to the JS file 5) Activate content assist on 'exp' Result: No assist proposals from the express plugin. This will work if you have no .tern-project file or a missing or empty plugin entry in it. By specifying 'mongodb' you tell Tern to only start the mongodb plugin. Long term we will support dynamically loading library indexes, but until we have that workflow available, we need some way of informing the user why the tooling doesn't work in their express app.
For now my suggestion is a warning annotation on the file explaining that they are trying to use a library that is disabled in their .tern-project file.
Sound fine. Make sure the guy has enough information to know what to do in the error message (ie. add it to the TPF). I suppose an insane idea is a quick fix. Let's start with the warning.
He has to know that code assist won't work for him etc.
(In reply to Steve Northover from comment #2) > I suppose an insane idea is a quick fix. Quick fix would be pretty easy for this particular case - we know the lib they specified and we know we can load it, so the fix would be to update the TPF and issue a restart. Since bug 485219 is geared towards the general fix for handling unknown libs / requires, we should make sure to focus this bug only on the case when the user has entered a library name that is one of the Tern built-ins that is not currently available in the running server.
An example of a fix that updates the TPF can be seen in quickFixes.js in the "check-tern-project" function.
Let's do the quickfix and move on. That way we have a consistent story that point people toward the .tern-project file when they are smart people that care about the contents of the file (and care that is should be honored or not).
What do you think of the following text for the annotation: To get tooling for the 'pg' environment, the 'postgres' plugin must be started. 'postgres' has not been set in the 'plugins' entry of your .tern-project file. To get tooling for the 'node' environment, the 'node' plugin must be started. 'node' has not been set in the 'plugins' entry of your .tern-project file.
"to get support for" instead of talking about tooling. Seems fine otherwise.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6b940b3d38555d7bae4eae3702f49a18f8e07c8d New rule + tests Please take a look and let me know what you think of the message/setting text. I will update the wiki once we are happy with it.
I won't get to this until next week. Go ahead and close the bug and we can tweak and/or reopen if necessary.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=03e57c765e7f2971939f42eeca929704cdde2ea1 Updated text and added a quick fix