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

[pull] master from google:master #72

Open
wants to merge 779 commits into
base: master
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Nov 23, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Nov 23, 2021
danysantiago and others added 29 commits June 30, 2023 12:25
… deprecated.

With the minimum AGP required to be 7.0 the option is no longer relevant and its code path has been removed.

Also added a bit more documentation to the other options.

RELNOTES=Deprecate the `enableTransformForLocalTests` in the Hilt Android Gradle plugin.
PiperOrigin-RevId: 544721475
This adds supports for SPI Plugins used in KSP to be discoverable during ComponentProcessor's run in the dedicate Dagger compile task when aggregation is turned ON.

RELNOTES=N/A
PiperOrigin-RevId: 544737396
…ule.

RELNOTES=n/a
PiperOrigin-RevId: 544783996
… class name of the annotations on the synthetic property.

This prevents XProcessing from needing to wrap unnecessary annotations in `XAnnotations.equivalence()` which can throw a `TypeNotPresentException` for annotations that have error types in their annotation values.

RELNOTES=N/A
PiperOrigin-RevId: 546089941
RELNOTES=N/A
PiperOrigin-RevId: 546857277
This version of the jar contains the updated kotlinx-metadata-jvm needed to support Kotlin 1.9.

Fixes #3951

RELNOTES=N/A
PiperOrigin-RevId: 547249179
RELNOTES=n/a
PiperOrigin-RevId: 547330693
The flag is off by default but can be enabled by compiling with the following annotation processor options: `-Adagger.ignoreProvisionKeyWildcards=enabled`.

When enabled, Dagger's annotation processor will no longer allow provisioning two bindings that only differ by the types in their wild cards.

See https://dagger.dev/dev-guide/compiler-options#ignore-provision-key-wildcards

RELNOTES=Release `dagger.ignoreProvisionKeyWildcards` flag (See https://dagger.dev/dev-guide/compiler-options#ignore-provision-key-wildcards).
PiperOrigin-RevId: 547560456
RELNOTES=N/A
PiperOrigin-RevId: 548025923
RELNOTES=N/A
PiperOrigin-RevId: 548241407
RELNOTES=N/A
PiperOrigin-RevId: 548753175
This CL fixes an issue in KSP where a `KSType` from a java source may show up as nullable due to an @nullable (TYPE_USE target) annotation. In this case, the annotation actually changes the `KSType` itself (e.g. `@Nullable Foo` becomes `Foo?`), and we ended up treating the type as nullable in Dagger. This CL fixes the issue by ignoring type nullability altogether for java sources since we know that Java sources can't actually declare a nullable type. This matches Dagger's KAPT behavior for these types.

RELNOTES=N/A
PiperOrigin-RevId: 548799879
PiperOrigin-RevId: 548820787
Closes #3913
Fixes #3967

RELNOTES=N/A
PiperOrigin-RevId: 549005035
This CL fixes an issue in KSP where a KSType from a java source may show up as nullable due to an @nullable (TYPE_USE target) annotation. In this case, the annotation actually changes the KSType itself (e.g. @nullable Foo becomes Foo?), and we ended up treating the type as nullable in Dagger. This CL fixes the issue by ignoring type nullability altogether for java sources since we know that Java sources can't actually declare a nullable type. This matches Dagger's KAPT behavior for these types.

RELNOTES=N/A
PiperOrigin-RevId: 549087723
RELNOTES=N/A
PiperOrigin-RevId: 549142634
RELNOTES=N/A
PiperOrigin-RevId: 551097100
This CL fixes an issues in our GitHub Actions where we are consistently going over our cache limit. Typically, we would need to clean out the cache manually at https://github.com/google/dagger/actions/caches. This script automates that process by deleting caches each run.

  - For a PR that is already closed: deletes all corresponding caches.
  - For duplicate caches with the same Git reference and cache key: deletes the older cache.

The script should be idempotent, so I decided to run the script both at the beginning and end of each workflow. This ensure that the caches are cleaned up after a workflow ends, but also that we don't start accumulating unnecessary caches when a workflow fails before the script can be run.

RELNOTES=N/A
PiperOrigin-RevId: 551349636
…ementation details into Dagger internal.

RELNOTES=n/a
PiperOrigin-RevId: 551628363
RELNOTES=N/A
PiperOrigin-RevId: 552540977
RELNOTES=Upgraded Kotlin to 1.9.0, KSP to 1.9.0-1.0.12, Bazel to 6.3.1, and XProcessing jar.
PiperOrigin-RevId: 553246632
…se HiltCompilerTests.

RELNOTES=n/a
PiperOrigin-RevId: 553304510
RELNOTES=N/A
PiperOrigin-RevId: 553458202
…icts with KSP's Gradle plugin.

See #3965

RELNOTES=Add a better error message when Hilt Gradle Plugin class loader conflicts with KSP's Gradle plugin.
PiperOrigin-RevId: 553467242
RELNOTES=N/A
PiperOrigin-RevId: 553491705
RELNOTES=N/A
PiperOrigin-RevId: 553495719
RELNOTES=N/A
PiperOrigin-RevId: 554507627
…h nullable types.

This CL adds an @nullable annotation in the error message when formatting binding methods with nullable types like `Foo?`. This behavior matches KAPT's generated java stubs which will add an `@Nullable` annotation to the stub's method when the return type of the method is a nullable type.

RELNOTES=N/A
PiperOrigin-RevId: 554830004
bcorso and others added 30 commits August 29, 2024 09:21
RELNOTES=N/A
PiperOrigin-RevId: 668962229
PiperOrigin-RevId: 668995662
RELNOTES=n/a
PiperOrigin-RevId: 669014463
We're currently refactoring the resolution logic to avoid things that require lookup of transitive dependencies, like the `BindingType`. Furthermore, for the usages in this CL, we shouldn't actually need the `BindingType` since just using the `BindingKind` should be sufficient.

RELNOTES=N/A
PiperOrigin-RevId: 671438774
Issue #4391

RELNOTES=Fix gwt issue #4391
PiperOrigin-RevId: 671441590
PiperOrigin-RevId: 671862639
…o 1.0.0

Issue #4391.

RELNOTES=n/a
PiperOrigin-RevId: 671909308
This CL moves properties from `Binding` to `BindingDeclaration` such that `BindingDeclaration` now contains all of the properties that can be determined directly from the binding element itself, and `Binding` just contains the `BindingType` information (which requires knowledge of transitive dependencies).

RELNOTES=N/A
PiperOrigin-RevId: 672586235
RELNOTES=N/A
PiperOrigin-RevId: 672655387
This CL bans scoping on `@Binds` methods that delegate to `@Produces` methods. Note that scoping on `@Produces` methods themselves is already banned because production bindings are implicitly scoped.

There's a few benefits to banning this. First, allowing users to arbitrarily add scopes can be misleading because the scopes will just be ignored. Second, this change allows us to clean up places in `BindingFactory` that required knowledge of the `BindingType` (which is something we're currently trying to remove).

RELNOTES=Ban scoping on production bindings.
PiperOrigin-RevId: 673020697
…pendency trace.

We recently added component references to the dependency trace for missing bindings, but that logic is missing for the dependency traces in other validators. This CL moves the logic out of `MissingBindingValidator` and into `DependencyRequestFormatter` so that it can be shared across multiple validators.

RELNOTES=N/A
PiperOrigin-RevId: 673457794
The way we currently calculate the nullability of @BINDS methods is misleading. In particular, the nullability is based on the nullability of the implementation, and we ignore the nullability on the actual method. This CL makes 2 changes:

  1. The nullability of delegate bindings is based on the nullability of the method/return type
  2. The nullability of the delegate method/return type must match the nullability of the method parameter.

RELNOTES=Require @nullable explictly on @BINDS methods.
PiperOrigin-RevId: 673922090
RELNOTES=n/a
PiperOrigin-RevId: 674004016
RELNOTES=Upgrade Kotlin Metadata dependency to 2.0.0-Beta5
PiperOrigin-RevId: 674401703
This CL removes the need for `BindingGraphConverter` and `LegacyBindingGraph` and builds up the network as part of the resolution. Since the `BindingGraphConverter` is now only used by `LegacyBindingGraphFactory` I've renamed it to `LegacyBindingGraphConverter`.

Note: This has been a change we've wanted to make for a while now but hasn't been possible due to the complexity and brittleness of the resolution logic.
RELNOTES=N/A
PiperOrigin-RevId: 675217954
…parate methods for present vs absent.

This change is similar to other refactors which split the `multibinding` method into `multiboundSet` and `multiboundMap`. In general, I think it's better if `BindingFactory` is just responsible for creating the bindings and does not have logic to decide on which binding it should create. This also makes it clearer at the call site which binding we're actually using.

RELNOTES=N/A
PiperOrigin-RevId: 676053984
ResolvedBindings is currently shared by both BindingGraphFactory and LegacyBindingGraphFactory, but future changes to BindingGraphFactory will need to make changes to ResolvedBindings that don't apply to  LegacyBindingGraphFactory so I'm forking this in advance to make the legacy code independent of future changes.

I've also removed the `LegacyBindingGraphConverter.LegacyBindingGraph` interface. This was previously needed since both `BindingGraphFactory` and `LegacyBindingGraphFactory` had their own implementations of this interface, but now that `BindingGraphFactory` no longer uses it the interface is no longer needed.

RELNOTES=N/A
PiperOrigin-RevId: 676123197
This CL adds two tests that repro the issues in b/367426609.

A follow-up CL with fix b/367426609 and fix these tests too.

RELNOTES=N/A
PiperOrigin-RevId: 676511480
…work directly.

This is a follow-up to CL/675217954, which changed `BindingGraphFactory` to build the network during the resolution stage. Now that BindingGraphFactory builds up a network, we can use that network directly in `RequiresResolutionChecker` when calculating whether a particular `BindingNode` needs to be re-resolved in the current component.

This also fixes a bug (b/367426609) that was hiding in the old logic and is now fixed by iterating via the network directly.

RELNOTES=N/A
PiperOrigin-RevId: 676530675
Some of these test cases look correct only because we're not showing the full error message, and showing the full error message shows that there's some things in the error message that should not have been included (e.g. b/360278200).

This CL updates these test cases to ensure we're seeing the full error message. For the incorrect test cases reported in b/360278200, I will fix them in a follow-up CL.

RELNOTES=N/A
PiperOrigin-RevId: 676551280
RELNOTES=N/A
PiperOrigin-RevId: 677901374
This CL fixes the issues in b/360278200, where we were suggesting multibinding contributions and duplicating suggestions from the alternative bindings portion of the error message.

RELNOTES=N/A
PiperOrigin-RevId: 677938702
https://bugs.openjdk.org/browse/JDK-8338678 is fixed in JDK 24, which now gives more information than we had when reporting errors in previous JDKs. This CL updates our Dagger tests to support JDK 24.

RELNOTES=N/A
PiperOrigin-RevId: 678052093
RELNOTES=n/a
PiperOrigin-RevId: 678295107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.