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

Remove @Beta: Immutable{BiMap,List,Map,Set}.builderWithExpectedSize #3591

Conversation

michaelxinsun
Copy link

Previously, I modified Dagger so that its generated code is using
builderWithExpectedSize for immutable collections whenever it's
available, i.e., Guava 23.1 or later:
google/dagger#1094

Since builderWithExpectedSize is a @beta API, if a Bazel client
project depends on Dagger, and if the depended Dagger is using
Guava 23.1 or later, Dagger generates code that uses this Guava
@beta API, which fails ErrorProne, thus failing Bazel build:
google/dagger#1569

The same issue could also happen if a Maven client project has a
maven-compiler-plugin that also uses ErrorProne.

If the Guava team feel confident about those
builderWithExpectedSize static factory methods, maybe it's time
to remove @Beta for them altogether.

Happy to discuss. Thank you!

Reference:
https://github.com/google/guava/wiki/PhilosophyExplained#beta-apis

Previously, I modified Dagger so that its generated code is using
`builderWithExpectedSize` for immutable collections whenever it's
available, i.e., Guava 23.1 or later:
google/dagger#1094

Since `builderWithExpectedSize` is a @beta API, if a Bazel client
project depends on Dagger, and if the depended Dagger is using
Guava 23.1 or later, Dagger generates code that uses this Guava
@beta API, which fails ErrorProne, thus failing Bazel build:
google/dagger#1569

The same issue could also happen if a Maven client project has a
`maven-compiler-plugin` that also uses ErrorProne.

If the Guava team feel confident about those
`builderWithExpectedSize` static factory methods, maybe it's time
to remove `@Beta` for them altogether.

Happy to discuss.  Thank you!

Reference:
https://github.com/google/guava/wiki/PhilosophyExplained#beta-apis
@michaelxinsun
Copy link
Author

Hello @ronshapiro ! How's going? Could you take a look at this PR, please? Thank you!

@cpovirk
Copy link
Member

cpovirk commented Oct 2, 2019

Hi, again, Michael! I'll put this on our list of issues to consider when we start our new planning process in the coming month.

@kluever
Copy link
Member

kluever commented Apr 10, 2023

This is now fixed.

@kluever kluever closed this Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes P3 package=collect type=debeta Request to remove something from @Beta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants