Skip to content

Conversation

@d3xter666
Copy link
Contributor

Fixes: UI5/cli#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 ownBuildLogger instance that solves the issue.

@d3xter666 d3xter666 requested a review from a team October 19, 2023 11:17
@coveralls
Copy link

coveralls commented Oct 19, 2023

Coverage Status

coverage: 95.955%. remained the same when pulling 3076e97 on fix-parallel-project-builder-exec into 052c20b on main.

@d3xter666 d3xter666 force-pushed the fix-parallel-project-builder-exec branch from 5bef1b3 to 3076e97 Compare October 19, 2023 13:39
@d3xter666 d3xter666 merged commit f652461 into main Oct 20, 2023
@d3xter666 d3xter666 deleted the fix-parallel-project-builder-exec branch October 20, 2023 08:11
d3xter666 added a commit to UI5/cli that referenced this pull request Sep 25, 2025
…5-project#669)

Fixes: #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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow parallel execution of async graph.build

4 participants