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

Update kotlin.inject to v0.6.3 #142

Merged
merged 1 commit into from
Sep 3, 2023
Merged

Update kotlin.inject to v0.6.3 #142

merged 1 commit into from
Sep 3, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 28, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
me.tatarka.inject:kotlin-inject-runtime 0.6.1 -> 0.6.3 age adoption passing confidence
me.tatarka.inject:kotlin-inject-compiler-ksp 0.6.1 -> 0.6.3 age adoption passing confidence

Release Notes

evant/kotlin-inject (me.tatarka.inject:kotlin-inject-runtime)

v0.6.3

Fixed
  • Fixed scoped assisted injection enforcement. It was incorrectly using the component scope instead of the scope of the
    assisted class or provides method.

v0.6.2

Changed
  • Updated kotlin to 1.9.0
  • If a dependency's scope is not found on the component providing it, a better error message is given.
  • Adding a @Provides annotation on an abstract fun or val will now warn that it has no effect.
  • When overriding a method the parent is checked to see if it has a @Provides annotation. This makes the example in
    the README actually work:
    @​NetworkScope abstract class NetworkComponent {
      @​NetworkScope @​Provides abstract fun api(): Api
    }  
    @​Component abstract class RealNetworkComponent : NetworkComponent() {
      // This is now treated as a @​Provides even if not annotated directly
      override fun api(): Api = RealApi()
    }
Fixed
  • Typealiases are treated as separate types in multibinding. This is consistent with other
    uses of typealiases.

    For example:

    typealias MyString = String
    
    @​Component abstract class MyComponent {
      abstract val stringItems: Set<String>
      abstract val myStringItems: Set<MyString>
    
      @&#8203;Provides @&#8203;IntoSet fun stringValue1(): String = "string"
    
      @&#8203;Provides @&#8203;IntoSet fun stringValue2(): MyString = "myString"
    }

    stringItems will contain {"string"} and myStringItems will contain {"myString"}.

  • Lambda types now work in set multibindings.

    @&#8203;Component abstract class MyComponent {
      abstract val lambdaSet: Set<() -> String>
    
      @&#8203;Provides @&#8203;IntoSet fun lambda1(): () -> String = { "one" }
    
      @&#8203;Provides @&#8203;IntoSet fun lambda2(): () -> String = { "two" }
    }
  • Assisted injection no longer works with scopes or cycles. These two cases would over-cache the instance, ignoring the
    assisted arguments. They now throw an error instead.

     // now throws cycle error when providing
    @&#8203;Inject class AssistedCycle(val factory: (Int) -> AssistedCycle, @&#8203;Assisted val arg: Int)
    // now throws error when providing
    @&#8203;MyScope @&#8203;Inject class AssistedScoped(@&#8203;Assisted val arg: Int)
  • Fixed edge case where accessing a parent scoped dependency from a lazy cycle generated invalid code.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (squash) August 28, 2023 10:45
@renovate renovate bot force-pushed the renovate/kotlin.inject branch 2 times, most recently from 9593942 to f5d56ea Compare August 30, 2023 00:36
@renovate renovate bot changed the title Update kotlin.inject to v0.6.2 Update kotlin.inject to v0.6.3 Sep 3, 2023
@renovate renovate bot merged commit 9f5269d into main Sep 3, 2023
1 check passed
@renovate renovate bot deleted the renovate/kotlin.inject branch September 3, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants