-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Commits on Jun 30, 2023
-
Mark
enableTransformForLocalTests
from the Gradle plugin options as…… 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
Configuration menu - View commit details
-
Copy full SHA for b3fd56f - Browse repository at this point
Copy the full SHA b3fd56fView commit details -
Include KSP configurations in hiltJavaCompile task.
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
Configuration menu - View commit details
-
Copy full SHA for cf05eeb - Browse repository at this point
Copy the full SHA cf05eebView commit details
Commits on Jul 1, 2023
-
Update ActivityGeneratorTest to use HiltCompilerTests and GoldenFileR…
…ule. RELNOTES=n/a PiperOrigin-RevId: 544783996
Configuration menu - View commit details
-
Copy full SHA for 4b2bbd1 - Browse repository at this point
Copy the full SHA 4b2bbd1View commit details
Commits on Jul 6, 2023
-
Update
KotlinMetadataUtil
to only dedupe annotations that match the…… 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
Configuration menu - View commit details
-
Copy full SHA for 1420b68 - Browse repository at this point
Copy the full SHA 1420b68View commit details
Commits on Jul 10, 2023
-
Implement isSubsignature() with XProcessing API
RELNOTES=N/A PiperOrigin-RevId: 546857277
Configuration menu - View commit details
-
Copy full SHA for 9fbef13 - Browse repository at this point
Copy the full SHA 9fbef13View commit details
Commits on Jul 11, 2023
-
Update Dagger's XProcessing jars.
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
Configuration menu - View commit details
-
Copy full SHA for ba73556 - Browse repository at this point
Copy the full SHA ba73556View commit details -
Warn about @JvmSuppressWildcards.
RELNOTES=n/a PiperOrigin-RevId: 547330693
Configuration menu - View commit details
-
Copy full SHA for 4ce467b - Browse repository at this point
Copy the full SHA 4ce467bView commit details
Commits on Jul 12, 2023
-
Release
dagger.ignoreProvisionKeyWildcards
flag.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
Configuration menu - View commit details
-
Copy full SHA for 4167803 - Browse repository at this point
Copy the full SHA 4167803View commit details
Commits on Jul 14, 2023
-
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 548025923
Configuration menu - View commit details
-
Copy full SHA for d98303f - Browse repository at this point
Copy the full SHA d98303fView commit details -
Update Dagger's XProcessing jars.
RELNOTES=N/A PiperOrigin-RevId: 548241407
Configuration menu - View commit details
-
Copy full SHA for 9c83c98 - Browse repository at this point
Copy the full SHA 9c83c98View commit details
Commits on Jul 17, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 548753175
Configuration menu - View commit details
-
Copy full SHA for d2e1d25 - Browse repository at this point
Copy the full SHA d2e1d25View commit details -
Fix how Dagger calculates nullability in KSP to match KAPT behavior.
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
Configuration menu - View commit details
-
Copy full SHA for a1a2565 - Browse repository at this point
Copy the full SHA a1a2565View commit details -
PiperOrigin-RevId: 548820787
Configuration menu - View commit details
-
Copy full SHA for 517effd - Browse repository at this point
Copy the full SHA 517effdView commit details
Commits on Jul 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1c4effa - Browse repository at this point
Copy the full SHA 1c4effaView commit details -
Fix how Dagger calculates nullability in KSP to match KAPT behavior.
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
Configuration menu - View commit details
-
Copy full SHA for 1711196 - Browse repository at this point
Copy the full SHA 1711196View commit details -
RELNOTES=N/A PiperOrigin-RevId: 549142634
Configuration menu - View commit details
-
Copy full SHA for a26ee64 - Browse repository at this point
Copy the full SHA a26ee64View commit details
Commits on Jul 26, 2023
-
Update Dagger's XProcessing jars.
RELNOTES=N/A PiperOrigin-RevId: 551097100
Configuration menu - View commit details
-
Copy full SHA for 496e45c - Browse repository at this point
Copy the full SHA 496e45cView commit details -
Add script to automate GitHub Actions cache clean up on each run.
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
Configuration menu - View commit details
-
Copy full SHA for 3e7572a - Browse repository at this point
Copy the full SHA 3e7572aView commit details
Commits on Jul 27, 2023
-
Refactor Dagger spi model types to be able to incrementally move impl…
…ementation details into Dagger internal. RELNOTES=n/a PiperOrigin-RevId: 551628363
Configuration menu - View commit details
-
Copy full SHA for c8ac198 - Browse repository at this point
Copy the full SHA c8ac198View commit details
Commits on Jul 31, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 552540977
Configuration menu - View commit details
-
Copy full SHA for 2067f51 - Browse repository at this point
Copy the full SHA 2067f51View commit details
Commits on Aug 2, 2023
-
Upgrade Kotlin, KSP, Bazel, and XProcessing jars.
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
Configuration menu - View commit details
-
Copy full SHA for 64d54a6 - Browse repository at this point
Copy the full SHA 64d54a6View commit details
Commits on Aug 3, 2023
-
Migrate ViewModelGeneratorTest and ViewModelValidationPluginTest to u…
…se HiltCompilerTests. RELNOTES=n/a PiperOrigin-RevId: 553304510
Configuration menu - View commit details
-
Copy full SHA for 5ed23b8 - Browse repository at this point
Copy the full SHA 5ed23b8View commit details -
Migrate AliasOfProcessorTest to use HiltCompilerTests
RELNOTES=N/A PiperOrigin-RevId: 553458202
Configuration menu - View commit details
-
Copy full SHA for 354d744 - Browse repository at this point
Copy the full SHA 354d744View commit details -
Add a better error message when Hilt Gradle Plugin class loader confl…
…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
Configuration menu - View commit details
-
Copy full SHA for 3f7b9b5 - Browse repository at this point
Copy the full SHA 3f7b9b5View commit details -
Migrate RootFileFormatterTest to use HiltCompilerTests
RELNOTES=N/A PiperOrigin-RevId: 553491705
Configuration menu - View commit details
-
Copy full SHA for 0127cf9 - Browse repository at this point
Copy the full SHA 0127cf9View commit details -
RELNOTES=N/A PiperOrigin-RevId: 553495719
Configuration menu - View commit details
-
Copy full SHA for 4053c2f - Browse repository at this point
Copy the full SHA 4053c2fView commit details -
Migrating AndroidEntryPointProcessorTest to use HiltCompilerTests.
RELNOTES=n/a PiperOrigin-RevId: 553561912
Configuration menu - View commit details
-
Copy full SHA for ea85f71 - Browse repository at this point
Copy the full SHA ea85f71View commit details
Commits on Aug 7, 2023
-
Migrate GeneratorsTest to use HiltCompilerTests
RELNOTES=N/A PiperOrigin-RevId: 554507627
Configuration menu - View commit details
-
Copy full SHA for c1b68d8 - Browse repository at this point
Copy the full SHA c1b68d8View commit details
Commits on Aug 8, 2023
-
Add @nullable annotation in error message when formatting methods wit…
…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
Configuration menu - View commit details
-
Copy full SHA for 506579e - Browse repository at this point
Copy the full SHA 506579eView commit details
Commits on Aug 9, 2023
-
Fix
BindValueMetadata
to properly check visibility on property meth……ods in KSP. This relies on recent support in XProcessing added in aosp/2674117. Before this change we were only correctly finding the property methods in KAPT but missing them in KSP. RELNOTES=N/A PiperOrigin-RevId: 555172373
Configuration menu - View commit details
-
Copy full SHA for 8e4a4b4 - Browse repository at this point
Copy the full SHA 8e4a4b4View commit details
Commits on Aug 10, 2023
-
Fix crash when there are multiple injected constructors
RELNOTES=N/A PiperOrigin-RevId: 555635748
Configuration menu - View commit details
-
Copy full SHA for 698f6cb - Browse repository at this point
Copy the full SHA 698f6cbView commit details
Commits on Aug 14, 2023
-
RELNOTES=n/a PiperOrigin-RevId: 556833204
Configuration menu - View commit details
-
Copy full SHA for 7a613ea - Browse repository at this point
Copy the full SHA 7a613eaView commit details
Commits on Aug 15, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 557094089
Configuration menu - View commit details
-
Copy full SHA for 2fa3195 - Browse repository at this point
Copy the full SHA 2fa3195View commit details -
Require
dagger.ignoreProvisionKeyWildcards=ENABLED
when using KSP.This CL also flips the default for `dagger.ignoreProvisionKeyWildcards` to `ENABLED`. RELNOTES=Require `dagger.ignoreProvisionKeyWildcards=ENABLED` when using KSP and flip the default to `ENABLED`. PiperOrigin-RevId: 557170874
Configuration menu - View commit details
-
Copy full SHA for 6683391 - Browse repository at this point
Copy the full SHA 6683391View commit details -
RELNOTES=n/a PiperOrigin-RevId: 557234097
Configuration menu - View commit details
-
Copy full SHA for cca174b - Browse repository at this point
Copy the full SHA cca174bView commit details
Commits on Aug 16, 2023
-
Allow kotlin source to use java keywords as parameter names in KSP.
Using keywords as parameter names has been working with KAPT because KAPT just renames the parameters to something that is valid Java in the generated Java stubs. However, in order to support this in KSP we need to switch over to use `XExecutableParameterElement#jvmName` rather than `XExecutableParameterElement#name`. This CL also requires updates from XProcessing, so I've updated Dagger's XProcessing jars as well. Fixes #3995: Allow kotlin source to use java keywords as parameter names in KSP RELNOTES=Fixed #3995: Allow kotlin source to use java keywords as parameter names in KSP PiperOrigin-RevId: 557565286
Configuration menu - View commit details
-
Copy full SHA for 2c31d66 - Browse repository at this point
Copy the full SHA 2c31d66View commit details
Commits on Aug 17, 2023
-
Forbid using extension function for @Binds/@provides.
RELNOTES=n/a PiperOrigin-RevId: 557882685
Configuration menu - View commit details
-
Copy full SHA for b37cffd - Browse repository at this point
Copy the full SHA b37cffdView commit details
Commits on Aug 18, 2023
-
Update Dagger/Hilt artifact tests to use kotlin 1.9
RELNOTES=N/A PiperOrigin-RevId: 558176324
Configuration menu - View commit details
-
Copy full SHA for f8334d8 - Browse repository at this point
Copy the full SHA f8334d8View commit details
Commits on Aug 22, 2023
-
Move Dagger spi model types implementation into Dagger internal.
RELNOTES=n/a PiperOrigin-RevId: 559210781
Configuration menu - View commit details
-
Copy full SHA for 8d2385f - Browse repository at this point
Copy the full SHA 8d2385fView commit details
Commits on Aug 23, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 559431563
Configuration menu - View commit details
-
Copy full SHA for c53be9a - Browse repository at this point
Copy the full SHA c53be9aView commit details -
RELNOTES=n/a PiperOrigin-RevId: 559508361
Configuration menu - View commit details
-
Copy full SHA for 278e4ec - Browse repository at this point
Copy the full SHA 278e4ecView commit details -
RELNOTES=n/a PiperOrigin-RevId: 559538248
Configuration menu - View commit details
-
Copy full SHA for b7d97ba - Browse repository at this point
Copy the full SHA b7d97baView commit details -
Rename
#java()
to#javac()
for Dagger SPI model types.This CL also updates the `javac()` and `ksp()` methods to throw if they are used with the wrong backend. RELNOTES=N/A PiperOrigin-RevId: 559565413
Configuration menu - View commit details
-
Copy full SHA for 7107431 - Browse repository at this point
Copy the full SHA 7107431View commit details
Commits on Aug 24, 2023
-
Remove workaround for b/269172737.
The bug in b/269172737 required us to have the scope annotation in a certain order to avoid KSP returning error types. However, it appears this ordering is no longer required with the latest Kotlin 1.9.0 and KSP 1.9.0-1.0.12. RELNOTES=N/A PiperOrigin-RevId: 559898050
Configuration menu - View commit details
-
Copy full SHA for 046baa4 - Browse repository at this point
Copy the full SHA 046baa4View commit details
Commits on Aug 28, 2023
-
RELNOTES=n/a PiperOrigin-RevId: 560849062
Configuration menu - View commit details
-
Copy full SHA for 232e524 - Browse repository at this point
Copy the full SHA 232e524View commit details
Commits on Aug 29, 2023
-
Ban usage of var in Component.
RELNOTES=n/a PiperOrigin-RevId: 560887022
Configuration menu - View commit details
-
Copy full SHA for f5d686d - Browse repository at this point
Copy the full SHA f5d686dView commit details -
Don't run RootProcessingStep#postProcess if no root element was detec…
…ted. RELNOTES=n/a PiperOrigin-RevId: 560887928
Configuration menu - View commit details
-
Copy full SHA for b90b416 - Browse repository at this point
Copy the full SHA b90b416View commit details
Commits on Aug 31, 2023
-
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 561732623
Configuration menu - View commit details
-
Copy full SHA for 651d4ab - Browse repository at this point
Copy the full SHA 651d4abView commit details -
Replace XMethodElements#isDefault with XMethodElement#isJavaDefault
RELNOTES=n/a PiperOrigin-RevId: 561788625
Configuration menu - View commit details
-
Copy full SHA for 7b3e523 - Browse repository at this point
Copy the full SHA 7b3e523View commit details
Commits on Sep 2, 2023
-
Fix issue with using generic types in Dagger's
ClassKey
The issue here was that `AnnotationExpression` was using `XType#getTypeName()` resulting in `GenericType<?>.class` in generated code. This CL fixes the issue by using `XTypeElement#getClassName()` instead so that the generated code results in `GenericType.class` instead. See #4055. Fixes #4055 RELNOTES=Fixes #4055: PiperOrigin-RevId: 562096148
Configuration menu - View commit details
-
Copy full SHA for 9852b42 - Browse repository at this point
Copy the full SHA 9852b42View commit details
Commits on Sep 11, 2023
-
[Refactor] Remove duplicated logic in
BindingGraphFactory
.When searching for multibinding declarations, the key (e.g. `Map<K, Provider<V>>`) has to be unwrapped since the declaration keys have the form `Map<K, V>`. This CL consolidates the logic into a single function so that we only have to document these details once. RELNOTES=N/A PiperOrigin-RevId: 564374943
Configuration menu - View commit details
-
Copy full SHA for 47953aa - Browse repository at this point
Copy the full SHA 47953aaView commit details -
Fix Lint crash with AGP 8.1.0. See https://github.com/google/dagger/p…
…ull/4023/files#r1308159525 for details. Fixes #3980. RELNOTES=Fixes #3980. PiperOrigin-RevId: 564502143
Configuration menu - View commit details
-
Copy full SHA for e651294 - Browse repository at this point
Copy the full SHA e651294View commit details -
Rollback of "[Refactor] Remove duplicated logic in `BindingGraphFacto…
…ry`" PiperOrigin-RevId: 564526719
Configuration menu - View commit details
-
Copy full SHA for 76bde06 - Browse repository at this point
Copy the full SHA 76bde06View commit details
Commits on Sep 25, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 568310453
Configuration menu - View commit details
-
Copy full SHA for 7412301 - Browse repository at this point
Copy the full SHA 7412301View commit details -
Drop latest XProcessing jars into Dagger.
RELNOTES=N/A PiperOrigin-RevId: 568345537
Configuration menu - View commit details
-
Copy full SHA for e8f5f2b - Browse repository at this point
Copy the full SHA e8f5f2bView commit details
Commits on Sep 27, 2023
-
[Refactor]: This CL refactors a few things in
ComponentDescriptor
.* Moves `abstract` methods in `ComponentDescriptor` to the top of the class so that it's easier to tell which methods contributes to the AutoValue equals/hashcode. * Moves `ComponentDescriptorFactory` directly to a nested class, `ComponentDescriptor.Factory`, to be more consistent with how structure other descriptors like `ModuleDescriptor`/`ModuleDescriptor.Factory`. * Moves `CancellationPolicy` class definition out of `ComponentDescriptor` since it's not directly related to that class. RELNOTES=N/A PiperOrigin-RevId: 568890232
Configuration menu - View commit details
-
Copy full SHA for 5cc209c - Browse repository at this point
Copy the full SHA 5cc209cView commit details
Commits on Sep 29, 2023
-
Fix Dagger's incremental processing for KSP.
This change should be temporary until we can get a more robust fix in KSP (google/ksp#1555). Fixes #4063 Fixes #4054 RELNOTES=N/A PiperOrigin-RevId: 569608460
Configuration menu - View commit details
-
Copy full SHA for 558cc51 - Browse repository at this point
Copy the full SHA 558cc51View commit details
Commits on Sep 30, 2023
-
Allow sharding for Dagger compiler tests.
Recently, some of our tests have started timing out on GitHub Actions (https://github.com/google/dagger/actions/runs/6355090490/job/17262572158?pr=4082): ``` //javatests/dagger/internal/codegen:ComponentProcessorTest TIMEOUT in 315.2s ``` This CL adds the ability to shard some of our large and medium sized tests. RELNOTES=N/A PiperOrigin-RevId: 569752153
Configuration menu - View commit details
-
Copy full SHA for fd907cb - Browse repository at this point
Copy the full SHA fd907cbView commit details
Commits on Oct 2, 2023
-
Refactor ResolvedBindings and LegacyBindingGraph to include the Compo…
…nentPath. Including the ComponentPath in ResolvedBindings avoids having to create new objects of type ResolvedBindingsWithPath to satisfy our Map key. In addition, passing the ComponentPath while creating LegacyBindingGraph avoids having to recreate it from scratch during BindingGraphConverter phase. RELNOTES=N/A PiperOrigin-RevId: 570137117
Configuration menu - View commit details
-
Copy full SHA for 378535e - Browse repository at this point
Copy the full SHA 378535eView commit details
Commits on Oct 4, 2023
-
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 570790118
Configuration menu - View commit details
-
Copy full SHA for 7173b40 - Browse repository at this point
Copy the full SHA 7173b40View commit details -
Refactor BindingGraphConverter.
This CL inlines some functions that are only used at a single call-site and are essentially 1-liners. RELNOTES=N/A PiperOrigin-RevId: 570810185
Configuration menu - View commit details
-
Copy full SHA for 6120dd1 - Browse repository at this point
Copy the full SHA 6120dd1View commit details
Commits on Oct 6, 2023
-
Consolidate logic for whether we generate MembersInjector in one place.
The logic for whether we generate a MembersInjector was duplicated in `InjectBindingRegistryImpl` and `MembersInjectorGenerator`. In particular, there are cases where `InjectBindingRegistryImpl` decided that a MembersInjector should be generated, but additional logic in `MembersInjectorGenerator` overrides that decision and decides not to generate the MembersInjector (e.g. if the class has no local injection sites). This led to duplicating of logic in `InjectBindingRegistryImpl` when we're trying to decide if we should output a warning for the case where a MembersInjector should be generated in an upstream library because we needed to repeat the logic in `MembersInjectorGenerator` to know if the MembersInjector will actually be generated. This CL moves the decision on whether to generate a MembersInjector completely into `InjectBindingRegistryImpl`, which removes the duplicated logic and also makes it easier to understand when the MembersInjector will actually be generated since we only need to look in one location. This CL also removes `warnIfNotAlreadyGenerated` since `isCalledFromInjectProcessor` contains all the information we need to decide whether to warn in this case. RELNOTES=N/A PiperOrigin-RevId: 571421631
Configuration menu - View commit details
-
Copy full SHA for 774bee1 - Browse repository at this point
Copy the full SHA 774bee1View commit details
Commits on Oct 10, 2023
-
Add AssistedInject to Hilt ViewModel.
RELNOTES=Add support for using `@AssistedInject` with `@HiltViewModel`. PiperOrigin-RevId: 572216305
Configuration menu - View commit details
-
Copy full SHA for 8327177 - Browse repository at this point
Copy the full SHA 8327177View commit details -
Rename model method from
java()
tojavac()
.RELNOTES=N/A PiperOrigin-RevId: 572362454
Configuration menu - View commit details
-
Copy full SHA for 3c8d28c - Browse repository at this point
Copy the full SHA 3c8d28cView commit details
Commits on Oct 11, 2023
-
Replace XElements.isFromJavaSource() and XElements.isFromKotlinSource…
…() with the version in XProcessing This also fixes a Github issue where we use `XConverters.toKS()` to get the underlying KSAnnotated and its origin but it doesn't work for synthetic elements like SyntheticExecutableParameterElement. The XProcessing version fixes this by 1. Making these functions member functions of XMemberContainer so that we can skip the implementation in most element types and we can't miss any XMemberContainer subtypes. 2. Simply consider that the member container is from Kotlin if it's KspFileMemberContainer or KspSyntheticFileMemberContainer as these are generated from Kotlin top-level properties. RELNOTES=N/A PiperOrigin-RevId: 572595483
Configuration menu - View commit details
-
Copy full SHA for 4593c0a - Browse repository at this point
Copy the full SHA 4593c0aView commit details
Commits on Oct 12, 2023
-
Add check to prevent injecting assisted factories for HiltViewModels
RELNOTES=Add check to prevent injecting assisted factories for HiltViewModels PiperOrigin-RevId: 572901826
Configuration menu - View commit details
-
Copy full SHA for 740a7c6 - Browse repository at this point
Copy the full SHA 740a7c6View commit details
Commits on Oct 16, 2023
-
[Refactor]: Move
FrameworkInstanceSupplier
logic directly into `Pro……viderInstanceRequestRepresentation`. In this case there's no need to pass in the `FrameworkInstanceSupplier` as an assisted parameter since we can derive it directly in `ProviderInstanceRequestRepresentation` using other injected objects. RELNOTES=N/A PiperOrigin-RevId: 573928235
Configuration menu - View commit details
-
Copy full SHA for d7dd656 - Browse repository at this point
Copy the full SHA d7dd656View commit details
Commits on Oct 17, 2023
-
Remove caching of
@AssistedInject
bindings to work around b/305748522.This is a short-term fix for b/305748522 so that we can push through our other fix for b/302199325. The long-term fix is outlined in the b/305748522 but probably requires more design discussion. RELNOTES=N/A PiperOrigin-RevId: 574226829
Configuration menu - View commit details
-
Copy full SHA for f6ddcc3 - Browse repository at this point
Copy the full SHA f6ddcc3View commit details
Commits on Oct 18, 2023
-
Update Dagger's XProcessing jars.
RELNOTES=N/A PiperOrigin-RevId: 574510675
Configuration menu - View commit details
-
Copy full SHA for fb5ce89 - Browse repository at this point
Copy the full SHA fb5ce89View commit details
Commits on Oct 23, 2023
-
Update Dagger's XProcessing jars.
RELNOTES=N/A PiperOrigin-RevId: 575765188
Configuration menu - View commit details
-
Copy full SHA for 8129a91 - Browse repository at this point
Copy the full SHA 8129a91View commit details
Commits on Oct 24, 2023
-
Remove dependency of XProcessing, and changed shaded package name to …
…use `internal`. RELNOTES=n/a PiperOrigin-RevId: 576313767
Configuration menu - View commit details
-
Copy full SHA for 1fa299e - Browse repository at this point
Copy the full SHA 1fa299eView commit details
Commits on Oct 25, 2023
-
Add a fix for
LocalDependencyChecker#dependsOnLocalBindings
and a f……lag to enable it. RELNOTES=Fixes an issue where bindings that depend on local bindings were not properly re-resolved in a component when some of its' transitive dependencies contain a cycle. PiperOrigin-RevId: 576542469
Configuration menu - View commit details
-
Copy full SHA for fe29f87 - Browse repository at this point
Copy the full SHA fe29f87View commit details -
Rollback fix for
LocalDependencyChecker#dependsOnLocalBindings
and ……a flag to enable it. RELNOTES=N/A PiperOrigin-RevId: 576615427
Configuration menu - View commit details
-
Copy full SHA for 877a2df - Browse repository at this point
Copy the full SHA 877a2dfView commit details
Commits on Oct 26, 2023
-
Remove producer dependency from Dagger's compiler.
There's no technical reason for Dagger's compiler to depend on Dagger Producers. In all of these cases we were pulling in producers just for either the class name or javadoc. RELNOTES=N/A PiperOrigin-RevId: 577017144
Configuration menu - View commit details
-
Copy full SHA for 05f2b70 - Browse repository at this point
Copy the full SHA 05f2b70View commit details
Commits on Oct 30, 2023
-
Add helper function CreationExtras.withCreationCallback() and Mutable…
…CreationExtras.addCreationCallback() These can be used to pass creation callbacks with functions like `viewModels()`. RELNOTES=Add helper function CreationExtras.withCreationCallback() and MutableCreationExtras.addCreationCallback() PiperOrigin-RevId: 577890589
Configuration menu - View commit details
-
Copy full SHA for 6fe4a23 - Browse repository at this point
Copy the full SHA 6fe4a23View commit details -
Provide
SavedStateHandle
binding fromActivityRetainedComponent
.RELNOTES=n/a PiperOrigin-RevId: 577983612
Configuration menu - View commit details
-
Copy full SHA for 1cac33b - Browse repository at this point
Copy the full SHA 1cac33bView commit details
Commits on Oct 31, 2023
-
Rollforward fix for
LocalDependencyChecker#dependsOnLocalBindings
a……nd a flag to enable it. RELNOTES=Rollforward fix for `LocalDependencyChecker#dependsOnLocalBindings` and a flag to enable it. PiperOrigin-RevId: 578245756
Configuration menu - View commit details
-
Copy full SHA for 871eda7 - Browse repository at this point
Copy the full SHA 871eda7View commit details -
Fix a memory performance issue when creating Dagger's BindingGraph.
This CL fixes an issues where each subcomponent was storing its complete list of accessible bindings, which includes any bindings it needs from its ancestor components. This ends up requiring much more space than actually required if we just store the bindings owned by the subcomponent and delegate to the parent component for any bindings accessible there. I think this can likely be done for our `LegacyBindingGraph` classes as well, but I'll save that for another CL. RELNOTES=N/A PiperOrigin-RevId: 578306878
Configuration menu - View commit details
-
Copy full SHA for d9d0a8e - Browse repository at this point
Copy the full SHA d9d0a8eView commit details
Commits on Nov 1, 2023
-
Removes unused (
@Deprecated
) module setter methods that contain onl……y `static`/`abstract` binding methods. Note that this doesn't remove all of the deprecated setter methods. In particular, this CL removes setter methods only for the case where a module instance is never needed because it contains only `static` and `abstract` methods. However, this CL does not remove the deprecated setter methods in the general case where a module instance is not needed because it is unused in the component. That case is a bit trickier because it depends on the usage of the bindings rather than properties of the module itself. RELNOTES=Potentially breaking change. Dagger no longer generates module setter methods for modules that have only static/abstract methods. These methods were previously marked as deprecated, as the module instances passed in aren't actually used by the Dagger component. PiperOrigin-RevId: 578651221
Configuration menu - View commit details
-
Copy full SHA for ed47d4b - Browse repository at this point
Copy the full SHA ed47d4bView commit details
Commits on Nov 2, 2023
-
Add a test observing r8 behavior with HiltViewModel.
RELNOTES=n/a PiperOrigin-RevId: 578956204
Configuration menu - View commit details
-
Copy full SHA for 8801fd2 - Browse repository at this point
Copy the full SHA 8801fd2View commit details
Commits on Nov 3, 2023
-
Fix FileNotFoundException in AGP 8.3
RELNOTES=N/A PiperOrigin-RevId: 579237165
Configuration menu - View commit details
-
Copy full SHA for 6018cd2 - Browse repository at this point
Copy the full SHA 6018cd2View commit details
Commits on Nov 6, 2023
-
Move "Bazel Test" GitHub action to a large runner.
"Bazel Test" has been the bottleneck of our builds for a while now. A large part of that is due to the default GitHub runner only having 2 cores and thus only being able to run at most 2 Bazel actions at a time. Things have also gotten worse due to the increasing number of tests in Dagger's codebase and the slowing down of tests due to the move to XProcessing Testing and possibly increased I/O due to golden files, though these issues aren't addressed in this CL. This CL moves our "Bazel Test" GitHub actions onto the large test runner. This runner now has 16 cores which should allow 8x more tests to run in parallel and we should see a similar improvement in the time it takes these GitHub actions to run. RELNOTES=N/A PiperOrigin-RevId: 579881816
Configuration menu - View commit details
-
Copy full SHA for 221fc86 - Browse repository at this point
Copy the full SHA 221fc86View commit details -
Update Dagger's XProcessing jars.
RELNOTES=n/a PiperOrigin-RevId: 579923643
Configuration menu - View commit details
-
Copy full SHA for 0323371 - Browse repository at this point
Copy the full SHA 0323371View commit details
Commits on Nov 7, 2023
-
Make
Nullability#nullableAnnotations
return a set ofClassName
s i……nstead of `XAnnotation`s All uses of this API immediately convert to `ClassName`, and this makes it easier to deduplicate the returned set. RELNOTES=N/A PiperOrigin-RevId: 580220708
Configuration menu - View commit details
-
Copy full SHA for 6278d31 - Browse repository at this point
Copy the full SHA 6278d31View commit details
Commits on Nov 13, 2023
-
Change onReceive marker from field to annotation and read it with AGP…
…'s ClassContext RELNOTES=N/A PiperOrigin-RevId: 582018651
Configuration menu - View commit details
-
Copy full SHA for f946e34 - Browse repository at this point
Copy the full SHA f946e34View commit details -
RELNOTES=n/a PiperOrigin-RevId: 582028428
Configuration menu - View commit details
-
Copy full SHA for e42fa2c - Browse repository at this point
Copy the full SHA e42fa2cView commit details
Commits on Nov 14, 2023
-
Rollback fix for
LocalDependencyChecker#dependsOnLocalBindings
as i……t contains a performance regression. PiperOrigin-RevId: 582400758
Configuration menu - View commit details
-
Copy full SHA for 0e68875 - Browse repository at this point
Copy the full SHA 0e68875View commit details
Commits on Nov 16, 2023
-
Support TYPE_USE @nullable annotations in Dagger.
When targeting Java 1.8+, TYPE_USE annotations annotate the return type of methods, not the method itself. Similarly, they annotate the type of a parameter, not the parameter itself. ConfigurationAnnotations now checks the method, the return type of methods, and the type of all elements for a Nullable annotation. RELNOTES=Adds support for TYPE_USE @nullable annotations. In rare cases this could be a breaking change originating from the NullableBindingValidation plugin. This could happen if an undetected TYPE_USE @nullable is used on a module provides method, but @nullable is not used at injection sites. PiperOrigin-RevId: 583048123
Configuration menu - View commit details
-
Copy full SHA for 2b4346a - Browse repository at this point
Copy the full SHA 2b4346aView commit details -
Fix HiltGradlePlugin not working in KMP's androidMain directory
RELNOTES=N/A PiperOrigin-RevId: 583124622
Configuration menu - View commit details
-
Copy full SHA for f0c2510 - Browse repository at this point
Copy the full SHA f0c2510View commit details -
[Dagger Optimization]: Avoid copying bindings for each parent compone…
…nt when creating our `BindingGraph`. This CL replaces `LegacyBindingGraph` with a new class `BindingGraphFactory.LegacyBindingGraph` which is nested in `BindingGraphFactory` so that it can delegate directly to its `BindingGraphFactory.Resolver`. This allows us to just reuse the resolver under the hood and to implement it in a way that avoids copying all parent bindings into a giant `Map<Key, ResolvedBindings>`. Instead, the resolver can first look up in its own `resolvedContributionBindings` map and just delegate to its parent if the key doesn't exist. This can save quite a bit of resources for cases where a project has many small subcomponents branched from a larger component since each small subcomponent doesn't have to copy over all of the bindings from the larger component into its own `Map<Key, ResolvedBindings>`. Note: This is a similar optimization to CL/578306878. RELNOTES=N/A PiperOrigin-RevId: 583124976
Configuration menu - View commit details
-
Copy full SHA for 85e9ff1 - Browse repository at this point
Copy the full SHA 85e9ff1View commit details -
Temporary fix for comparing equality of wildcard types in Dagger Andr…
…oid. RELNOTES=n/a PiperOrigin-RevId: 583187249
Configuration menu - View commit details
-
Copy full SHA for 244b171 - Browse repository at this point
Copy the full SHA 244b171View commit details
Commits on Nov 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for afc33bf - Browse repository at this point
Copy the full SHA afc33bfView commit details
Commits on Nov 20, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 584100389
Configuration menu - View commit details
-
Copy full SHA for 75a3a0a - Browse repository at this point
Copy the full SHA 75a3a0aView commit details
Commits on Nov 21, 2023
-
Add gradle test for Dagger Android Ksp
RELNOTES=n/a PiperOrigin-RevId: 584175632
Configuration menu - View commit details
-
Copy full SHA for 95f2afb - Browse repository at this point
Copy the full SHA 95f2afbView commit details
Commits on Nov 22, 2023
-
Update ASM to 9.6 to support newer Java versions
Update ASM from 9.0 to 9.6, the latest version. According to https://asm.ow2.io/versions.html, this version should work with Java up to 22. For testing, I tried a sample project using Gradle's `jvmToolchain`: ``` kotlin { jvmToolchain(20) } ``` And installed different versions of OpenJDK separately. It works with OpenJDK 19 and 20.0.2, but not 21.0.1, the latest stable version (https://jdk.java.net/archive/). Here's the error message: ``` * What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. > Could not resolve all files for configuration ':app:androidJdkImage'. > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}. > Execution failed for JdkImageTransform: /usr/local/google/home/kuanyingchou/Android/Sdk/platforms/android-34/core-for-system-modules.jar. > Error while executing process /usr/local/google/home/kuanyingchou/downloads/jdk-21.0.1/bin/jlink with arguments {--module-path /usr/local/google/home/kuanyingchou/.gradle/caches/transforms-3/b52ba5074efe1b01da421b426c4b2680/transformed/output/temp/jmod --add-modules java.base --output /usr/local/google/home/kuanyingchou/.gradle/caches/transforms-3/b52ba5074efe1b01da421b426c4b2680/transformed/output/jdkImage --disable-plugin system-modules} ``` It could be that AGP doesn't yet support JDK 21. From Gradle's release note (https://docs.gradle.org/8.4/release-notes.html), it seems that Kotiln doesn't support JDK 21 either: ``` Currently, you cannot run Gradle on Java 21 because Kotlin lacks support for JDK 21. However, support for running Gradle with Java 21 is expected in future versions. ``` So the highest JDK version Hilt Gradle Plugin supports after this CL should be 20. RELNOTES=N/A PiperOrigin-RevId: 584641218
Configuration menu - View commit details
-
Copy full SHA for 4c75892 - Browse repository at this point
Copy the full SHA 4c75892View commit details -
RELNOTES=Internal change. PiperOrigin-RevId: 584688332
Configuration menu - View commit details
-
Copy full SHA for 7121b67 - Browse repository at this point
Copy the full SHA 7121b67View commit details
Commits on Nov 27, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 585693139
Configuration menu - View commit details
-
Copy full SHA for 0896fbe - Browse repository at this point
Copy the full SHA 0896fbeView commit details
Commits on Nov 29, 2023
-
Increase time out for Android Emulator Test on API 30.
RELNOTES=n/a PiperOrigin-RevId: 586383007
Configuration menu - View commit details
-
Copy full SHA for 4dcebb5 - Browse repository at this point
Copy the full SHA 4dcebb5View commit details -
make ActivityRetainedSaveState an opt-in API.
RELNOTES=n/a PiperOrigin-RevId: 586393130
Configuration menu - View commit details
-
Copy full SHA for cd70dea - Browse repository at this point
Copy the full SHA cd70deaView commit details -
Upgrade Dagger's dependencies of kotlin to
1.9.20
and ksp to `1.9.2……0-1.0.14`. This should bring in a number of fixes in KSP, especially related to incremental processing. Fixes #4060 RELNOTES=Upgrade Dagger's dependencies of kotlin to `1.9.20` and ksp to `1.9.20-1.0.14`. PiperOrigin-RevId: 586435985
Configuration menu - View commit details
-
Copy full SHA for 692015f - Browse repository at this point
Copy the full SHA 692015fView commit details -
Update release script to include changes to `artifact-android-local-t…
…ests`. These changes were added to the continuous integration (presubmit) script but we forgot to propagate it to the release script. RELNOTES=N/A PiperOrigin-RevId: 586459523
Configuration menu - View commit details
-
Copy full SHA for e0b9b8e - Browse repository at this point
Copy the full SHA e0b9b8eView commit details
Commits on Nov 30, 2023
-
Update annotation-experimental dependency to latest version.
RELNOTES=n/a PiperOrigin-RevId: 586804123
Configuration menu - View commit details
-
Copy full SHA for b074037 - Browse repository at this point
Copy the full SHA b074037View commit details
Commits on Dec 1, 2023
-
Update Dagger's GitHub Actions to move the remaining emulator test to…
… run in post-submit only. The emulator tests have become more flaky recently and are also one of our slowest jobs in GitHub Actions. It should be fairly safe to move these to post-submit given our other non-emulator test coverage. This CL also updates the release script to use the large-runner. This should be negligible to the overall cost since releases are done so infrequently compared to presubmits. RELNOTES=N/A PiperOrigin-RevId: 587014286
Configuration menu - View commit details
-
Copy full SHA for a6e65fa - Browse repository at this point
Copy the full SHA a6e65faView commit details -
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 587109243
Configuration menu - View commit details
-
Copy full SHA for 344e135 - Browse repository at this point
Copy the full SHA 344e135View commit details
Commits on Dec 6, 2023
-
Update hjar generators to output valid method bodies for methods and …
…constructors. This CL updates Dagger's hjar generators to have valid return statements for methods with non-`void` return types and valid super calls for constructors. For example: ``` // Example of hjar generated class with valid constructor and method bodies. class Foo extends FooSuper { Foo() { super(null, 0, null); } String stringMethod() { return null; } int intMethod() { return 0; } } ``` Note that this isn't required when compiling with Turbine, but is necessary when compiling the Hjar stubs in Javac. RELNOTES=N/A PiperOrigin-RevId: 588456719
Configuration menu - View commit details
-
Copy full SHA for 668269d - Browse repository at this point
Copy the full SHA 668269dView commit details -
Add a dagger.internal.Provider in order to in the future help with ad…
…ding support for jakarta.inject.Provider. RELNOTES=Unavoidable breaking change for AssistedInject factories built at a previous version PiperOrigin-RevId: 588500546
Configuration menu - View commit details
-
Copy full SHA for 75d3cbc - Browse repository at this point
Copy the full SHA 75d3cbcView commit details -
Configure Bazel and Gradle to avoid spurious flakes.
This CL updates the global `bazelrc` file to enable `--incompatible_sandbox_hermetic_tmp` to avoid tmp file collision issues between actions. This CL also updates the `gradle.properties` to give more memory to avoid Java Heap OOM issues. RELNOTES=N/A PiperOrigin-RevId: 588547788
Configuration menu - View commit details
-
Copy full SHA for eb9a034 - Browse repository at this point
Copy the full SHA eb9a034View commit details
Commits on Dec 7, 2023
-
RELNOTES=N/A PiperOrigin-RevId: 588861836
Configuration menu - View commit details
-
Copy full SHA for f4b4519 - Browse repository at this point
Copy the full SHA f4b4519View commit details -
Make
minSdk
andtargetSdk
versions consistent across Gradle tests.The `minSdk` is set to `16` since we test some of our artifacts on API 16. RELNOTES=N/A PiperOrigin-RevId: 588910365
Configuration menu - View commit details
-
Copy full SHA for 45d3b87 - Browse repository at this point
Copy the full SHA 45d3b87View commit details -
Increase timeout for emulator tests from 25min to 35min in CI.
RELNOTES=N/A PiperOrigin-RevId: 588931824
Configuration menu - View commit details
-
Copy full SHA for 45af1ed - Browse repository at this point
Copy the full SHA 45af1edView commit details
Commits on Dec 12, 2023
-
Optimize
InjectionSiteFactory#getInjectionSites()
.RELNOTES=N/A PiperOrigin-RevId: 590323796
Configuration menu - View commit details
-
Copy full SHA for 5f8b76c - Browse repository at this point
Copy the full SHA 5f8b76cView commit details
Commits on Dec 14, 2023
-
RELNOTES=n/a PiperOrigin-RevId: 591015561
Configuration menu - View commit details
-
Copy full SHA for 13d64c6 - Browse repository at this point
Copy the full SHA 13d64c6View commit details -
Flip the default for explicitBindingConflictsWithInject to enabled.
RELNOTES=Flip the default for explicitBindingConflictsWithInject to enabled. PiperOrigin-RevId: 591064440
Configuration menu - View commit details
-
Copy full SHA for 8372c63 - Browse repository at this point
Copy the full SHA 8372c63View commit details
Commits on Dec 15, 2023
-
Dagger build performance optimizations.
This CL: 1. Adds state to keep track of any generated monitoring modules that Dagger generates, and uses this state to eagerly defer processing of components to the next round. This is useful to avoid doing work in the current round which will likely end up getting deferred anyway due to referencing the monitoring module. 2. Adds a cache for ComponentDescriptors similar to our caches for other descriptors to avoid recomputing these descriptors. RELNOTES=N/A PiperOrigin-RevId: 591092232
Configuration menu - View commit details
-
Copy full SHA for be77d24 - Browse repository at this point
Copy the full SHA be77d24View commit details
Commits on Dec 18, 2023
-
Fix error message for an
@Binds @IntoSet
implementation with duplic……ate bindings. This CL fixes a case where an `@Binds @IntoSet` that delegates to an implementation with duplicate bindings was throwing an `IllegalArgumentException` rather than reporting an error properly. An example of the problematic code is shown below: ```java @module interface FooModule { @BINDS @IntoSet Foo bindFoo(FooImpl impl); @provides static FooImpl provideFooImpl1() { ... } @provides static FooImpl provideFooImpl2() { ... } } ``` The above code now reports the duplicate binding rather than throwing an `IllegalArgumentException`. RELNOTES=Fixed error message for an `@Binds @IntoSet` implementation with duplicate bindings. PiperOrigin-RevId: 591976664
Configuration menu - View commit details
-
Copy full SHA for 8d01223 - Browse repository at this point
Copy the full SHA 8d01223View commit details
Commits on Dec 19, 2023
-
DisableCachingByDefault for CopyTransform
The CopyTransform is simply copying files and does not benefit from caching. It is faster to re-execute the transform. Closes #4194 RELNOTES=N/A PiperOrigin-RevId: 592308544
Configuration menu - View commit details
-
Copy full SHA for 958fabb - Browse repository at this point
Copy the full SHA 958fabbView commit details
Commits on Dec 20, 2023
-
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 592408487
Configuration menu - View commit details
-
Copy full SHA for fca20a0 - Browse repository at this point
Copy the full SHA fca20a0View commit details
Commits on Dec 27, 2023
-
Minor clean up in BindingGraphFactory.
* We no longer need to wrap the call to get the generated MonitoringModule in `DaggerSuperficialValidation#requireTypeElement()` after CL/591092232 since we now wait until the next round before running `ComponentProcessingStep`. * Inlined `descriptorForMonitoringModule` and `descriptorForProductionExecutorModule`. * Simplified the logic in `shouldIncludeImplicitProductionModules` to avoid multiple nested parenthesis. RELNOTES=N/A PiperOrigin-RevId: 594050374
Configuration menu - View commit details
-
Copy full SHA for 09289eb - Browse repository at this point
Copy the full SHA 09289ebView commit details
Commits on Jan 4, 2024
-
RELNOTES=Ban @Inject protected field. PiperOrigin-RevId: 595746282
Configuration menu - View commit details
-
Copy full SHA for 408431a - Browse repository at this point
Copy the full SHA 408431aView commit details
Commits on Jan 8, 2024
-
Add
@LazyClassKey
for injecting class keyed map and doesn't load cl……ass when unused. RELNOTES=n/a PiperOrigin-RevId: 596634724
Configuration menu - View commit details
-
Copy full SHA for 2705c28 - Browse repository at this point
Copy the full SHA 2705c28View commit details
Commits on Jan 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 662d823 - Browse repository at this point
Copy the full SHA 662d823View commit details
Commits on Jan 11, 2024
-
Fix github build failure caused by missing android.jar
RELNOTES=n/a PiperOrigin-RevId: 597429059
Configuration menu - View commit details
-
Copy full SHA for 3a75918 - Browse repository at this point
Copy the full SHA 3a75918View commit details -
Add error message if user make onCreate and onDestroy in base class f…
…inal. RELNOTES=n/a PiperOrigin-RevId: 597600148
Configuration menu - View commit details
-
Copy full SHA for 69ac5d8 - Browse repository at this point
Copy the full SHA 69ac5d8View commit details
Commits on Jan 18, 2024
-
Update build tool version for examples/bazel.
RELNOTES=n/a PiperOrigin-RevId: 599569187
Configuration menu - View commit details
-
Copy full SHA for 983c4d1 - Browse repository at this point
Copy the full SHA 983c4d1View commit details
Commits on Jan 19, 2024
-
Remove
@Deprecated
from javax version of DoubleCheck.lazy() as this…Configuration menu - View commit details
-
Copy full SHA for 3cbc94a - Browse repository at this point
Copy the full SHA 3cbc94aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 813ffce - Browse repository at this point
Copy the full SHA 813ffceView commit details
Commits on Jan 22, 2024
-
reorganize Dagger Android jars with gen_maven_artifact rule.
RELNOTES=n/a PiperOrigin-RevId: 600579650
Configuration menu - View commit details
-
Copy full SHA for 1503f1f - Browse repository at this point
Copy the full SHA 1503f1fView commit details -
Add Ksp Processor for Dagger Android ProguardProcessor.
RELNOTES=Add Ksp Processor for Dagger Android ProguardProcessor. PiperOrigin-RevId: 600594616
Configuration menu - View commit details
-
Copy full SHA for e71de27 - Browse repository at this point
Copy the full SHA e71de27View commit details
Commits on Jan 29, 2024
-
Use gen_maven_artifact for dagger core library
RELNOTES=n/a PiperOrigin-RevId: 602450093
Configuration menu - View commit details
-
Copy full SHA for 846a64c - Browse repository at this point
Copy the full SHA 846a64cView commit details
Commits on Jan 30, 2024
-
PiperOrigin-RevId: 602836841
Configuration menu - View commit details
-
Copy full SHA for 25f56d2 - Browse repository at this point
Copy the full SHA 25f56d2View commit details -
PiperOrigin-RevId: 602843262
Configuration menu - View commit details
-
Copy full SHA for 195cd1e - Browse repository at this point
Copy the full SHA 195cd1eView commit details
Commits on Jan 31, 2024
-
Update bazel-common to pick up Guava 33.0.0 and Truth to 1.3.0.
New commit: google/bazel-common@2a6b640 This helps with google/truth#746. PiperOrigin-RevId: 603081634
Configuration menu - View commit details
-
Copy full SHA for c8b9605 - Browse repository at this point
Copy the full SHA c8b9605View commit details -
PiperOrigin-RevId: 603130434
Configuration menu - View commit details
-
Copy full SHA for 8ca035a - Browse repository at this point
Copy the full SHA 8ca035aView commit details
Commits on Feb 6, 2024
-
Update to [Truth 1.4.0](https://github.com/google/truth/releases/tag/…
…v1.4.0). This makes available the rest of the Truth APIs that were recently added in Google's monorepo. It may be worth also updating to the _following_ version of Truth after it's released, but the purpose of that release will mostly be to deprecate `Truth8`. So, if you just avoid using `Truth8` now (starting by approving any migration CLs that I send your way), then there will be little need for that upgrade. Or, more to the point: I don't expect to keep sending you weekly upgrade CLs after this one :) PiperOrigin-RevId: 604717194
Configuration menu - View commit details
-
Copy full SHA for 388da49 - Browse repository at this point
Copy the full SHA 388da49View commit details -
Migrate usages of
Truth8.assertThat
to equivalent usages of `Truth.……assertThat`. The `Truth8` methods will be deprecated (or hidden) in the future. Callers should move to `Truth`. Some (but not all) of the CLs in this batch require Truth [1.4.0](https://github.com/google/truth/releases/tag/v1.4.0). I submitted a CL earlier today to (I hope) perform that upgrade for your project. PiperOrigin-RevId: 604740587
Configuration menu - View commit details
-
Copy full SHA for 76cebe1 - Browse repository at this point
Copy the full SHA 76cebe1View commit details -
Migrate usages of
Truth8.assertThat
to equivalent usages of `Truth.……assertThat`. The `Truth8` methods will be deprecated (or hidden) in the future. Callers should move to `Truth`. PiperOrigin-RevId: 604763576
Configuration menu - View commit details
-
Copy full SHA for d7a55be - Browse repository at this point
Copy the full SHA d7a55beView commit details
Commits on Feb 7, 2024
-
Rename proguard_specs attribute for gen_maven_artifact to reflect how…
… it will be used. RELNOTES=n/a PiperOrigin-RevId: 605055941
Configuration menu - View commit details
-
Copy full SHA for 348bd75 - Browse repository at this point
Copy the full SHA 348bd75View commit details
Commits on Feb 8, 2024
-
Include proguard rules in dagger core artifact so that LazyClassKeyMa…
…p's string keys can be obfuscated. RELNOTES=n/a PiperOrigin-RevId: 605381957
Configuration menu - View commit details
-
Copy full SHA for 09e5ac2 - Browse repository at this point
Copy the full SHA 09e5ac2View commit details -
RELNOTES=N/A PiperOrigin-RevId: 605384714
Configuration menu - View commit details
-
Copy full SHA for 7ac1dcc - Browse repository at this point
Copy the full SHA 7ac1dccView commit details -
Improve Dagger error messages to give more information and be more co…
…nsistent. RELNOTES=Improve Dagger error messages to give more information and be more consistent. PiperOrigin-RevId: 605450793
Configuration menu - View commit details
-
Copy full SHA for c872238 - Browse repository at this point
Copy the full SHA c872238View commit details
Commits on Feb 12, 2024
-
Replace
processingEnv.requireTypeElement()
with `DaggerSuperficialV……alidation.requireTypeElement()`. I found a case when using `--dagger.pluginsVisitFullBindingGraphs` where `BindingGraphFactory` is triggered from the `ModuleProcessingStep`. In this case, we can't guarantee that the monitoring module has been generated yet so we need to wrap in `DaggerSuperficialValidation.requireTypeElement` to ensure that processing will get delayed if the modules doesn't exist yet. RELNOTES=N/A PiperOrigin-RevId: 606341195
Configuration menu - View commit details
-
Copy full SHA for 02d62d6 - Browse repository at this point
Copy the full SHA 02d62d6View commit details
Commits on Feb 20, 2024
-
Add a SkipTestInjection annotation to disable injecting the test clas…
…s. This may be useful for outside rules that wants to inject the test class from some other Hilt component. This annotation may be used directly on the test class or on some other annotation, as typically outside rules would have some other code generators on their own to generate needed entry points. RELNOTES=Add @SkipTestInjection PiperOrigin-RevId: 608724405
Configuration menu - View commit details
-
Copy full SHA for c40811e - Browse repository at this point
Copy the full SHA c40811eView commit details
Commits on Feb 24, 2024
-
PiperOrigin-RevId: 609862242
Configuration menu - View commit details
-
Copy full SHA for c5075df - Browse repository at this point
Copy the full SHA c5075dfView commit details
Commits on Feb 26, 2024
-
Allow obfuscating @HiltViewModel annotated ViewModel name with r8.
RELNOTES=Allow obfuscating @HiltViewModel annotated ViewModel name with r8. PiperOrigin-RevId: 610474363
Configuration menu - View commit details
-
Copy full SHA for 0786d0a - Browse repository at this point
Copy the full SHA 0786d0aView commit details
Commits on Feb 28, 2024
-
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 611227707
Configuration menu - View commit details
-
Copy full SHA for a06ed06 - Browse repository at this point
Copy the full SHA a06ed06View commit details -
Bump the dagger version in README.md
RELNOTES=n/a PiperOrigin-RevId: 611241776
Configuration menu - View commit details
-
Copy full SHA for 1bbd7db - Browse repository at this point
Copy the full SHA 1bbd7dbView commit details
Commits on Mar 4, 2024
-
reduce number of times resolving parameter types in an extreme case.
RELNOTES=n/a PiperOrigin-RevId: 612562471
Configuration menu - View commit details
-
Copy full SHA for 922ff50 - Browse repository at this point
Copy the full SHA 922ff50View commit details
Commits on Mar 6, 2024
-
Migrate from soon-to-be-deprecated
propagateIfPossible
to equivalen……t `throwIfInstanceOf` and `throwIfUnchecked` calls. This migration makes clearer that the existing call is not doing much, so I've simplified further from there. RELNOTES=n/a PiperOrigin-RevId: 613322217
Configuration menu - View commit details
-
Copy full SHA for 3fa9a8a - Browse repository at this point
Copy the full SHA 3fa9a8aView commit details
Commits on Mar 14, 2024
-
Fix diagnostic kind in InjectValidator.
RELNOTES=n/a PiperOrigin-RevId: 615894485
Configuration menu - View commit details
-
Copy full SHA for e8e1ce6 - Browse repository at this point
Copy the full SHA e8e1ce6View commit details
Commits on Mar 15, 2024
-
RELNOTES=n/a PiperOrigin-RevId: 615951840
Configuration menu - View commit details
-
Copy full SHA for e6c2ac8 - Browse repository at this point
Copy the full SHA e6c2ac8View commit details
Commits on Mar 22, 2024
-
Fix bug in AnnotationExpression.
When generating creator for annotation, the case when the return type is an array was ignored previously. fixes #4262 RELNOTES=n/a PiperOrigin-RevId: 618003551
Configuration menu - View commit details
-
Copy full SHA for c213e36 - Browse repository at this point
Copy the full SHA c213e36View commit details -
Make LazyClassKeyMap accept both MapFactory and MapProviderFactory
Will support producer in a follow up cl. Fixes #4254 RELNOTES=n/a PiperOrigin-RevId: 618220537
Configuration menu - View commit details
-
Copy full SHA for 29d9a8e - Browse repository at this point
Copy the full SHA 29d9a8eView commit details -
Associate Dagger Android output with generated Component.
fixes #4181 RELNOTES=n/a PiperOrigin-RevId: 618273295
Configuration menu - View commit details
-
Copy full SHA for fc2363d - Browse repository at this point
Copy the full SHA fc2363dView commit details
Commits on Mar 25, 2024
-
Reset processingEnv for BindingGraphPlugins for each round.
Previously, plugin initialization was performed in processingSteps(), which is only called once at the time when the Processor is created. RELNOTES=Added `BindingGraphPlugin#onProcessingRoundBegin` for pre processing initialization. PiperOrigin-RevId: 618910291
Configuration menu - View commit details
-
Copy full SHA for 2a6a0b4 - Browse repository at this point
Copy the full SHA 2a6a0b4View commit details
Commits on Mar 28, 2024
-
Update xprocessing.jar for Dagger.
RELNOTES=n/a PiperOrigin-RevId: 620087952
Configuration menu - View commit details
-
Copy full SHA for 8689679 - Browse repository at this point
Copy the full SHA 8689679View commit details
Commits on Mar 29, 2024
-
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 620322505
Configuration menu - View commit details
-
Copy full SHA for d201736 - Browse repository at this point
Copy the full SHA d201736View commit details
Commits on Apr 4, 2024
-
PiperOrigin-RevId: 621683889
Configuration menu - View commit details
-
Copy full SHA for 6722bb3 - Browse repository at this point
Copy the full SHA 6722bb3View commit details
Commits on Apr 8, 2024
-
Add
load()
statements for the builtin Bazel java rulesLoads are being added in preparation for moving the rules out of Bazel and into `rules_java`. PiperOrigin-RevId: 622922174
Configuration menu - View commit details
-
Copy full SHA for 18ce1b5 - Browse repository at this point
Copy the full SHA 18ce1b5View commit details
Commits on Apr 11, 2024
-
Correctly handle cases where base classes have a package private cons…
…tructor that isn't visible to the subclass. RELNOTES=Fixed an issue where base classes with a package private constructor would cause the generated code to fail PiperOrigin-RevId: 6236625
Configuration menu - View commit details
-
Copy full SHA for db25237 - Browse repository at this point
Copy the full SHA db25237View commit details
Commits on Apr 16, 2024
-
Delete redundant logic in FrameworkType.
RELNOTES=n/a PiperOrigin-RevId: 625462723
Configuration menu - View commit details
-
Copy full SHA for 4077ea0 - Browse repository at this point
Copy the full SHA 4077ea0View commit details
Commits on Apr 22, 2024
-
Support
@LazyClassKey
usage with dagger producers.RELNOTES=n/a PiperOrigin-RevId: 627152997
Configuration menu - View commit details
-
Copy full SHA for 5b0aa4a - Browse repository at this point
Copy the full SHA 5b0aa4aView commit details
Commits on Apr 23, 2024
-
A dagger binding methods may be declared as a kotlin property, and we…
… need a representation of it in DaggerExecutableElement. RELNOTES=n/a PiperOrigin-RevId: 627262828
Configuration menu - View commit details
-
Copy full SHA for efa34f2 - Browse repository at this point
Copy the full SHA efa34f2View commit details
Commits on Apr 25, 2024
-
Add a test case for asserting current behavior with type argument nul…
…lability. RELNOTES=n/a PiperOrigin-RevId: 628130557
Configuration menu - View commit details
-
Copy full SHA for d9c0357 - Browse repository at this point
Copy the full SHA d9c0357View commit details -
Change group name as the result of Github runner group migration.
RELNOTES=n/a PiperOrigin-RevId: 628205438
Configuration menu - View commit details
-
Copy full SHA for e209fa9 - Browse repository at this point
Copy the full SHA e209fa9View commit details
Commits on May 1, 2024
-
Fixed the incorrect logic from ProductionBindingRepresentation which …
…could have resulted in type casting error. In the existing logic, if someone is requesting a production binding with Provider, Dagger will end up generating a Producer typed expression. This cl changes the behavior, so that if a binding request kind for a production binding is PROVIDER, then use derivedFromFrameworkInstanceRequestRepresentation to derive the expression from the corresponding ProducerNodeInstanceRequestRepresentation. This will still fail, but with better error message "request kind PROVIDER cannot be satisfied by production binding" from the BindingGraphPlugin Validator. RELNOTES=n/a PiperOrigin-RevId: 629639958
Configuration menu - View commit details
-
Copy full SHA for afd1011 - Browse repository at this point
Copy the full SHA afd1011View commit details -
Fix typo in PropertyQualifierTest and add test for property setter an…
…notation RELNOTES=n/a PiperOrigin-RevId: 629786551
Configuration menu - View commit details
-
Copy full SHA for 9a67471 - Browse repository at this point
Copy the full SHA 9a67471View commit details
Commits on May 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f41033c - Browse repository at this point
Copy the full SHA f41033cView commit details
Commits on May 17, 2024
-
Make dagger.internal.Provider extend jakarta.inject.Provider.
Issue #2058. RELNOTES=Add a jakarta.inject.Provider runtime dependency in preparation for supporting Jakarta Providers PiperOrigin-RevId: 634896178
Configuration menu - View commit details
-
Copy full SHA for a8581e0 - Browse repository at this point
Copy the full SHA a8581e0View commit details
Commits on May 29, 2024
-
PiperOrigin-RevId: 638422441
Configuration menu - View commit details
-
Copy full SHA for b96e9bf - Browse repository at this point
Copy the full SHA b96e9bfView commit details
Commits on May 30, 2024
-
Set MAX_STATEMENTS_PER_METHOD to 25 based on performance analysis.
RELNOTES=n/a PiperOrigin-RevId: 638462173
Configuration menu - View commit details
-
Copy full SHA for 79aeed8 - Browse repository at this point
Copy the full SHA 79aeed8View commit details
Commits on Jun 6, 2024
-
Support prunable hilt entry points.
Added `@OnlyUsedBy(\*binding identifiers*\)` to be used on entry points that indicates an entry point should be pruned if no usage of it is found. An entry point is considered as unused if: 1. No corresponding binding identifier is found. A binding's default identifier is its enclosing class, user may also explicitly specify a identifier using `@BindingIdentifier` on the binding element. 1. The entry point is only being used by a binding that is unused, which will not present in the pruned graph. RELNOTES=Support prunable hilt entry points. PiperOrigin-RevId: 640960016
Configuration menu - View commit details
-
Copy full SHA for 9c5d902 - Browse repository at this point
Copy the full SHA 9c5d902View commit details -
Rollback changelist 640960016.
PiperOrigin-RevId: 641013296
Configuration menu - View commit details
-
Copy full SHA for e679774 - Browse repository at this point
Copy the full SHA e679774View commit details
Commits on Jun 10, 2024
-
RELNOTES=n/a PiperOrigin-RevId: 641978383
Configuration menu - View commit details
-
Copy full SHA for 5440ab7 - Browse repository at this point
Copy the full SHA 5440ab7View commit details -
RELNOTES=n/a PiperOrigin-RevId: 642001855
Configuration menu - View commit details
-
Copy full SHA for 8b3b370 - Browse repository at this point
Copy the full SHA 8b3b370View commit details -
Skip view injection when in edit mode
Closes #4305 RELNOTES=Skip view injection when in edit mode for previews. PiperOrigin-RevId: 642038084
Edson Moraes Menegatti authored and Dagger Team committedJun 10, 2024 Configuration menu - View commit details
-
Copy full SHA for 65b74f8 - Browse repository at this point
Copy the full SHA 65b74f8View commit details
Commits on Jun 11, 2024
-
Remove checks for unused binding kinds in FactoryGenerator.
Factory generator can only be used with `INJECTION`, `ASSISTED_INJECTION`, and `PROVISION` kinds, so fail early if other kinds are detected. RELNOTES=N/A PiperOrigin-RevId: 642258494
Configuration menu - View commit details
-
Copy full SHA for 33c7673 - Browse repository at this point
Copy the full SHA 33c7673View commit details
Commits on Jun 14, 2024
-
Add rules to stop LazyClassKey referenced classes being merged with R8.
Also adjusted the proguard rule to avoid keeping the LazyClassKeyProvider which is unnecessary. Issue#4323 RELNOTES=n/a PiperOrigin-RevId: 643422417
Configuration menu - View commit details
-
Copy full SHA for 81512af - Browse repository at this point
Copy the full SHA 81512afView commit details
Commits on Jun 17, 2024
-
Refactor factory generators for better consistency and readability.
This CL refactors the factory generators into smaller functions. Specifically, each function encapsulates a generated method on the factory. I've also added code snippets above the functions to document examples of the generated methods they return, and aligned the classes so that the overall style is consistent. This CL is a no-op change. RELNOTES=N/A PiperOrigin-RevId: 643999088
Configuration menu - View commit details
-
Copy full SHA for cb76f99 - Browse repository at this point
Copy the full SHA cb76f99View commit details -
Fix handling of Kotlin object Producer modules so that @JvmStatic isn…
…'t required RELNOTES=n/a PiperOrigin-RevId: 644066003
Configuration menu - View commit details
-
Copy full SHA for c9903cc - Browse repository at this point
Copy the full SHA c9903ccView commit details -
Rollback of: "Fix handling of Kotlin object Producer modules so that …
…@JvmStatic isn't required" PiperOrigin-RevId: 644122947
Configuration menu - View commit details
-
Copy full SHA for 2de0949 - Browse repository at this point
Copy the full SHA 2de0949View commit details
Commits on Jun 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 96ccd24 - Browse repository at this point
Copy the full SHA 96ccd24View commit details -
Update Kotlin Metadata dependency from 0.9.0 to 2.0.0-Beta5
RELNOTES=Update Kotlin Metadata dependency from 0.9.0 to 2.0.0-Beta5 PiperOrigin-RevId: 644733433
Configuration menu - View commit details
-
Copy full SHA for 8fd51a4 - Browse repository at this point
Copy the full SHA 8fd51a4View commit details
Commits on Jun 21, 2024
-
PiperOrigin-RevId: 645175124
Configuration menu - View commit details
-
Copy full SHA for fff8c7b - Browse repository at this point
Copy the full SHA fff8c7bView commit details -
Revert Kotlin Metadata dependency back to 0.9.0 from 2.0.0-Beta5
RELNOTES=n/a PiperOrigin-RevId: 645498660
Configuration menu - View commit details
-
Copy full SHA for f7f40dd - Browse repository at this point
Copy the full SHA f7f40ddView commit details
Commits on Jun 24, 2024
-
RELNOTES=N/A PiperOrigin-RevId: 646098252
Configuration menu - View commit details
-
Copy full SHA for a6867f2 - Browse repository at this point
Copy the full SHA a6867f2View commit details -
RELNOTES=N/A PiperOrigin-RevId: 646171536
Configuration menu - View commit details
-
Copy full SHA for 4f019d9 - Browse repository at this point
Copy the full SHA 4f019d9View commit details
Commits on Jun 25, 2024
-
Fix qualifier annotations with the wrong retention per the JSR330 spec.
PiperOrigin-RevId: 646268040
Configuration menu - View commit details
-
Copy full SHA for b2a1fe6 - Browse repository at this point
Copy the full SHA b2a1fe6View commit details -
Add
ComponentDescriptor#bindings()
, similar to `ModuleDescriptor#bi……ndings()` to easily access the bindings of a component. This CL also moves the various `Map<Key, BindingDeclaration>` state from `BindingGraphFactory` into a new class, `ComponentDeclarations`, that encapsulates all of the various declarations of a component into a single location RELNOTES=N/A PiperOrigin-RevId: 646464552
Configuration menu - View commit details
-
Copy full SHA for 537acb9 - Browse repository at this point
Copy the full SHA 537acb9View commit details
Commits on Jul 3, 2024
-
Change the
Binding
class hierarchy to reflectBindingKind
rather ……than `BindingType`. This change is necessary to decouple the `BindingType` from the binding class hierarchy, which currently prevents us from creating a binding without already having access to its dependencies. RELNOTES=N/A PiperOrigin-RevId: 649081259
Configuration menu - View commit details
-
Copy full SHA for d456afc - Browse repository at this point
Copy the full SHA d456afcView commit details -
Remove a binding's associated declarations from
ResolvedBindings
an……d use `BindingNode` directly instead. This CL refactors the code to remove the associated declarations from `ResolvedBindings` and have the class use `BindingNode` (which includes the associated declarations itself) instead of `Binding`. This change is subtle, but it allows us to reuse the `BindingNode` instance from an ancestor component rather than trying to recreate it with the exact same declarations in a child component (see follow-up CL/644086367). Overall, I think this refactor is also an improvement to maintainability because it cuts out the `ResolvedBindings#associatedDeclarations()` being used as a middle-man for then creating a `BindingNode` and just holds the `BindingNode`s directly. RELNOTES=N/A PiperOrigin-RevId: 649129006
Configuration menu - View commit details
-
Copy full SHA for fb8bd41 - Browse repository at this point
Copy the full SHA fb8bd41View commit details
Commits on Jul 16, 2024
-
RELNOTES=N/A PiperOrigin-RevId: 653003160
Configuration menu - View commit details
-
Copy full SHA for 56e1eeb - Browse repository at this point
Copy the full SHA 56e1eebView commit details
Commits on Jul 18, 2024
-
PiperOrigin-RevId: 653428725
Configuration menu - View commit details
-
Copy full SHA for 982dab4 - Browse repository at this point
Copy the full SHA 982dab4View commit details -
Fix broken assertion in `RequiresResolutionChecker#visitUncachedDepen…
…dencies()` Within `visitUncachedDependencies()` we assert that each uncached key is actually uncached before caching it. However, this assertion can fail because during the process of caching, we call `getLocalExplicitBindings()` and `getLocalMultibindingContributions()` which can trigger its own call to `visitUncachedDependencies()` and cache it first. This CL fixes this issue by avoiding the calls to `getLocalExplicitBindings()` and `getLocalMultibindingContributions()`. In these cases we don't actually need the bindings themselves since we just need to know if the declarations exist or not, so we can just use the declarations directly. This saves us a bit of work because creating the binding requires us to not only resolve the binding itself, but also bindings for dependencies (possibly even transitive dependencies) in the case `@Binds` delegate declarations. It's also nice to keep the assertion because it gaurantees some simplicity to the code. RELNOTES=N/A PiperOrigin-RevId: 653633501
Configuration menu - View commit details
-
Copy full SHA for 216a9d2 - Browse repository at this point
Copy the full SHA 216a9d2View commit details -
Completely remove dependency on https://github.com/google/bazel-common.
This CL removes the last few dependencies on bazel-common (mainly the definitions of `jarjar_library` and `javadoc_library` which have now been copied directly into Dagger). This has the following benefits * The android sdk is now defined in Dagger's WORKSPACE * All maven dependencies should now be defined in Dagger's WORKSPACE **Background:** We've been in the process of removing bazel-common dependencies for a while due to the confusion of mixing maven dependencies between both Dagger and bazel-common and the hassle of upgrading those dependencies on bazel-common (requires first updating in bazel-common, then updating version of bazel-common in Dagger). RELNOTES=N/A PiperOrigin-RevId: 653711935
Configuration menu - View commit details
-
Copy full SHA for 140e201 - Browse repository at this point
Copy the full SHA 140e201View commit details
Commits on Jul 22, 2024
-
PiperOrigin-RevId: 654840578
Configuration menu - View commit details
-
Copy full SHA for 917c005 - Browse repository at this point
Copy the full SHA 917c005View commit details -
Fix an issue where the parameter name "instance" could conflict with …
Configuration menu - View commit details
-
Copy full SHA for 952c250 - Browse repository at this point
Copy the full SHA 952c250View commit details
Commits on Jul 29, 2024
-
RELNOTES=n/a PiperOrigin-RevId: 657335531
Configuration menu - View commit details
-
Copy full SHA for d55d61c - Browse repository at this point
Copy the full SHA d55d61cView commit details
Commits on Jul 31, 2024
-
PiperOrigin-RevId: 657804794
Configuration menu - View commit details
-
Copy full SHA for 5293ff5 - Browse repository at this point
Copy the full SHA 5293ff5View commit details -
This is required before updating to the latest XProcessing jars (which require JDK 17+). Note that we're not using JDK 17 because there's a bug that affects Dagger (https://bugs.openjdk.org/browse/JDK-8268575). This CL sets the default target level to 8, which is used by all of the processors, but some of the Dagger (non-processor) artifacts are set explicitly to target 7. Note that we're keeping the target low to avoid forcing downstream users to have to use a higher JDK. I've also added a validation step to our GitHub Actions to add some level of guarantee that the classes in the artifact jars all have the expected language level. RELNOTES=N/A PiperOrigin-RevId: 658131076
Configuration menu - View commit details
-
Copy full SHA for 31eec2a - Browse repository at this point
Copy the full SHA 31eec2aView commit details
Commits on Aug 1, 2024
-
Add jarjar test libraries to the Allstar exemption file for binary ar…
…tifacts. Issue #3415. RELNOTES=n/a PiperOrigin-RevId: 658516509
Configuration menu - View commit details
-
Copy full SHA for 4dcf006 - Browse repository at this point
Copy the full SHA 4dcf006View commit details -
Drop latest XProcessing jars into Dagger.
The latest XProcessing jars require an update to Kotln and KSP dependency, so I've updated those in our gradle tests. RELNOTES=Drop latest XProcessing jars. Requires users to update to KSP 1.9.24-1.0.20 PiperOrigin-RevId: 658533119
Configuration menu - View commit details
-
Copy full SHA for da92d19 - Browse repository at this point
Copy the full SHA da92d19View commit details
Commits on Aug 2, 2024
-
Add more information to error message when @AggregatedDeps annotation…
… is missing. Users should never actually hit this error but we've seen some reports where a user hit this in #4362, so I've added information about the failing element to help the user further narrow down the issue. RELNOTES=N/A PiperOrigin-RevId: 658923031
Configuration menu - View commit details
-
Copy full SHA for 3e0d349 - Browse repository at this point
Copy the full SHA 3e0d349View commit details
Commits on Aug 7, 2024
-
Update Dagger yml and README with new latest version number.
RELNOTES=N/A PiperOrigin-RevId: 660572837
Configuration menu - View commit details
-
Copy full SHA for 486be28 - Browse repository at this point
Copy the full SHA 486be28View commit details
Commits on Aug 8, 2024
-
Reorganize functional multibinding tests into separate targets.
This is part of an on-going refactor to clean up Dagger's tests. The new structure follows Bazel best practices and has a number of benefits such as: * Makes it clear which classes go with a particular test class just by reading the BUILD file * Makes error messages clearer because a problematic class will only cause its corresponding test to fail and not unrelated tests. * Speeds up builds, as tests don't need to wait for unrelated classes to build. RELNOTES=N/A PiperOrigin-RevId: 660590373
Configuration menu - View commit details
-
Copy full SHA for 78be2f5 - Browse repository at this point
Copy the full SHA 78be2f5View commit details -
Refactor
BindingGraphFactory
to remove the need for `keysMatchingRe……quest` and corresponding cache. This CL refactors `BindingGraphFactory` so that we no longer need to loop through all variations of a multibindings key when getting the `@Multibindings` declarations or `@IntoMap`/`@IntoSet` contributions from `ComponentDeclarations`. Instead, `ComponentDeclarations` now indexes these declarations by the unwrapped multibinding key (i.e. `Map<K, V>` or `Set<V>`) which we can use to get all declarations with a single key. In addition, the unwrapping of the key is done within `ComponentDeclarations` so that each caller doesn't have to remember to unwrap the key. RELNOTES=Fixes missing variance in KSP for multibindings which can break KSP users who forgot the `@JvmSuppressWildcards`. PiperOrigin-RevId: 660963882
Configuration menu - View commit details
-
Copy full SHA for 93201e0 - Browse repository at this point
Copy the full SHA 93201e0View commit details
Commits on Aug 9, 2024
-
Combine
BindingGraphFactory.Resolver
's caching logic into a single ……location. Currently, there are two places where we try to cache a binding: 1. `Resolver#resolve(Key)` checks if there's a previously resolved binding for the given key in an ancestor resolver. 2. `Resolver#lookUpBindings(Key)` checks if a resolved binding should be owned by an ancestor component (e.g. because its scoped). Note that these two checks are slightly different. Case 1 only depends on the `Key` and is iteration-order dependent since it depends on whether the key has already been resolved in a ancestor binding. Case 2 depends on the binding rather than just the key (which is why it occurs at the end of `lookUpBindings`) and tries to determine if a binding could be resolved in a parent component (e.g. based on the scope or which component installs the module). Thus, case 2 may cache bindings that case 1 doesn't in cases where we know a binding is resolvable in an ancestor but hasn't yet been resolved (e.g. due to order or just because nothing actually requests it). In any case, this CL consolidates that logic into a single place. This should make it easier to extract the caching logic later from the intermediate graph creation. RELNOTES=N/A PiperOrigin-RevId: 661363402
Configuration menu - View commit details
-
Copy full SHA for 86fcef5 - Browse repository at this point
Copy the full SHA 86fcef5View commit details -
Rollback of: Combine
BindingGraphFactory.Resolver
's caching logic i……nto a single location. PiperOrigin-RevId: 661446058
Configuration menu - View commit details
-
Copy full SHA for f397f6b - Browse repository at this point
Copy the full SHA f397f6bView commit details
Commits on Aug 13, 2024
-
Update robolectric dependencies.
Our bazel example projects was using an old version of `bazel-robolectric` (4.1) which referenced an obsolete repository for the robolectric jars `"https://repo1.maven.org/central"`: https://github.com/robolectric/robolectric-bazel/blob/4.1/bazel/robolectric.bzl#L7 The new repository we're supposed to use is `"https://repo1.maven.org/maven2"`, which is used by `bazel-robolectric` 4.4+, e.g.: https://github.com/robolectric/robolectric-bazel/blob/4.4/bazel/robolectric.bzl#L7 This CL updates `bazel-robolectric` and all robolectric deps to 4.11.1 so that everything is using the same version. In addition, the above changes ended up breaking other tests (e.g. https://github.com/google/dagger/actions/runs/10360876140/job/28680303187), due to robolectric/robolectric#6593, and required further updating espresso to `androidx.test.espresso:espresso-core:3.5.1`. RELNOTES=N/A PiperOrigin-RevId: 662367956
Configuration menu - View commit details
-
Copy full SHA for f1acd72 - Browse repository at this point
Copy the full SHA f1acd72View commit details
Commits on Aug 15, 2024
-
[Cleanup] Remove unnecessary switch on
BindingType
in `SourceFiles#……generatedClassNameForBinding() RELNOTES=N/A PiperOrigin-RevId: 663442605
Configuration menu - View commit details
-
Copy full SHA for 3b1c84e - Browse repository at this point
Copy the full SHA 3b1c84eView commit details
Commits on Aug 16, 2024
-
[Cleanup]: Use
MultiboundMapBinding
andMultiboundSetBinding
in m……ore places. This CL replaces some usages of `Binding`/`ContributionBinding` with the more explicit types when possible. This has the benefit of being able to use more specific APIs in these locations and also avoids having to check that the bindings are of the correct kind in every method. RELNOTES=N/A PiperOrigin-RevId: 663836816
Configuration menu - View commit details
-
Copy full SHA for c69189e - Browse repository at this point
Copy the full SHA c69189eView commit details
Commits on Aug 19, 2024
-
Add GWT dependencies for Jakarta Inject
Issue #4391 RELNOTES=Add GWT dependencies for Jakarta Inject PiperOrigin-RevId: 665040399
Configuration menu - View commit details
-
Copy full SHA for bea926c - Browse repository at this point
Copy the full SHA bea926cView commit details
Commits on Aug 21, 2024
-
RELNOTES=n/a PiperOrigin-RevId: 665964775
Configuration menu - View commit details
-
Copy full SHA for 4a0a5e9 - Browse repository at this point
Copy the full SHA 4a0a5e9View commit details
Commits on Aug 22, 2024
-
RELNOTES=n/a PiperOrigin-RevId: 666104552
Configuration menu - View commit details
-
Copy full SHA for a15cf23 - Browse repository at this point
Copy the full SHA a15cf23View commit details
Commits on Aug 26, 2024
-
Remove unnecessary boxing in AutoValue classes
PiperOrigin-RevId: 667661624
Configuration menu - View commit details
-
Copy full SHA for d883a9a - Browse repository at this point
Copy the full SHA d883a9aView commit details
Commits on Aug 27, 2024
-
Combine BindingGraphFactory.Resolver's caching logic into a single lo…
…cation. Currently, there are two places where we try to cache a binding: Resolver#resolve(Key) checks if there's a previously resolved binding for the given key in an ancestor resolver. Resolver#lookUpBindings(Key) checks if a resolved binding should be owned by an ancestor component (e.g. because its scoped). Note that these two checks are slightly different. Case 1 only depends on the Key and is iteration-order dependent since it depends on whether the key has already been resolved in a ancestor binding. Case 2 depends on the binding rather than just the key (which is why it occurs at the end of lookUpBindings) and tries to determine if a binding could be resolved in a parent component (e.g. based on the scope or which component installs the module). Thus, case 2 may cache bindings that case 1 doesn't in cases where we know a binding is resolvable in an ancestor but hasn't yet been resolved (e.g. due to order or just because nothing actually requests it). In any case, this CL consolidates that logic into a single place. This should make it easier to extract the caching logic later from the intermediate graph creation. RELNOTES=N/A PiperOrigin-RevId: 668007196
Configuration menu - View commit details
-
Copy full SHA for de59d69 - Browse repository at this point
Copy the full SHA de59d69View commit details -
Fix ordering of LazyClassKeyMap
fixes #4398 RELNOTES=n/a PiperOrigin-RevId: 668175042
Configuration menu - View commit details
-
Copy full SHA for 5d61a6c - Browse repository at this point
Copy the full SHA 5d61a6cView commit details
Commits on Aug 28, 2024
-
We're aiming to add proper nullable annotations to Dagger's runtime API types in the upcoming Dagger release. In order to do this we need to drop support for Java 7. Given Java 7 itself was officially out of support after July 2022, dropping support for Java 7 in Dagger seem reasonable. RELNOTES=Remove support for Java 7 PiperOrigin-RevId: 668525969
Configuration menu - View commit details
-
Copy full SHA for c06a25f - Browse repository at this point
Copy the full SHA c06a25fView commit details -
We're aiming to add proper nullable annotations to Dagger's runtime API types in the upcoming Dagger release. In order to do this we need to drop support for Java 7. Given Java 7 itself was officially out of support after July 2022, dropping support for Java 7 in Dagger seem reasonable. RELNOTES=Remove support for Java 7 PiperOrigin-RevId: 668577143
Configuration menu - View commit details
-
Copy full SHA for c4e30e7 - Browse repository at this point
Copy the full SHA c4e30e7View commit details -
Add @NullMarked to dagger.internal package
RELNOTES=n/a PiperOrigin-RevId: 668591111
Configuration menu - View commit details
-
Copy full SHA for 53ae898 - Browse repository at this point
Copy the full SHA 53ae898View commit details -
Remove usage of
XConverters#toJavac()
.RELNOTES=N/A PiperOrigin-RevId: 668632552
Configuration menu - View commit details
-
Copy full SHA for b073dcb - Browse repository at this point
Copy the full SHA b073dcbView commit details
Commits on Aug 29, 2024
-
RELNOTES=N/A PiperOrigin-RevId: 668962229
Configuration menu - View commit details
-
Copy full SHA for a91448e - Browse repository at this point
Copy the full SHA a91448eView commit details -
PiperOrigin-RevId: 668995662
Configuration menu - View commit details
-
Copy full SHA for 88493b6 - Browse repository at this point
Copy the full SHA 88493b6View commit details -
RELNOTES=n/a PiperOrigin-RevId: 669014463
Configuration menu - View commit details
-
Copy full SHA for cca779a - Browse repository at this point
Copy the full SHA cca779aView commit details
Commits on Sep 5, 2024
-
Remove calls to
Binding#bindingType()
from within the Resolver.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
Configuration menu - View commit details
-
Copy full SHA for 4571f35 - Browse repository at this point
Copy the full SHA 4571f35View commit details -
Configuration menu - View commit details
-
Copy full SHA for af62f2d - Browse repository at this point
Copy the full SHA af62f2dView commit details
Commits on Sep 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c718e0b - Browse repository at this point
Copy the full SHA c718e0bView commit details -
Add GWT dependencies for Jspecify. Also upgrade Jspecify from 0.3.0 t…
…o 1.0.0 Issue #4391. RELNOTES=n/a PiperOrigin-RevId: 671909308
Configuration menu - View commit details
-
Copy full SHA for ed2685b - Browse repository at this point
Copy the full SHA ed2685bView commit details
Commits on Sep 9, 2024
-
Reorganize the binding class hierarchy.
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
Configuration menu - View commit details
-
Copy full SHA for 406bc87 - Browse repository at this point
Copy the full SHA 406bc87View commit details -
RELNOTES=N/A PiperOrigin-RevId: 672655387
Configuration menu - View commit details
-
Copy full SHA for 5918d11 - Browse repository at this point
Copy the full SHA 5918d11View commit details
Commits on Sep 10, 2024
-
Ban scoping on
@Binds
that delegate to@Produces
implementations.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
Configuration menu - View commit details
-
Copy full SHA for 03b237f - Browse repository at this point
Copy the full SHA 03b237fView commit details
Commits on Sep 11, 2024
-
Fix Dagger error messages with missing component references in the de…
…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
Configuration menu - View commit details
-
Copy full SHA for d02798b - Browse repository at this point
Copy the full SHA d02798bView commit details
Commits on Sep 12, 2024
-
Require @nullable explicitly on @BINDS methods.
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
Configuration menu - View commit details
-
Copy full SHA for 4941926 - Browse repository at this point
Copy the full SHA 4941926View commit details
Commits on Sep 13, 2024
-
RELNOTES=n/a PiperOrigin-RevId: 674004016
Configuration menu - View commit details
-
Copy full SHA for 5f50e6d - Browse repository at this point
Copy the full SHA 5f50e6dView commit details -
Upgrade Kotlin Metadata dependency to 2.0.0-Beta5
RELNOTES=Upgrade Kotlin Metadata dependency to 2.0.0-Beta5 PiperOrigin-RevId: 674401703
Configuration menu - View commit details
-
Copy full SHA for 9a94d19 - Browse repository at this point
Copy the full SHA 9a94d19View commit details
Commits on Sep 16, 2024
-
Refactor
BindingGraphFactory
to build network directly.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
Configuration menu - View commit details
-
Copy full SHA for 3fd9588 - Browse repository at this point
Copy the full SHA 3fd9588View commit details
Commits on Sep 18, 2024
-
[Refactor]: Split BindingFactory.syntheticOptionalDeclaration into se…
…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
Configuration menu - View commit details
-
Copy full SHA for 000a21d - Browse repository at this point
Copy the full SHA 000a21dView commit details -
[Refactor]: Fork ResolvedBindings for LegacyBindingGraphFactory.
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
Configuration menu - View commit details
-
Copy full SHA for 5f76186 - Browse repository at this point
Copy the full SHA 5f76186View commit details
Commits on Sep 19, 2024
-
Add tests for nullable field injection and nullable provides methods.
RELNOTES=n/a PiperOrigin-RevId: 676497288
Configuration menu - View commit details
-
Copy full SHA for 6368dba - Browse repository at this point
Copy the full SHA 6368dbaView commit details -
Add repro tests for b/367426609.
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
Configuration menu - View commit details
-
Copy full SHA for 93b8bcf - Browse repository at this point
Copy the full SHA 93b8bcfView commit details -
Refactor BindingGraphFactory.RequiresResolutionChecker to use the net…
…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
Configuration menu - View commit details
-
Copy full SHA for 8848866 - Browse repository at this point
Copy the full SHA 8848866View commit details -
Update MissingBindingValidationTest to show full error messages.
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
Configuration menu - View commit details
-
Copy full SHA for f8a09b2 - Browse repository at this point
Copy the full SHA f8a09b2View commit details -
Add a test for Kotlin nullable field injection.
PiperOrigin-RevId: 676595690
Configuration menu - View commit details
-
Copy full SHA for 8d9f082 - Browse repository at this point
Copy the full SHA 8d9f082View commit details
Commits on Sep 23, 2024
-
Load the builtin Bazel java rules from @rules_java
PiperOrigin-RevId: 677815001
Configuration menu - View commit details
-
Copy full SHA for 8023c7a - Browse repository at this point
Copy the full SHA 8023c7aView commit details -
Load the builtin Bazel java rules from @rules_java
PiperOrigin-RevId: 677815481
Configuration menu - View commit details
-
Copy full SHA for 843a18e - Browse repository at this point
Copy the full SHA 843a18eView commit details -
Remove obsolete TODOs in DaggerSuperficialValidationTest.
RELNOTES=N/A PiperOrigin-RevId: 677901374
Configuration menu - View commit details
-
Copy full SHA for b2eb30f - Browse repository at this point
Copy the full SHA b2eb30fView commit details -
Add a test for Kotlin nullable provides methods.
PiperOrigin-RevId: 677905874
Configuration menu - View commit details
-
Copy full SHA for c3f2b94 - Browse repository at this point
Copy the full SHA c3f2b94View commit details -
Fix MissingBinding error message for similar bindings.
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
Configuration menu - View commit details
-
Copy full SHA for 709e68d - Browse repository at this point
Copy the full SHA 709e68dView commit details
Commits on Sep 24, 2024
-
Update Dagger tests to support JDK 24.
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
Configuration menu - View commit details
-
Copy full SHA for 3bffd33 - Browse repository at this point
Copy the full SHA 3bffd33View commit details -
Load the builtin Bazel java rules from @rules_java
PiperOrigin-RevId: 678257367
Configuration menu - View commit details
-
Copy full SHA for 879c7b1 - Browse repository at this point
Copy the full SHA 879c7b1View commit details -
Add nullability annotations to some generated methods
RELNOTES=n/a PiperOrigin-RevId: 678295107
Configuration menu - View commit details
-
Copy full SHA for ab43d59 - Browse repository at this point
Copy the full SHA ab43d59View commit details