-
Notifications
You must be signed in to change notification settings - Fork 7.6k
JS code hints aren't picking up new items added to exports #4991
Comments
It seems like something's broken about how we update hints from other files. |
To @dangoor, nominating for sprint 31. |
Reassigning for me to look at for now. |
I'm going to reclaim this and move it to sprint 32 since we're pencils down on sprint 31. |
Some notes about this: I cannot reproduce this in the Tern demo, so it would seem that this is related to how we're using Tern. Watching the behavior of ScopeManager, I can confirm that we're sending Tern an "update file" message for MyModule.js with the correct, updated text. To fix this bug, it looks like I'm going to have to dig a deeper into what's happening inside of Tern. |
Finally getting back to this one to take a closer look. I think I understand the problem and why it works in the Tern demo but not in Brackets. In Brackets, when we update a file, we send the new text to Tern identifying the file by its full path. When Tern sees The fix for this would seem to be either:
I don't think the first choice will work because of projects like Brackets itself. The files are all under I can't find it now, but I know we ultimately would like to parse require configurations. I don't think we'd have to go that far to fix this, though. |
Ahh, here's the card for require configuration. |
I think the right solution here is probably to:
Strictly speaking, the first one will fix this bug as described. However, for projects like Brackets where the modules are in some directory other than the root, you'd still need the second step to do this right. Since JS Code Hints already has its own preferences code, we don't need to wait on the prefs system to implement that second step. |
Moving to sprint 35. |
Doesn't look like I'll get this wrapped up in 35. Moving to 36. |
Marking needs review to consider 1.0 in/out question after JS code hints architecture research |
Reviewed -- doesn't seem necessary for 1.0 (CC @dangoor in case you have concerns with removing the milestone) |
Yeah, I think we can remove this from 1.0. I think we should fix this when we fix code hints preferences |
var
statement, typeMyModule.
- nothing is hinted (correct)exports.something = something
below the functionMyModule.
Result: Still no hints. If you reload Brackets, you'll get the proper hint list (
something
).The text was updated successfully, but these errors were encountered: