SAP/ui5-tooling

exclude-dependency CLI option has no effect?

Closed this issue · 4 comments

Expected Behavior

Example 1

When running ui5 build jsdoc --exclude-dependency=sap.suite.ui.commons, the api docu is build for every lib in the dependency tree except for sap.suite.ui.commons.

Example 2

When running ui5 build jsdoc --exclude-dependency-regexp=sap, the api docu is build for every lib in the dependency tree except for libs in the sap namespace.

Current Behavior

In both cases any lib is included (at least code analysis is done for sap.suite.ui.commons), resulting in a failed build because the sap.suite.ui.commons library apparently does not meet the requirements for a valid jsdoc build.

Steps to Reproduce the Issue

Run the following command in a ui5 project: ui5 build jsdoc --exclude-dependency=sap.suite.ui.commons

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 3.6.1
  • Node.js Version: 16.19.1
  • npm yarn Version: 3.5.0
  • OS/Platform: WIN 11

Sadly this works as designed. The --exclude-dependency option controls which dependencies shall be part of the build result (see https://sap.github.io/ui5-tooling/stable/pages/CLI/#ui5-build). To clarify further, since you didn't specify any included dependencies, excluding a library using this flag has no practical effect.

You are building the JSDoc of your project. Since that project declares a (maybe transitive) dependency to sap.suite.ui.commons, it is possible that it references types of that library in its JSDoc. Therefore UI5 Tooling has to always build the JSDoc of that dependency first.

I think the real issue here is that the JSDoc build for sap.suite.ui.commons fails. That is really unfortunate and likely a configuration issue in the library. We will check with the responsible team, sorry for the inconvenience.

If sap.suite.ui.commons is a direct dependency of your project, you can try removing it from your ui5.yaml and testing whether the build works like that.

Update: Still working on resolving the JSDoc issues in the sap.suite.ui.commons library

Thanks for the clarification!
Since the sap.suite.ui.commons is not a direct dependency of my project i will hope and wait for issue to be solved :-)

@johannesrue I'm glad to tell that this issue has been solved with SAPUI5 1.121.0. However, there might still be other libraries where similar issues appear.