SAP/ui5-tooling

Error with library sap.fe.test after migration to v3

heimwege opened this issue · 3 comments

Hi,

during migration from v2 to v3 I got the following error message during ui5 build execution:

info graph:helpers:ui5Framework Using SAPUI5 version: 1.108.5

⚠️  Process Failed With Error

Error Message:
Failed to join project graph with root project fake-root-of-[projectNameHere]-framework-dependency-graph into project graph with root project [projectNameHere]: Failed to merge map: Key 'sap.fe.test' already present in target set

So I removed sap.fe.test from the ui5.yaml

[...]
framework:
  name: SAPUI5
  version: 1.108.5
  libraries:
    - [...]
    - name: sap.fe.test <---
    - [...]
[...]

and the build was successful. But then the opa5 karma runs (local and in the pipeline) have issues and crash because they rely on content from sap.fe.test (e.g. sap.fe.test.ListReport and sap.fe.test.ObjectPage).

Some more context: we execute our opa5 test on the ui5-middleware-fe-mockserver that only loads the libs provided in the framework.libraries. So sap.fe.test sources will no longer be available for the mockserver if removed from framework.libraries.

Is it a bug that sap.fe.test seems to be no longer allowed to be listed in framework.libraries in v3 or am I doing something wrong?

Cheers
Dominik

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 3.0.0
  • Node.js Version: 16.18.0
  • npm Version: 8.19.2
  • OS/Platform: Win 11
  • Browser (if relevant): Chrome 109.0.5414.120
  • Other information regarding your environment (optional): nothing
matz3 commented

Could you please share all of your ui5.yaml configuration? I could not reproduce this by just adding sap.fe.test as a dependency.
A minimal reproducible example would really help us looking into this.

Please also share the build output with --verbose logging enabled.

matz3 commented

This issue seems to appear when a framework dependency such as @sapui5/sap.fe.test is both declared as npm dependency within package.json and as framework library dependency in ui5.yaml.

As mentioned in each README (e.g. https://www.npmjs.com/package/@sapui5/sap.fe.test?activeTab=readme) and on https://sap.github.io/ui5-tooling/stable/pages/SAPUI5/, the OpenUI5 / SAPUI5 libraries should not be installed via package.json but via ui5.yaml.

I'm keeping this open as the error message should be improved.

That makes sense. Thanks for the quick response 👍