ui5-migration icon indicating copy to clipboard operation
ui5-migration copied to clipboard

'migrate' sometimes adds a redundant dependency

Open codeworrior opened this issue 5 years ago • 0 comments

While working on https://github.com/SAP/openui5/commit/c782ce9be8cbd71201e19ba3cb4c0e81e439b71f , I encountered the following issue with the ui5-migration tooling:

Sometimes, the cleanup of global names adds a dependency again although it exists already. This seems only to happen when the existing dependency uses a relative name (./library or ./Tokenizer).

Before:

sap.ui.define([
	...
	'./Tokenizer',
	...
],
function( ...

After:

sap.ui.define([
	...
	'./Tokenizer',
	...
	"sap/m/Tokenizer",
	...
],
function( ...

To reproduce, you can execute the following commands

cd openui5
git checkout 6555a38
ui5-migration migrate src/sap.m/src/sap/m/MultiComboBox.js

codeworrior avatar Jul 15 '19 23:07 codeworrior