ui5-tooling
ui5-tooling copied to clipboard
Support Typed View Names
Hi,
i think the support for the typed view name syntax is missing as document here: https://sapui5.hana.ondemand.com/1.100.0/#/topic/e6bb33d076dc4f23be50c082c271b9f0
We noticed this when this error occured during the build process:
ERR! lbt:analyzer:ComponentAnalyzer an error occurred while analyzing component core/Component.js (ignored) TypeError: Cannot read property 'toLowerCase' of undefined
ERR! lbt:analyzer:ComponentAnalyzer at ComponentAnalyzer._analyzeManifest (..../@ui5/builder/lib/lbt/analyzer/ComponentAnalyzer.js:102:30)
ERR! lbt:analyzer:ComponentAnalyzer at ComponentAnalyzer.analyze (.../@ui5/builder/lib/lbt/analyzer/ComponentAnalyzer.js:58:10)
ERR! lbt:analyzer:ComponentAnalyzer at runMicrotasks (<anonymous>)
ERR! lbt:analyzer:ComponentAnalyzer at processTicksAndRejections (internal/process/task_queues.js:97:5)
ERR! lbt:analyzer:ComponentAnalyzer at async Promise.all (index 0)
ERR! lbt:analyzer:ComponentAnalyzer at async determineDependencyInfo (...@ui5/builder/lib/lbt/resources/ResourcePool.js:106:3)
ERR! lbt:analyzer:ComponentAnalyzer at async Promise.all (index 328)
ERR! lbt:analyzer:ComponentAnalyzer at async BundleBuilder._createBundle (...@ui5/builder/lib/lbt/bundle/Builder.js:142:26)
ERR! lbt:analyzer:ComponentAnalyzer at async Promise.all (index 1)
ERR! lbt:analyzer:ComponentAnalyzer at async Object.build (...@ui5/builder/lib/builder/builder.js:404:4)
ERR! lbt:analyzer:ComponentAnalyzer at async build (...lib/build.js:71:5)
In the manifest.json of our ui5 app we have specified the rootView and other view names like this:
module:core/app/AppView
The views are resolved by the function fromUI5LegacyName
https://github.com/SAP/ui5-builder/blob/master/lib/lbt/utils/ModuleName.js#L11, like here https://github.com/SAP/ui5-builder/blob/master/lib/lbt/analyzer/ComponentAnalyzer.js#L100.
As it seems they only know the pattern *.view.(JS|XML)
.
Maybe there should be a function like fromUI5ModulePath
for resolving the module path syntax, interfering the default resolving mechanism?!
function fromUI5ModulePath (path) {
return `${path.replace("module:", "")}.js`;
}
Thanks for your support!
Cheers
Johannes
Reported internally as CPOUI5FOUNDATION-484
Thanks for reporting. We are aware of this issue and track it internally. However, I can't provide a timeline for when to expect a fix at the moment. CC: @ecker
Fixed with @ui5/cli v2.14.14