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

sap.ushell.services.CrossApplicationNavigation is not identified by linter

Open sukramAxians opened this issue 1 year ago • 2 comments

onNavBack: async function () {
	const sPreviousHash = History.getInstance().getPreviousHash();
	// TODO: >= 1.120 remove deprecated CrossApplicationNavigation Usage. See: 
        // https://sapui5.hana.ondemand.com/#/api/sap.ushell.services.CrossApplicationNavigation
	// Use https://sapui5.hana.ondemand.com/#/api/sap.ushell.services.Navigation instead.
	const oCrossAppNavigator = await Container.getServiceAsync("CrossApplicationNavigation");
	const isInitialNavigation = await oCrossAppNavigator.isInitialNavigationAsync();
	if (sPreviousHash !== undefined || !isInitialNavigation) {
		history.go(-1);
	} else {
		this.getRouter().navTo("master", {}, true);
	}
}

image

Expected Behavior

This usage is displayed in linter output.

Current Behavior

No info about it.

Context

  • UI5 linter version: 0.3.5
  • Node.js Version: 20.16.0
  • npm Version: 10.8.1
  • OS/Platform: Mac
  • Browser (if relevant): unknown
  • Other information regarding your environment (optional): nothing

Log Output / Stack Trace

[...]
ui5lint --details --verbose
verb cli:middlewares:base using ui5lint version 0.3.5 (from .../@ui5/linter/bin/ui5lint.js)
verb cli:middlewares:base using node version v20.16.0
verb generateProjectGraph Creating project graph using object...
verb graph:Module Could not find any build manifest in module ui5-linter-target
verb graph:Module Configuration for module ui5-linter-target is provided in YAML file at .../core-util/ui5.yaml
verb specifications:types:Library Path mapping for library project com.axians.itsolutions.ui5.neo.schedule.core.util:
verb specifications:types:Library   Physical root path: .../core-util
verb specifications:types:Library   Mapped to:
verb specifications:types:Library     /resources/ => src
verb specifications:types:Library     /test-resources/ => test [does not exist]
verb specifications:types:Library Found namespace com.axians.itsolutions.ui5.neo.schedule.core.util in manifest.json of project com.axians.itsolutions.ui5.neo.schedule.core.util at /com/axians/itsolutions/ui5/neo/schedule/core/util/manifest.json
verb specifications:types:Library Found namespace com.axians.itsolutions.ui5.neo.schedule.core.util in .library file of project com.axians.itsolutions.ui5.neo.schedule.core.util at /com/axians/itsolutions/ui5/neo/schedule/core/util/.library
verb specifications:types:Library Found a manifest.json and a .library file on the same level for project com.axians.itsolutions.ui5.neo.schedule.core.util.
verb specifications:types:Library Resolving namespace of project com.axians.itsolutions.ui5.neo.schedule.core.util from manifest.json...
verb specifications:types:Library Namespace of project com.axians.itsolutions.ui5.neo.schedule.core.util is com/axians/itsolutions/ui5/neo/schedule/core/util
verb specifications:types:Library Using copyright from /com/axians/itsolutions/ui5/neo/schedule/core/util/.library for project com.axians.itsolutions.ui5.neo.schedule.core.util...
verb graph:Module Module ui5-linter-target contains project com.axians.itsolutions.ui5.neo.schedule.core.util
verb graph:ProjectGraph Adding project: com.axians.itsolutions.ui5.neo.schedule.core.util
verb graph:ProjectGraph Skipping resolution of optional dependencies since none have been declared
perf Trace Project Graph creation took 128.15 ms
perf Trace Linting manifest.json files took 16.26 ms
perf Trace XML Transpiler initialization took 4.17 ms
[...]
verb linter:ui5Types:amdTranspiler:TsTransformer Transforming Controller.js
verb linter:ui5Types:amdTranspiler:pruneNode Pruning node ArrayLiteralExpression
verb linter:ui5Types:amdTranspiler:pruneNode Pruning node FunctionExpression
verb linter:ui5Types:amdTranspiler:pruneNode Pruning node CallExpression
verb linter:ui5Types:amdTranspiler:pruneNode Parent node ExpressionStatement can be removed
verb linter:ui5Types:amdTranspiler:pruneNode Pruning node ExpressionStatement
perf Trace Transpiling AMD to ESM took 5.12 ms - Controller.js
[...]
perf Trace Type-check resource took 6.38 ms - /resources/com/axians/itsolutions/ui5/neo/schedule/core/util/controller/Controller.js
[...]

Any output for Controller.js is missing.

sukramAxians avatar Sep 05 '24 09:09 sukramAxians

Thanks for reporting. This looks like what we call a "Partial Deprecation" (see also https://github.com/SAP/ui5-linter/pull/286). We'll look into how best to solve this.

RandomByte avatar Sep 12 '24 15:09 RandomByte

We will add support for partial deprecations related to sap.ushell in backlog item CPOUI5FOUNDATION-984.

flovogt avatar Feb 14 '25 14:02 flovogt