Skip to content

Commit

Permalink
Update kotlin.inject to v0.6.3 (#142)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[me.tatarka.inject:kotlin-inject-runtime](https://togithub.com/evant/kotlin-inject)
| `0.6.1` -> `0.6.3` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/me.tatarka.inject:kotlin-inject-runtime/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/me.tatarka.inject:kotlin-inject-runtime/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/me.tatarka.inject:kotlin-inject-runtime/0.6.1/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/me.tatarka.inject:kotlin-inject-runtime/0.6.1/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[me.tatarka.inject:kotlin-inject-compiler-ksp](https://togithub.com/evant/kotlin-inject)
| `0.6.1` -> `0.6.3` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/me.tatarka.inject:kotlin-inject-compiler-ksp/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/me.tatarka.inject:kotlin-inject-compiler-ksp/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/me.tatarka.inject:kotlin-inject-compiler-ksp/0.6.1/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/me.tatarka.inject:kotlin-inject-compiler-ksp/0.6.1/0.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>evant/kotlin-inject
(me.tatarka.inject:kotlin-inject-runtime)</summary>

###
[`v0.6.3`](https://togithub.com/evant/kotlin-inject/blob/HEAD/CHANGELOG.md#063-2023-09-02)

##### 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`](https://togithub.com/evant/kotlin-inject/blob/HEAD/CHANGELOG.md#062-2023-08-28)

##### 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:
    ```kotlin
    @&#8203;NetworkScope abstract class NetworkComponent {
      @&#8203;NetworkScope @&#8203;Provides abstract fun api(): Api
    }  
@&#8203;Component abstract class RealNetworkComponent :
NetworkComponent() {
// This is now treated as a @&#8203;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:

    ```kotlin
    typealias MyString = String

    @&#8203;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.
    ```kotlin
    @&#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.
    ```kotlin
     // 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.

</details>

---

### 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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/julioromano/mooviez).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi42NC44IiwidXBkYXRlZEluVmVyIjoiMzYuNjguMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored Sep 3, 2023
1 parent c342867 commit 9f5269d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ coil = "2.4.0"
google-accompanist = "0.30.1"
google-glance-tooling = "0.2.2"
kotlin = "1.9.10"
kotlin-inject = "0.6.1"
kotlin-inject = "0.6.3"
kotlinx-coroutines = "1.7.3"
kotlinx-serialization = "1.6.0"
plugin-android = "8.1.1"
Expand Down

0 comments on commit 9f5269d

Please sign in to comment.