Skip to content

[EB-168] remove the usages of Guava library#169

Merged
liubou-masiuk merged 7 commits intodevelopfrom
feature/EB-168
Apr 13, 2026
Merged

[EB-168] remove the usages of Guava library#169
liubou-masiuk merged 7 commits intodevelopfrom
feature/EB-168

Conversation

@liubou-masiuk
Copy link
Copy Markdown
Collaborator

No description provided.

@liubou-masiuk liubou-masiuk requested a review from Copilot April 6, 2026 11:29
@liubou-masiuk liubou-masiuk self-assigned this Apr 6, 2026
@ci-github-action-bot
Copy link
Copy Markdown

ci-github-action-bot bot commented Apr 6, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@liubou-masiuk
Copy link
Copy Markdown
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

@liubou-masiuk
Copy link
Copy Markdown
Collaborator Author

recheck

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the project’s remaining Guava dependencies/usages by updating build configuration and replacing Guava-based utilities with JDK/Gson equivalents, including introducing an in-house PackageInfoCache to replace the prior Guava Cache usage in package build info caching.

Changes:

  • Removed Guava dependency declarations (root pom.xml, core/pom.xml) and Guava-related documentation in README.md.
  • Replaced Guava utilities with alternatives (Gson TypeToken, Collections.singletonMap).
  • Introduced PackageInfoCache (+ unit tests) to provide TTL + bounded-size caching without Guava.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
README.md Updates module structure description; removes Guava-related “Known issues” section.
pom.xml Removes Guava from dependency management.
core/pom.xml Removes Guava dependency and stops embedding Guava into the bundle.
core/src/main/java/.../BuildPackageServiceImpl.java Switches TypeToken import from Guava to Gson.
core/src/main/java/.../BasePackageServiceImpl.java Replaces Guava Cache initialization with new PackageInfoCache.
core/src/main/java/.../BasePackageService.java Updates cache-related Javadoc after removing Guava.
core/src/main/java/.../PackageEntriesDatasource.java Replaces ImmutableMap.of(...) with Collections.singletonMap(...).
core/src/main/java/.../PackageInfoCache.java Adds custom concurrent bounded TTL cache implementation.
core/src/test/java/.../PackageInfoCacheTest.java Adds tests for the new cache behavior (TTL, max size, iterators, concurrency).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@liubou-masiuk liubou-masiuk marked this pull request as draft April 6, 2026 13:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@liubou-masiuk liubou-masiuk requested a review from smiakchilo April 7, 2026 12:08
@liubou-masiuk liubou-masiuk marked this pull request as ready for review April 7, 2026 12:09
}

private void evictOneEntry() {
Iterator<Map.Entry<String, CacheEntry>> iterator = packageInfos.entrySet().iterator();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we evict not any entry but the oldest one?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We could, but this will introduce some complexity - we don't have something like concurrentLinkedHashMap ootb, so we'll have to track the incertion order manually. We'll have to add more synchronized blocks to basically all main methods. I am just not sure that this is justified, for this case

@liubou-masiuk liubou-masiuk merged commit c8abec7 into develop Apr 13, 2026
3 checks passed
@liubou-masiuk liubou-masiuk deleted the feature/EB-168 branch April 13, 2026 11:11
@ci-github-action-bot ci-github-action-bot bot locked and limited conversation to collaborators Apr 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants