Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump daggerVersion from 2.29.1 to 2.33 #3692

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 16, 2021

Bumps daggerVersion from 2.29.1 to 2.33.
Updates dagger from 2.29.1 to 2.33

Release notes

Sourced from dagger's releases.

Dagger 2.33

What’s New in Dagger

Bug fixes

What’s New in Hilt

Hilt is now in Beta!

Previously, Hilt has been in Alpha, and it is now officially in Beta. This means that there will be no further changes to the APIs until after Hilt becomes stable. We’ll focus on bug fixes and getting Hilt into a stable release.

(This also means that Hilt artifacts will now be postfixed with -beta instead of -alpha).

New breaking changes

Activity injection is now delayed until OnContextAvailableListener to enable member injecting ViewModels with SavedStateHandle. To use the ContextAware APIs androidx.activity, androidx.fragment and androidx.lifecycle dependencies are updated across the Dagger libraries. (623d3a61e)

Note that this affects Hilt base classes that expected its members to be injected due to another Hilt class extending it. This essentially changes the injection of activities to occur within super.onCreate() instead of before super.onCreate().

@AndroidEntryPoint
public class MainActivity extends BaseActivity {
   // ...
}

abstract class BaseActivity extends FragmentActivity { @​Inject Foo foo;

@​Override protected void onCreate(Bundle savedInstanceState) { foo.doSomething(); // <- This will now result in an NPE since ‘foo’ hasn’t been injected yet. super.onCreate();
} }

For cases where a binding is strictly needed before super.onCreate() then the base class will have to invoke a Hilt generated method inject(). For example:

abstract class BaseActivity extends FragmentActivity {
  @Override
   protected void onCreate(Bundle savedInstanceState) {
    inject(); // <- This will force early injection.
    foo.doSomething();
    super.onCreate();    
  }
}

</tr></table>

... (truncated)

Commits
  • ae991fd 2.33 release
  • 78438d5 Update all "alpha" references to "beta" in preparation for the upcoming beta ...
  • ceccfc6 Add job to GitHub Actions to validate the Dagger version.
  • 8a4b7e2 Remove cache of top level component implementations
  • 8a92723 Fixes to javadoc and links for EarlyEntryPoint
  • 5877be8 Add internal utility method.
  • 1ad74b9 Follow-up changes to the EarlyEntryPoint API
  • 289f59f Add EarlyTestEntryPoints to allow entry points to be called in tests before t...
  • 608e6cc Remove a comment that seems to be left around from Ahead-of-time Subcomponent...
  • 73628bc Enable remaining dagger.android and dagger.hilt tests.
  • Additional commits viewable in compare view

Updates dagger-compiler from 2.29.1 to 2.33

Release notes

Sourced from dagger-compiler's releases.

Dagger 2.33

What’s New in Dagger

Bug fixes

What’s New in Hilt

Hilt is now in Beta!

Previously, Hilt has been in Alpha, and it is now officially in Beta. This means that there will be no further changes to the APIs until after Hilt becomes stable. We’ll focus on bug fixes and getting Hilt into a stable release.

(This also means that Hilt artifacts will now be postfixed with -beta instead of -alpha).

New breaking changes

Activity injection is now delayed until OnContextAvailableListener to enable member injecting ViewModels with SavedStateHandle. To use the ContextAware APIs androidx.activity, androidx.fragment and androidx.lifecycle dependencies are updated across the Dagger libraries. (623d3a61e)

Note that this affects Hilt base classes that expected its members to be injected due to another Hilt class extending it. This essentially changes the injection of activities to occur within super.onCreate() instead of before super.onCreate().

@AndroidEntryPoint
public class MainActivity extends BaseActivity {
   // ...
}

abstract class BaseActivity extends FragmentActivity { @​Inject Foo foo;

@​Override protected void onCreate(Bundle savedInstanceState) { foo.doSomething(); // <- This will now result in an NPE since ‘foo’ hasn’t been injected yet. super.onCreate();
} }

For cases where a binding is strictly needed before super.onCreate() then the base class will have to invoke a Hilt generated method inject(). For example:

abstract class BaseActivity extends FragmentActivity {
  @Override
   protected void onCreate(Bundle savedInstanceState) {
    inject(); // <- This will force early injection.
    foo.doSomething();
    super.onCreate();    
  }
}

</tr></table>

... (truncated)

Commits
  • ae991fd 2.33 release
  • 78438d5 Update all "alpha" references to "beta" in preparation for the upcoming beta ...
  • ceccfc6 Add job to GitHub Actions to validate the Dagger version.
  • 8a4b7e2 Remove cache of top level component implementations
  • 8a92723 Fixes to javadoc and links for EarlyEntryPoint
  • 5877be8 Add internal utility method.
  • 1ad74b9 Follow-up changes to the EarlyEntryPoint API
  • 289f59f Add EarlyTestEntryPoints to allow entry points to be called in tests before t...
  • 608e6cc Remove a comment that seems to be left around from Ahead-of-time Subcomponent...
  • 73628bc Enable remaining dagger.android and dagger.hilt tests.
  • Additional commits viewable in compare view

