uwolfer / gerrit-rest-java-client

Java REST client for Gerrit Code Review
Apache License 2.0
164 stars 88 forks source link

Bump com.google.truth:truth from 0.44 to 0.46 #220

Closed dependabot[bot] closed 9 months ago

dependabot[bot] commented 9 months ago

Bumps com.google.truth:truth from 0.44 to 0.46.

Release notes

Sourced from com.google.truth:truth's releases.

Truth 0.46

  • Removed deprecated containsAllOf and containsAllIn. Use containsAtLeast and containsAtLeastElementsIn, which are equivalent. (5de3d216)
  • Removed deprecated isOrdered and isStrictlyOrdered. Use isInOrder and isInStrictOrder, which are equivalent. (5de3d216)
  • Removed deprecated SortedMapSubject and SortedSetSubject. Users will have to perform assertions directly on the result of methods like firstKey. We haven't found sufficient demand for the classes to keep them. (057ef315)
  • Removed deprecated ListMultimapSubject, SetMultimapSubject, and ProtoTruth equivalents, which add little to the general Multimap subjects. (057ef315)
  • Removed the type parameters from Subject. If you subclass this type (or declare it as a method return type, etc.), you will have to update those usages at the same time you update Truth. Or you can remove the type parameters from your usages (temporarily introducing rawtypes/unchecked warnings, which you may wish to suppress) and then update Truth (at which point the warnings will go away and you can remove any suppressions). (3740ee65) To remove the type parameters from Subject subclasses, you can get most of the way there with a Perl-compatible regex search-and-replace operation: s/\bSubject<([^<>]*|[^<>]*<[^<>]*>[^<>]*|[^<>]*<[^<>]*>[^<>]*<[^<>]*>[^<>]*|[^<>]*<[^<>]*<[^<>]*>[^<>]*>)>/Subject/g
  • Removed the self-type parameter of ComparableSubject and most of the type parameters of IterableOfProtosSubject, MapWithProtoValuesSubject, and MultimapWithProtoValuesSubject. If you subclass any of those types (or declare them as method return types, etc.), you will have to update those usages at the same time you update Truth. Or you can remove the type parameters from your usages, update Truth, and then add back the remaining type parameters. (e611568b)
  • Removed the type parameters of ProtoSubject and LiteProtoSubject. If you subclass either of those types (or declare them as method return types, etc.), you will have to update those usages at the same time you update Truth. Or you can remove the type parameters from your usages (temporarily introducing rawtypes/unchecked warnings, which you may wish to suppress) and then update Truth (at which point the warnings will go away and you can remove any suppressions). (eb3852c4)
  • Removed deprecated actual(), getSubject(), named(), internalCustomName(), and actualAsString(). To automate most migrations, we've provided StoreActualValueInField and NamedToWithMessage (and a quick-and-dirty regex version for common cases). (If you are migrating manually, you may need to know how to handle java.util.Optional, Stream, and other types that aren't built in.) You might also be interested in our notes from the API Review of this decision. (c1db1b78)
  • Changed ProtoSubject to not extend ProtoFluentAssertion. It still contains all the same methods, except that isEqualTo and isNotEqualTo now require a Message, rather than accept any Object. (777af33d)
  • Deprecated the overload of StandardSubjectBuilder.fail(...) that accepts a message. Instead of assert_().fail(...), use assertWithMessage(...).fail(). Similarly, instead of expect.fail(...), use expect.withMessage(...).fail(), and so forth. (227b559e)
  • Deprecated AtomicLongMapSubject. In most cases, you can assert on the asMap() view instead. (19e1f22c)
  • Deprecated Optional*Subject.hasValueThat(). Instead of assertThat(optional).hasValueThat()...., use assertThat(optional.getAs*())..... (227b559e)
  • Changed assertWithMessage to throw an exception if given format arguments but a null format string. (31e44cc3d2597b90986122853c149d68ea2c5cde)
  • Reimplemented the message-accepting overload of fail(...) in terms of withMessage(...). This is mostly a no-op but can affect behavior in unusual cases. For details, see the commit description. (a52f89b9)
  • Made IterableSubject.isEqualTo produce the same message format as containsExactly. (27a9111c504648ab830929730d6a2b0face5d23d)
  • Introduced TruthFailureSubject.truthFailures() factory for callers that want to test Truth failure messages with expect, assertWithMessage, etc. (c1db1b78)

Truth 0.45

We are pushing hard to release a Truth 1.0 by June 30, after which we don't expect to remove any more APIs. Thanks for your patience with both our slow progress over the past several years and our rapid churn now.

To use the migration tools below, you'll need to set up Error Prone and configure our tools as plugins to run in patch mode.

Deletions:

  • Removed deprecated Subject.isSameAs and isNotSameAs. Use isSameInstanceAs and isNotSameInstanceAs, which are equivalent. (36200e6a)
  • Hid the constuctor of Correspondence. Use the class's static factory methods instead. The most mechanical migration is usually to Correspondence.from. To help with migration, we're released CorrespondenceSubclassToFactoryCall. (11da1ca2)
  • Removed deprecated Subject.fail* methods. See Subject.failWithActual and failWithoutActual, which use the new Fact class. To help with migration, we're released FailWithFacts (and also ImplementAssertionWithChaining, which is also sometimes useful for these migrations), though you will likely need to make manual changes, as well. (36200e6a)
  • Removed deprecated no-arg Subject.check(). Use the overload that accepts a description. (To help with this migration, we have added ProvideDescriptionToCheck to Error Prone -- but then removed it before it became part of a release, so you'll need to pull it in manually.) (36200e6a)
  • Removed deprecated MathUtil. For similar static methods, see Guava's DoubleMath.fuzzyEquals. But callers from custom Subject implementations may prefer an approach like check("score()").that(actual.score()).isWithin(tolerance).of(expected). (7b2876d0)
  • Removed deprecated createAndEnableStackTrace(). Use create(), which now also enables stack traces. (9362f4cb)

Deprecations:

  • Deprecated isOrdered() and isStrictlyOrdered(). Use isInOrder() and isInStrictOrder(), which are equivalent. (146080a5, 386207d5)
  • Deprecated containsAll* on ProtoTruth, *StreamSubject, and Primitive*ArraySubject.*ArrayAsIterable. Use containsAtLeast*, which is equivalent. (82c1f2dc, 386207d5)
  • Deprecated Subject.actual(). Instead of calling it, declare your own field to store the actual value. To automate most migrations, we've provided StoreActualValueInField. (297c0f1e)
  • Deprecated Subject.named. Instead of assertThat(foo).named("foo"), use assertWithMessage("foo").that(foo). For custom subjects, use assertWithMessage("foo").about(foos()).that(foo). For other scenarios, see this FAQ entry about adding messages. To automate most migrations, we've provided NamedToWithMessage (and a quick-and-dirty regex version for common cases). You might be interested in our notes from the API Review of this decision. (08afb24e)
  • "Deprecated" the type parameters on Subject. To prepare for their removal in the next release, you can edit your code today to refer to the raw Subject type. (Kotlin Subject authors, see below.) Also "deprecated" the self-type parameter on ComparableSubject. Again, you can prepare your code by referring to raw ComparableSubject (and later change it to refer to ComparableSubject<T> when the class has only one type parameter next release). Similarly, "deprecated" the type parameters on ProtoSubject and LiteProtoSubject, along with most of the type parameters of IterableOfProtosSubject, MapWithProtoValuesSubject, and MultimapWithProtoValuesSubject. (21c29f77, 5abd9edc)
  • Loosened type parameters on Subject.Factory. This permits custom Subject subclasses extend raw Subject instead of Subject<FooSubject, Foo> to prepare for when we remove the type parameters from Subject entirely.
  • Deprecated DefaultSubject. Use plain Subject. (7b5311b4)
  • Deprecated SortedMapSubject and SortedSetSubject. Users will have to perform assertions directly on the result of methods like firstKey. We haven't found sufficient demand for the classes to keep them. (46aebcf4)
  • Deprecated the SetMultimap-specific and ListMultimap-specific Subjects, which add little to the general Multimap subjects. (2103fee1)
  • Deprecated actualAsString() and internalCustomName(). They exist primarily to support named(), which is being removed. (d69ba29f)

Other migration notes:

  • The order in which you migrate can be important: Migrate off actual() and named() before removing type parameters from custom Subject classes.
  • The tool we'll release for migrating off named requires that custom Subject classes expose a Subject.Factory, as described in our docs about extensions.
  • To remove the type parameters from Subject subclasses, you can get most of the way there with a Perl-compatible regex search-and-replace operation: s/\bSubject<([^<>]*|[^<>]*<[^<>]*>[^<>]*|[^<>]*<[^<>]*>[^<>]*<[^<>]*>[^<>]*|[^<>]*<[^<>]*<[^<>]*>[^<>]*>)>/Subject/g

Features:

  • For very simple tests, failure messages will include a "value of:" line. For example, the failure message of assertThat(fetchLogMessages()).isEmpty() might contain "value of: fetchLogMessages()." This feature is not available under Android or GWT, and it is only available if you have ASM on your classpath.

... (truncated)

Commits


Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | com.google.truth:truth | [>= 1.a, < 2] |

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 9 months ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.