You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a Kotlin Multiplatform project that targets JS, a Wire generated class shows this error in its constructor: JavaScript name hashCode is generated for different inherited members: var hashCode: Int and fun hashCode(): Int.
Setting buildersOnly = true in the plugin configuration (as shown in Wire's js sample) still gives the same error.
Fortunately, the build is not broken by that error and the class can still be used without problems, but since I noticed it I thought it was worth reporting it.
Maybe this is a duplicate of #1424, but that issue doesn't have any progress and it is inactive since 2020.
Reproduction Steps
Create a new Kotlin Multiplatform project with the Android Studio "New project..." wizard
Add js as one of the targets
Add wire gradle plugin and wire-runtime dependency and add the wire configuration block in the build.gradle.kts file
Create a simple .proto file in commonMain/proto, mine is:
NOTE: if the error doesn't show up, go to "File -> Invalidate Caches...", check all the checkboxes and press "Invalidate and Restart", then resync and rebuild the project
Environment
IDE: Android Studio Jellyfish | 2023.3.1
Kotlin Version: 1.9.24
Wire Version: both 4.9.9 and 5.0.0-alpha01 (I didn't test older versions)
The text was updated successfully, but these errors were encountered:
A possible solution could be to rename that property to something like internalHashcode (or cachedHashCode as in the annotation) and at that point the error should be gone and the annotation won't even be needed anymore. But again, since I don't know wire's internals and therefore the implications this little refactor could have, maybe this solution isn't feasible.
In a Kotlin Multiplatform project that targets JS, a Wire generated class shows this error in its constructor:
JavaScript name hashCode is generated for different inherited members: var hashCode: Int and fun hashCode(): Int
.Setting
buildersOnly = true
in the plugin configuration (as shown in Wire's js sample) still gives the same error.Fortunately, the build is not broken by that error and the class can still be used without problems, but since I noticed it I thought it was worth reporting it.
Maybe this is a duplicate of #1424, but that issue doesn't have any progress and it is inactive since 2020.
Reproduction Steps
js
as one of the targetswire
gradle plugin andwire-runtime
dependency and add thewire
configuration block in thebuild.gradle.kts
file.proto
file incommonMain/proto
, mine is:Environment
IDE: Android Studio Jellyfish | 2023.3.1
Kotlin Version:
1.9.24
Wire Version: both
4.9.9
and5.0.0-alpha01
(I didn't test older versions)The text was updated successfully, but these errors were encountered: