Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'migrate' tends to add a dependency to the module itself #33

Open
codeworrior opened this issue Jul 15, 2019 · 0 comments
Open

'migrate' tends to add a dependency to the module itself #33

codeworrior opened this issue Jul 15, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@codeworrior
Copy link
Member

While working on SAP/openui5@c782ce9 , I encountered the following issue with the ui5-migration tooling:

When the source of a module contains a global reference to the export of the same module, then the 'migrate' command adds a dependency to self and tries to use the resulting import whenever the export value is references. This happens in nearly each library.js module, but also in a few others.

Before

sap.ui.define([
	'sap/ui/core/library', // library dependency
	'sap/ui/commons/library'], // library dependency
	function() {
	...
	return sap.ui.ux3;

After (please also note that the 'library dependency' comments are also misplaced)

sap.ui.define([
	"sap/ui/ux3/library", // library dependency
	'sap/ui/core/library',
	'sap/ui/commons/library'], // library dependency
	function(ux3Library) {
	...
	return ux3Library;
});

To reproduce, you can execute the following commands

cd openui5
git checkout 6555a38
ui5-migration migrate src/sap.ui.ux3/src/sap/ui/ux3/library.js
ui5-migration migrate src/sap.ui.core/src/sap/ui/core/support/Support.js
@ecker ecker added the bug Something isn't working label Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants