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

Bug 493838

Summary: [es6] Warn user when es_modules is disabled when import/export is used
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, Olivier_Thomann
Version: 12.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=493019
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Curtis Windatt CLA 2016-05-17 14:16:16 EDT
Similar to what we do when 'require' is used without the node plugin, we should warn about the es_modules plugin being disabled.
Comment 1 Curtis Windatt CLA 2016-05-17 15:12:45 EDT
*** Bug 493842 has been marked as a duplicate of this bug. ***
Comment 2 Olivier Thomann CLA 2016-05-20 13:53:35 EDT
Created attachment 261907 [details]
Proposed patch

Will work on adding regression tests.
Comment 3 Olivier Thomann CLA 2016-05-20 13:53:54 EDT
Curtis, please review.
Comment 4 Michael Rennie CLA 2016-05-25 13:00:39 EDT
using the test case from our smokeTests project (in ecma6/import.js)

import * as myModule from "./exports";

and a .tern-project file like:

{
	"plugins": {
		"node": {}
	},
	"libs": [
		"ecma5",
		"ecma5"
	],
	"ecmaVersion": 6,
	"loadEagerly": [],
	"sourceType": "module"
}

you get a lint message that reads:

"Type information for this library might be available, but requires the 'undefined' plug-in to be running."

I would expect the lint message to be the new one (note the message below is edited):

"import/export declarations require the \'es_modules\' plug-in to be running."
Comment 5 Olivier Thomann CLA 2016-05-25 13:35:01 EDT
Delivered.