Updates dagger-android-support from 2.29.1 to 2.33

Release notes

Sourced from dagger-android-support's releases.

Dagger 2.33

What’s New in Dagger

Bug fixes

What’s New in Hilt

Hilt is now in Beta!

Previously, Hilt has been in Alpha, and it is now officially in Beta. This means that there will be no further changes to the APIs until after Hilt becomes stable. We’ll focus on bug fixes and getting Hilt into a stable release.

(This also means that Hilt artifacts will now be postfixed with -beta instead of -alpha).

New breaking changes

Activity injection is now delayed until OnContextAvailableListener to enable member injecting ViewModels with SavedStateHandle. To use the ContextAware APIs androidx.activity, androidx.fragment and androidx.lifecycle dependencies are updated across the Dagger libraries. (623d3a61e)

Note that this affects Hilt base classes that expected its members to be injected due to another Hilt class extending it. This essentially changes the injection of activities to occur within super.onCreate() instead of before super.onCreate().

@AndroidEntryPoint
public class MainActivity extends BaseActivity {
   // ...
}

abstract class BaseActivity extends FragmentActivity { @​Inject Foo foo;

@​Override protected void onCreate(Bundle savedInstanceState) { foo.doSomething(); // <- This will now result in an NPE since ‘foo’ hasn’t been injected yet. super.onCreate();
} }

For cases where a binding is strictly needed before super.onCreate() then the base class will have to invoke a Hilt generated method inject(). For example:

abstract class BaseActivity extends FragmentActivity {
  @Override
   protected void onCreate(Bundle savedInstanceState) {
    inject(); // <- This will force early injection.
    foo.doSomething();
    super.onCreate();    
  }
}

</tr></table>

... (truncated)

Commits
  • ae991fd 2.33 release
  • 78438d5 Update all "alpha" references to "beta" in preparation for the upcoming beta ...
  • ceccfc6 Add job to GitHub Actions to validate the Dagger version.
  • 8a4b7e2 Remove cache of top level component implementations
  • 8a92723 Fixes to javadoc and links for EarlyEntryPoint
  • 5877be8 Add internal utility method.
  • 1ad74b9 Follow-up changes to the EarlyEntryPoint API
  • 289f59f Add EarlyTestEntryPoints to allow entry points to be called in tests before t...
  • 608e6cc Remove a comment that seems to be left around from Ahead-of-time Subcomponent...
  • 73628bc Enable remaining dagger.android and dagger.hilt tests.
  • Additional commits viewable in compare view

Updates dagger-android-processor from 2.29.1 to 2.33

Release notes

Sourced from dagger-android-processor's releases.

Dagger 2.33

What’s New in Dagger

Bug fixes

What’s New in Hilt

Hilt is now in Beta!

Previously, Hilt has been in Alpha, and it is now officially in Beta. This means that there will be no further changes to the APIs until after Hilt becomes stable. We’ll focus on bug fixes and getting Hilt into a stable release.

(This also means that Hilt artifacts will now be postfixed with -beta instead of -alpha).

New breaking changes

Activity injection is now delayed until OnContextAvailableListener to enable member injecting ViewModels with SavedStateHandle. To use the ContextAware APIs androidx.activity, androidx.fragment and androidx.lifecycle dependencies are updated across the Dagger libraries. (623d3a61e)

Note that this affects Hilt base classes that expected its members to be injected due to another Hilt class extending it. This essentially changes the injection of activities to occur within super.onCreate() instead of before super.onCreate().

@AndroidEntryPoint
public class MainActivity extends BaseActivity {
   // ...
}

abstract class BaseActivity extends FragmentActivity { @​Inject Foo foo;

@​Override protected void onCreate(Bundle savedInstanceState) { foo.doSomething(); // <- This will now result in an NPE since ‘foo’ hasn’t been injected yet. super.onCreate();
} }

For cases where a binding is strictly needed before super.onCreate() then the base class will have to invoke a Hilt generated method inject(). For example:

abstract class BaseActivity extends FragmentActivity {
  @Override
   protected void onCreate(Bundle savedInstanceState) {
    inject(); // <- This will force early injection.
    foo.doSomething();
    super.onCreate();    
  }
}

</tr></table>

... (truncated)

Commits
  • ae991fd 2.33 release
  • 78438d5 Update all "alpha" references to "beta" in preparation for the upcoming beta ...
  • ceccfc6 Add job to GitHub Actions to validate the Dagger version.
  • 8a4b7e2 Remove cache of top level component implementations
  • 8a92723 Fixes to javadoc and links for EarlyEntryPoint
  • 5877be8 Add internal utility method.
  • 1ad74b9 Follow-up changes to the EarlyEntryPoint API
  • 289f59f Add EarlyTestEntryPoints to allow entry points to be called in tests before t...
  • 608e6cc Remove a comment that seems to be left around from Ahead-of-time Subcomponent...
  • 73628bc Enable remaining dagger.android and dagger.hilt tests.
  • Additional commits viewable in compare view

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


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually

@dependabot dependabot bot added the bot: dependencies update PRs that update a dependency file, used by Dependabot. label Mar 16, 2021
@dependabot dependabot bot requested review from a team, AliSoftware, oguzkocer and mokagio and removed request for a team March 16, 2021 14:07
@peril-woocommerce
Copy link

peril-woocommerce bot commented Mar 16, 2021

Warnings
⚠️ PR is not assigned to a milestone.
Messages
📖

This PR contains changes in the subtree libs/login/. It is your responsibility to ensure these changes are merged back into wordpress-mobile/WordPress-Login-Flow-Android. Follow these handy steps!
WARNING: Make sure your git version is 2.19.x or lower - there is currently a bug in later versions that will corrupt the subtree history!

  1. cd woocommerce-android
  2. git checkout dependabot/gradle/daggerVersion-2.33
  3. git subtree push --prefix=libs/login/ https://github.com/wordpress-mobile/WordPress-Login-Flow-Android.git merge/woocommerce-android/3692
  4. Browse to https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/new/merge/woocommerce-android/3692 and open a new PR.

Generated by 🚫 dangerJS

@dependabot dependabot bot force-pushed the dependabot/gradle/daggerVersion-2.33 branch from 6f73222 to 27f0725 Compare March 16, 2021 14:13
@peril-woocommerce
Copy link

peril-woocommerce bot commented Mar 16, 2021

You can test the changes on this Pull Request by downloading the APK here.

mokagio
mokagio previously approved these changes Mar 17, 2021
Copy link
Contributor

@mokagio mokagio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. CI is green.

It's the first time that I see a Dependabot PR that touches the the login library.

Because of the (broken) Git subtree approach, changes done to the login library from Woo or WordPress need to be manually ported back to the source repo (e.g. see this recent PR).

Should we do this now, or wait till a new source change comes around and bring this along with it?

The composite build work will sort all of this out by letting us have the best of both world: fast feedback when editing the libraries locally and dedicated projects for each library.

@mokagio
Copy link
Contributor

mokagio commented Mar 17, 2021

Following up on my previous comment regarding manual updates to the login library, it looks like Dependabot's really onto it with at least another PR opened (and merged) to bump a dependency.

Taking that into account, I think it manually porting each update to the libraries manually would be too much overhead. I'm happy to stick to the current "whenever needed" approach. Another option could be to have a recurring task (weekly, fortnightly?) to batch-port version bumps.

Hopefully it won't be long till we implement the composite build workflow here and remove the need for this in the first place 👍

Leaving this still not merged to hear what other folks have to say.

wzieba
wzieba previously approved these changes Mar 17, 2021
Copy link
Contributor

@wzieba wzieba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it manually porting each update to the libraries manually would be too much overhead. I'm happy to stick to the current "whenever needed" approach.

True, I vote for choosing "whenever needed" approach.

Similar case (but without git subtree case) raised with #3688 and FluxC library and was discussed here: p1615911957028000-slack-C70PAM3RA We ended up merging dependency bump.

Just as a side note:

This LGTM. CI is green.

That's why I really like Dagger. Because of build-time generated code we can be quite safe - any crashes shouldn't raise in the runtime.

@dependabot dependabot bot dismissed stale reviews from wzieba and mokagio via e74b8a3 March 17, 2021 10:38
@dependabot dependabot bot force-pushed the dependabot/gradle/daggerVersion-2.33 branch from 27f0725 to e74b8a3 Compare March 17, 2021 10:38
wzieba
wzieba previously approved these changes Mar 17, 2021
Bumps `daggerVersion` from 2.29.1 to 2.33.

Updates `dagger` from 2.29.1 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](google/dagger@dagger-2.29.1...dagger-2.33)

Updates `dagger-compiler` from 2.29.1 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](google/dagger@dagger-2.29.1...dagger-2.33)

Updates `dagger-android-support` from 2.29.1 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](google/dagger@dagger-2.29.1...dagger-2.33)

Updates `dagger-android-processor` from 2.29.1 to 2.33
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](google/dagger@dagger-2.29.1...dagger-2.33)

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/gradle/daggerVersion-2.33 branch from e74b8a3 to b3c9a1c Compare March 17, 2021 15:45
@mokagio
Copy link
Contributor

mokagio commented Mar 18, 2021

Thanks for the input @wzieba!

@mokagio mokagio merged commit 4b23f56 into develop Mar 18, 2021
@mokagio mokagio deleted the dependabot/gradle/daggerVersion-2.33 branch March 18, 2021 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: dependencies update PRs that update a dependency file, used by Dependabot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow @AssistedInject objects to be injected and provided by @Provides methods
2 participants