You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should be able to run multiple graph.build in parallel with async functions. This is extremely useful for CAP projects where we have multiple independent UI5 applications.
Current Behavior
Due to several places with global variables we're having conflicts between different executions, e.g. for logs in node_modules/@ui5/project/lib/build/ProjectBuilder.js line 4 or minify task worker pool node_modules/@ui5/builder/lib/processors/minifier.js line 17
UI5 Module Version (output of ui5 --version when using the CLI): 3.6.0
Node.js Version: v20.8.0
yarn Version: 1.22.19
OS/Platform: MacOS
Browser (if relevant): not relevant
Other information regarding your environment (optional): nothing
Log Output / Stack Trace
Error: loggers/Build#endProjectBuild: Unknown project <project_name>
at Build.endProjectBuild (file:///.../node_modules/@ui5/logger/lib/loggers/Build.js:54:10)
at ProjectBuilder.build (file:///.../node_modules/@ui5/project/lib/build/ProjectBuilder.js:245:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ProjectGraph.build (file:///.../node_modules/@ui5/project/lib/graph/ProjectGraph.js:572:3)
at async buildUi (file:///.../build-ui.mjs:194:3)
The text was updated successfully, but these errors were encountered:
Fixes: SAP/ui5-tooling#887
ProjectBuilder was using a singleton of the logger module. Basically,
the logger was constructed only once, during module evaluation, but used
throughout the whole module.
The tricky part is that the `ProjectBuilder`'s logger has this
`setProjects()` method that acts as an allow list of the projects being
built. As the logger used to be a singleton within this module/class and
the async behaviour of the whole module, calling `setProject()` was
polluting the internal `projects` property.
With this fix, every `ProjectBuilder` instance has its own`BuildLogger`
instance that solves the issue.
Expected Behavior
I should be able to run multiple
graph.build
in parallel with async functions. This is extremely useful for CAP projects where we have multiple independent UI5 applications.Current Behavior
Due to several places with global variables we're having conflicts between different executions, e.g. for logs in node_modules/@ui5/project/lib/build/ProjectBuilder.js line 4 or minify task worker pool node_modules/@ui5/builder/lib/processors/minifier.js line 17
Steps to Reproduce the Issue
Where build is
Context
ui5 --version
when using the CLI):3.6.0
v20.8.0
1.22.19
MacOS
not relevant
nothing
Log Output / Stack Trace
The text was updated successfully, but these errors were encountered: