Skip to content

refactor(project): Remove unused ProjectBuildCache.create factory - #1552

Merged
RandomByte merged 1 commit into
mainfrom
refactor/remove-projectbuildcache-create-factory
Aug 28, 2026
Merged

refactor(project): Remove unused ProjectBuildCache.create factory#1552
RandomByte merged 1 commit into
mainfrom
refactor/remove-projectbuildcache-create-factory

Conversation

@RandomByte

@RandomByte RandomByte commented Aug 27, 2026

Copy link
Copy Markdown
Member

This is a leftover from an earlier refactoring.

ProjectBuildContext.create() constructs the cache with new ProjectBuildCache(...) directly (ProjectBuildContext.js:85). After the async initialization moved out into initSourceIndex(), the static create() factory was reduced to return new ProjectBuildCache(...) and its only remaining callers were the unit tests.

  • Remove the factory and have the tests construct via the constructor.
  • Update the constructor and initSourceIndex doc comments that still referenced create().

ProjectBuildContext.create() constructs the cache with `new
ProjectBuildCache(...)` directly (ProjectBuildContext.js:85). After the
async initialization moved out into initSourceIndex(), the static
create() factory was reduced to `return new ProjectBuildCache(...)` and
its only remaining callers were the unit tests.

Remove the factory and have the tests construct via the constructor.
Update the constructor and initSourceIndex doc comments that still
referenced create().
@RandomByte
RandomByte requested a review from a team August 27, 2026 15:52

@d3xter666 d3xter666 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RandomByte
RandomByte merged commit acdf668 into main Aug 28, 2026
78 checks passed
@RandomByte
RandomByte deleted the refactor/remove-projectbuildcache-create-factory branch August 28, 2026 07:28
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.

2 participants