Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServerEvent: replace Guava predicate and function with STL (refs #2111) #2255

Conversation

tomasbjerre
Copy link
Contributor

These are the last imports of Predicate and Function from Guava. Perhaps they are left for a reason?

References

#2111

Submitter checklist

  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@tomasbjerre tomasbjerre requested a review from a team as a code owner July 10, 2023 14:20
Copy link
Collaborator

@Mahoney Mahoney left a comment

Choose a reason for hiding this comment

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

My understanding is we want to make this breaking change before going out of beta so I'd guess it's oversight, but perhaps @tomakehurst can confirm as NOT_MATCHED and TO_LOGGED_REQUEST are public and fairly widely used.

@oleg-nenashev oleg-nenashev added chore Maintenance breaking Breaking change and removed chore Maintenance labels Jul 11, 2023
@oleg-nenashev oleg-nenashev changed the title chore: replacing Guava predicate and function with STL (refs #2111) ServerEvent: replacing Guava predicate and function with STL (refs #2111) Jul 11, 2023
@oleg-nenashev oleg-nenashev changed the title ServerEvent: replacing Guava predicate and function with STL (refs #2111) ServerEvent: replace Guava predicate and function with STL (refs #2111) Jul 11, 2023
@oleg-nenashev oleg-nenashev added the needs-tom Tom's Train Project :) label Jul 11, 2023
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

I am in favor of doing this change for 3.0. If we want to reduce Guava footprint, removing it from APIs is definitely a right thing to do

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

The proposal from @tomasbjerre is to drop static fields entirely as a part of the change. I will document the new locations afterwards

  public static final Function<ServeEvent, LoggedRequest> TO_LOGGED_REQUEST =
      ServeEvent::getRequest;

  public static final Predicate<ServeEvent> NOT_MATCHED = ServeEvent::isNoExactMatch;

@oleg-nenashev
Copy link
Member

@tomasbjerre WDYT?

@tomasbjerre
Copy link
Contributor Author

If you want me to just remove the fields I can do that.

@oleg-nenashev
Copy link
Member

@tomasbjerre would be great, thanks!

@tomasbjerre tomasbjerre force-pushed the feature/issue-2111-predicate-function branch from 5785aaf to a045b09 Compare July 17, 2023 17:08
@tomasbjerre
Copy link
Contributor Author

@tomasbjerre would be great, thanks!

Fixed

@tomasbjerre tomasbjerre force-pushed the feature/issue-2111-predicate-function branch from a045b09 to e73a46c Compare July 17, 2023 17:18
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

+1 for the new version, will ship it.
Thanks a lot @tomasbjerre !

@oleg-nenashev oleg-nenashev merged commit c279aa3 into wiremock:master Jul 18, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change chore Maintenance needs-tom Tom's Train Project :)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants