Bug 492945 - Inform the user when completions are 'guessed' by Tern
Summary: Inform the user when completions are 'guessed' by Tern
Status: REOPENED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: 12.0   Edit
Hardware: All All
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-05-04 00:45 EDT by Michael Rennie CLA
Modified: 2018-05-15 15:16 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2016-05-04 00:45:05 EDT
Steps:

1. open server.js (in the orion client code)
2. notice socket.io has no type infos (the warning tells you so - which is correct)
3. type socketio. in code and activate content assist
4. notice a bunch of bogus 'node' entries, where I would expect none (sine there is no definition, nor a node_modules entry for it)
Comment 1 Curtis Windatt CLA 2016-05-04 16:13:25 EDT
This is because Tern is guessing.
There are no known completions for socketio.  However, later in the file there is socketio.listen(), which is included in the forwards.  In Tern.js line 774, if no completions are found and guessing is turned on, we call guessProperties.  GuessProperties will see the forwarded 'listen' function and find a potential match from the Node index for tls.Server.prototype.

We can either turn off the guessing for completions or accept that it might guess wrong.  Would be nice to know the specific type we are getting compeltions for, rather than just the origin 'node'.
Comment 2 Curtis Windatt CLA 2016-05-05 17:15:01 EDT
See related Bug 493103
Comment 3 Michael Rennie CLA 2017-01-10 15:45:52 EST
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04002.html
Comment 4 Michael Rennie CLA 2017-01-12 11:58:32 EST
Reopening