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

Cut down on Checkstyle's dependencies on Guava #3433

Closed
romani opened this Issue Sep 7, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@romani
Member

romani commented Sep 7, 2016

Since now we use Java 1.8, it worth cutting down on Checkstyle's dependencies on Guava library:

  1. Guava's Optional replaced with Java's native.
  2. Guava's Predicate and Iterables should be replaced with Java's Predicate and streams. We cannot do this until we resolve or find workaround for Cobertura report generation problem on Java 1.8. (#3269 (comment), mojohaus/cobertura-maven-plugin#21)
  3. ...

as we go in minimizing of thirdparty dependencies we need to restrict its usage now.

Please create separate PR and move all general allowances of guava usage https://github.com/checkstyle/checkstyle/blob/master/config/import-control.xml#L10 to certain package/class.

As soon as we/you do refactoring to remove some class usage - it should be removed from config too to never let others easily introduce it back.

@romani romani added the approved label Sep 7, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 14, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 14, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 15, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 15, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 15, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 15, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 16, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 16, 2016

Issue #3433: Configure ForbidCertainImports and ImportControl to forb…
…id usage of certain classes from Guava

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 18, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 18, 2016

romani added a commit that referenced this issue Sep 18, 2016

@romani romani added this to the 7.2 milestone Sep 18, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 19, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 19, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 19, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 19, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 19, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 19, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 20, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 20, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 20, 2016

romani added a commit that referenced this issue Sep 21, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 21, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 21, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 21, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 21, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 21, 2016

romani added a commit that referenced this issue Sep 21, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 23, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 23, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 23, 2016

MEZk added a commit to MEZk/checkstyle that referenced this issue Sep 23, 2016

romani added a commit that referenced this issue Sep 27, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 27, 2016

Member

@MEZk , please do a summary of that is left here (we had numerous discussion in different PRs), with links on other issues that block further refactoring.

Member

romani commented Sep 27, 2016

@MEZk , please do a summary of that is left here (we had numerous discussion in different PRs), with links on other issues that block further refactoring.

@MEZk

This comment has been minimized.

Show comment
Hide comment
@MEZk

MEZk Sep 29, 2016

Contributor

@romani

SUMMARY

Part 1:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.collect.Iterables
  2. com.google.common.base.String
  3. com.google.common.base.Function
  4. com.google.common.base.Supplier
  5. com.google.common.base.Charsets
  6. com.google.common.base.MoreObjects
  7. com.google.common.base.Equivalence
  8. com.google.common.base.Preconditions
  9. com.google.common.base.Optional
  10. com.google.common.base.Predicate
  11. com.google.common.io.Files (partially)
  12. com.google.common.io.CharSource
  13. com.google.common.primitives.Ints
  14. com.google.common.annotations.Beta

Part 2:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.common.collect.Queues
  2. com.google.common.collect.Sets
  3. com.google.common.collect.Lists
  4. com.google.common.collect.Maps (parttially)
  5. com.google.common.collect.Iterators

Part 3:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.common.annotations.GwtCompatible
  2. com.google.common.annotations.GwtInCompatible
  3. com.google.common.collect.TreeTraverser
  4. com.google.common.io.Files

Part 4:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.common.collect.ImmutableList
  2. com.google.common.collect.ImmutableSortedSet
  3. com.google.common.collect.ImmutableSet
  4. com.google.common.collect.ImmutableMap
Contributor

MEZk commented Sep 29, 2016

@romani

SUMMARY

Part 1:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.collect.Iterables
  2. com.google.common.base.String
  3. com.google.common.base.Function
  4. com.google.common.base.Supplier
  5. com.google.common.base.Charsets
  6. com.google.common.base.MoreObjects
  7. com.google.common.base.Equivalence
  8. com.google.common.base.Preconditions
  9. com.google.common.base.Optional
  10. com.google.common.base.Predicate
  11. com.google.common.io.Files (partially)
  12. com.google.common.io.CharSource
  13. com.google.common.primitives.Ints
  14. com.google.common.annotations.Beta

Part 2:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.common.collect.Queues
  2. com.google.common.collect.Sets
  3. com.google.common.collect.Lists
  4. com.google.common.collect.Maps (parttially)
  5. com.google.common.collect.Iterators

Part 3:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.common.annotations.GwtCompatible
  2. com.google.common.annotations.GwtInCompatible
  3. com.google.common.collect.TreeTraverser
  4. com.google.common.io.Files

Part 4:
Got rid of the following dependencies and prohibited their usage in code:

  1. com.google.common.collect.ImmutableList
  2. com.google.common.collect.ImmutableSortedSet
  3. com.google.common.collect.ImmutableSet
  4. com.google.common.collect.ImmutableMap
@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 30, 2016

Member

Remaining dependencies will be addressed at #3484

Member

romani commented Sep 30, 2016

Remaining dependencies will be addressed at #3484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment