Age | Commit message (Collapse) | Author |
|
Original change: https://android-review.googlesource.com/c/platform/external/auto/+/1341935
Change-Id: I21d8a0543fb8b16ae95deb229d6ffdfecdb3e59e
|
|
Original change: https://android-review.googlesource.com/c/platform/external/auto/+/1341934
Change-Id: I8e3eac079e9595bc7dc18b8f9c9d15611085e5aa
|
|
Original change: https://android-review.googlesource.com/c/platform/external/auto/+/1341935
Change-Id: I20f2a6386f31b5976d3d50c07a2da33354efef7e
|
|
Original change: https://android-review.googlesource.com/c/platform/external/auto/+/1341934
Change-Id: Ie00eca9d6c0c2f27708eef678c0e3b9f0bf90321
|
|
Add Android.bp files, stubs for unused annotations, METADATA file
and MODULE_LICENSE_APACHE2 file.
Bug: 158870037
Test: m checkbuild
Change-Id: Ibd9836e10c77c216af8d207c5347645e13cc2e3d
|
|
Merge the parent commit of auto-value-1.7.3 into master. The commit
of the auto-value-1.7.3 tag is not on a branch so not replicated, but
it just sets the version number.
Bug: 158870037
Test: m checkbuild
Change-Id: I1d88f1443d71b630efda822b04355c3b3fb20d59
|
|
|
|
they're https.
The links work even now because they automatically redirect.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=315389274
|
|
RELNOTES=n/a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=315322251
|
|
This happens only if `@AutoValue.CopyAnnotations` is present on the `@AutoValue.Builder` class, using the same logic as for copying annotations from the main `@AutoValue` class.
RELNOTES=Optionally copy annotations from the `@AutoValue.Builder` class to the generated subclass.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=315291023
|
|
Fixes https://github.com/google/auto/issues/849. Closes https://github.com/google/auto/pull/850.
RELNOTES=Drop unnecessary parentheses in AutoAnnotation `equals` and `hashCode` methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=312284275
|
|
undefined return type or parameter type. This avoids problems in certain cases where other annotation processors will generate the currently-undefined type.
Fixes https://github.com/google/auto/issues/847.
RELNOTES=Fixed a problem when an `@AutoValue` class references types that are generated by other annotation processors.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=312172526
|
|
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=311766573
|
|
* A summary fragment is required; consider using the value of the @return block as a summary fragment instead.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=311172889
|
|
Since it is a built-in extension, and since AutoValue itself only describes
itself as isolating if all extensions are, this omission meant that the
presence of AutoValue disabled incremental builds in Gradle.
Add a test to ensure that we don't forget this with future extensions.
Fixes https://github.com/google/auto/issues/844.
RELNOTES=AutoValue is once again "isolating" for Gradle incremental compilation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=310610697
|
|
type.
We also allow the converse, though that's less likely to be useful.
RELNOTES=Allow boxed @AutoValue properties to be set from the corresponding primitive type.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=309320843
|
|
In particular, the use of `onLineContaining` instead of `onLine` makes for much clearer compilation-error tests.
Some tests now assert `.succeededWithoutWarnings()` where previously they just asserted that compilation succeeded. I checked that this change passes on Travis, which historically has discovered warnings that we didn't see locally. It doesn't appear to be necessary to add `-Xlint:-processor` or the like.
Also remove some unneeded `throws Exception` clauses from test methods, and one unused private method in a test.
RELNOTES=n/a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=308672643
|
|
If you have an `@AutoValue` class `Foo` with a property `Bar bar()` and `Foo.Builder` has a method `BarBuilder barBuilder()`, then we previously allowed that, provided we knew how to make a `BarBuilder` (for example by calling `Bar.builder()`). But if, in addition, `Foo` has its own `toBuilder()` method, then we also need to be able to make a `BarBuilder` out of an existing `Bar`, because if you call `Foo.Builder builder = foo1.toBuilder()` then the builder returned by `builder.barBuilder()` must start off with the contents of `foo1.bar()`. Previously we allowed that when `Bar` had a method `BarBuilder toBuilder()`. We also had a special case for Guava classes like `ImmutableList`. `ImmutableList` doesn't have a `toBuilder()` method, but you can make an `ImmutableList.Builder` out of an `ImmutableList` by starting with an empty `ImmutableList.Builder` and calling `addAll(theImmutableList)`. The change here generalizes that special case: it will work if the `BarBuilder` class has a method `addAll` or `putAll` that can accept an argument of type `Bar`. `ImmutableList.Builder<E>` has a method `addAll(Iterable<? extends E>)` and you can pass an `ImmutableList<E>` to that method, so we still accept `ImmutableList.Builder<T> barBuilder()`. But we now also accept any other class that qualifies.
Fixes https://github.com/google/auto/issues/794.
RELNOTES=Generalized the logic for determining if we can make a BarBuilder out of a Bar. For example, if your `@AutoValue` class `Foo` has a property `IntList ints()`, then your builder can have `IntListBuilder intsBuilder()`, where `IntListBuilder` is your own type, and this will work even if there is a `Foo.toBuilder()` method, provided it's possible to call `IntListBuilder.addAll(IntList)`. Previously it worked, but not if there was a `Foo.toBuilder()` because we didn't know how to make `IntListBuilder` out of `IntList`.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=308628522
|
|
The serializable/g3doc build rule wasn't used.
RELNOTES=Add documentation for SerializableAutoValue extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=306863229
|
|
Closes https://github.com/google/auto/pull/831
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=306447364
|
|
RELNOTES=AutoValue now gives a warning if the static builder() method is inside the @AutoValue.Builder class instead of directly in the @AutoValue class.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=304683697
|
|
contains multiple properties with the same type.
RELNOTES=n/a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=304293379
|
|
RELNOTES=Release the SerializableAutoValue extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=304211473
|
|
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=304010271
|
|
(Context: No rush on these reviews. I was just reading through BasicAnnotationProcessor and decided to clean some stuff up.)
Removes some of the duplication between package and type elements in validElements()
RELNOTES=N/A
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=301196168
|
|
correctly.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=300791938
|
|
In Google's internal java8 compilation environment, problems with symbolic links mean that ecj can't find the standard system classes without this workaround. In other environments, including Google's java11, this problem doesn't arise.
RELNOTES=Make OverridesTest work with Google's internal java8 compilation environment.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=300664328
|
|
This CL reduces some of the conversions between Set<ElementName> and Map<String, ? extends Optional<? extends Element>> where it's not needed.
RELNOTES=N/A
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=300565432
|
|
RELNOTES=Added CompileWithEclipseTest, which checks that AutoValue works with ecj, the Eclipse compiler.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=300358646
|
|
Closes https://github.com/google/auto/pull/818.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=300120801
|
|
This CL just does a format fix and applies some error-prone suggestions on BasicAnnotationProcessor.
RELNOTES=N/A
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=299896536
|
|
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=298399922
|
|
It doesn't work there. Apparently ronshapiro@ noticed, as his in-progress Copybara config omits the file.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=298399027
|
|
For example if there's a type mismatch between a property getter and the
corresponding setter in a Builder, we may otherwise end up invoking an extension
with an inconsistent state. Also the generated code is likely to have compile
errors of its own, which distract from the real source of the problem.
Fixes https://github.com/google/auto/issues/809.
RELNOTES=Don't generate code or invoke extensions if AutoValue detects a problem, for example a mismatch between getters and setters.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=294552938
|
|
This allows users of AutoOneOf to not have to manually cast the value.
Before:
@SuppressWarnings("unchecked")
public static <T> MyOneOf<T> empty() {
return (MyOneOf<T>) AutoOneOf_MyOneOf.empty();
}
After:
public static <T> MyOneOf<T> empty() {
return AutoOneOf_MyOneOf.empty();
}
RELNOTES=Add type parameters to factory methods for void AutoOneOf values
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=294216002
|
|
I think this obviates most of the reason to add explicit constructors.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=290029147
|
|
being set is not @Nullable. We will generate code that rejects a null parameter whether or not @Nullable is present, so allowing it is just misleading users of the API.
The mirror situation, where the property is @Nullable but the setter is not, is arguably also incorrect. In that case the generated code does *not* reject a null parameter, even though we might expect it to in the absence of @Nullable on the parameter. However, changing that would surely break a lot of existing code.
Fixes https://github.com/google/auto/issues/777.
RELNOTES=It is now a compilation error if a setter method in a builder has a parameter marked @Nullable when the corresponding property is not in fact @Nullable. This already generated a NullPointerException at runtime.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=289103954
|
|
It no longer provides meaningful functionality, and the Auto projects no longer use it. And of course existing users can continue to reference the releases in Maven Central.
Followup to CL 245779060.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=288955500
|
|
given type, whether casting Object to that type will elicit an "unchecked" warning from the compiler.
RELNOTES=Added MoreTypes.isConversionFromObjectUnchecked to test whether casting to a type will elicit an "unchecked" compiler warning.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=288896286
|
|
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=287824372
|
|
is the type after type-variable substitution. Report this type in error messages, since it may not be obvious.
(See AutoValueNotEclipseTest for an example of the problem this is fixing.)
Fix CompileWithEclipseTest so that it actually does exclude AutoValueNotEclipseTest.java from the compilation, as intended. Move the existing test within that file into AutoValueTest.java, since apparently the Eclipse bug it was provoking has been fixed. Add the test for the bug being fixed here into AutoValueNotEclipseTest.java, because it hits another Eclipse bug.
Fixes https://github.com/google/auto/issues/802.
RELNOTES=Fixed an issue with type checking of setter parameters in the presence of inheritance and generics.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=287580372
|
|
* Constructors and methods with the same name should appear sequentially with no other code in between. Please re-order or re-name methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=286176935
|
|
This was identified as an AI in mini-PM for b/142561228.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=285472669
|
|
superclass constructor and ignoring the parameter. Also make it a constant.
RELNOTES=n/a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=283532121
|
|
Before the change:
public String toString() {
return "OneOfOne{dog=" +
this.dog
+ "}";
}
After the change:
public String toString() {
return "OneOfOne{dog=" + this.dog + "}";
}
(Having to fiddle with spaces like this is perhaps the biggest disadvantage of the current template approach. It would go away if we postprocessed with google-java-format, though the performance overhead of that is probably too great.)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=283507442
|
|
This reapplies 28a2c791575a7e4545293169bea0921b81363a3 after fixing an
internal, fragile test.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=283349599
|
|
redundant because if we reach this point then we've already checked that getResourceAsStream returns non-null for the same resource. But it's a little tricky to trace through the logic to prove that.
Fixes https://github.com/google/auto/issues/796.
RELNOTES=n/a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=283336231
|
|
It is not true that a dependency on the auto-value artifact transitively implies a dependency on auto-value-annotations, so it is not correct to suggest that users can include only the former.
Make it clearer that <plugins> is inside the <build> section.
Use ${auto-value.version} consistently, rather than sometimes that and sometimes ${version}.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=283224151
|
|
*** Reason for rollback ***
breaks internal test
*** Original change description ***
Use CLASS retention for @AutoService
Gradle incremental aggregating processors require all processed annotations to have CLASS retention so that the incremental compiler can substitute a class file for a source file if the file is unchanged. With SOURCE retention, Gradle requires a full rebuild.
See:
https://github.com/google/auto/issues/615
https://docs.gradle.org/6.0.1/userguide/java_plugin.html#aggregating_annotation_processors
https://github.com/gradle/gradle/blob/v6.0.1/subprojects/langua...
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=282462095
|
|
Gradle incremental aggregating processors require all processed annotations to have CLASS retention so that the incremental compiler can substitute a class file for a source file if the file is unchanged. With SOURCE retention, Gradle requires a full rebuild.
See:
https://github.com/google/auto/issues/615
https://docs.gradle.org/6.0.1/userguide/java_plugin.html#aggregating_annotation_processors
https://github.com/gradle/gradle/blob/v6.0.1/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/processing/AggregatingProcessingStrategy.java#L49-L56
RELNOTES=`AutoService`: Use `CLASS` retention to support Gradle aggregating incremental annotation processors
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=282380619
|