Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 484241

Summary: [tern] .tern-project file ignored when JS bundle loads
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Silenio_Quarti
Version: 10.0   
Target Milestone: 11.0   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2015-12-11 13:13:38 EST
If the very first JS file you load (the one that will start the JS bundle) is in a project with a .tern-project file, the project file is not used to start Tern.

This is because we start Tern while the bundle loads, and at that point we don't have access to the editor, etc to know where we are (to be able to get a project context), so we can't get the .tern-project file.

Steps:

1. create a project with a .tern-project file and a JS file
2. open the JS file and reload the page
3. The .tern-project file will not be read until you navigate to another project and then back again.

One option to fix this would be to delay starting Tern until you invoke an action the needs it.