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

Bug 522540

Summary: Moved require statement breaks side-loading modules using additional.modules.path
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: NodeAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 15.0   
Target Milestone: 16.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://github.com/eclipse/orion.client/pull/192
Whiteboard:

Description Michael Rennie CLA 2017-09-20 11:27:44 EDT
Part of the commit that fixed bug 522385, moved the require for the cloud foundry entry point to the top of the file. While this is normally a nice way to import stuff, it just so happened to break side loading modules that live on a path given in the additional.modules.path config option.

The specific example of the breakage happens in target.js:

if(options.configParams["cf.bearer.token.store"]){
		var getBearerToken = require(options.configParams["cf.bearer.token.store"]).getBearerTokenfromUserId;
	}

that require statement will no longer find a given module on any paths defined in additional.modules.path
Comment 1 Eclipse Genie CLA 2017-09-20 11:31:18 EDT
GitHub Pull Request 192 created by [mrennie]
https://github.com/eclipse/orion.client/pull/192
Comment 2 Michael Rennie CLA 2017-09-21 13:19:36 EDT
Merged.