-
Notifications
You must be signed in to change notification settings - Fork 99
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
Kotlin IntelliJ plugin crashes on StatefulWorkflow and action builder #100
Comments
Verified this still occurs with plugin version |
Posted about this issue in the Kotlin Slack's |
We just heard from a contact at JetBrains that they're aware of this issue and considering how to prioritize it. There's maybe even a small chance it could be fixed in 1.3.70, but no guarantees. |
A related issue, https://youtrack.jetbrains.com/issue/KT-34759, has been marked as Fixed. Our issue, https://youtrack.jetbrains.com/issue/KT-34524, is still In Progress. |
Our issue (https://youtrack.jetbrains.com/issue/KT-34524) has had its Target versions updated to 1.4-M2. Unfortunately, this means we won't see a fix probably at least for a couple months. However, it does mean that it's likely being actively worked on and so there's not much point in us trying to solve it ourselves. |
After an offline conversation w/Zach, going to see if changing |
One of the differences between Given the timing of this bug, I'll bet you anything that this mismatch is related. |
I'm playing with dropping |
Dropping in and out didn't change anything. |
Wellllll… This change does indeed fix the IDE. There are issues.
override fun render(
props: Unit,
context: StatefulWorkflow<Unit, Unit, Nothing, Unit>.RenderContext
) {
|
Looking at our internal stats, |
If we go this route, I think we should just define a different context type for |
That makes a lot of sense. Winds up being a net usability win. |
But we'll wind up needing two implementations of Maybe there's a base context type they can share, and then the inner classes are little facades with the two workflow base classes. abstract class AbstractRenderContext<P, S, O> { ... }
abstract class StatefulWorkflow<P, S, O, R>() : Workflow<P, O , R> {
inner class RenderContext : AbstractRenderContext<P, S, O> { ... }
}
class StatefulRenderTester <P, S, O, R>: AbstractRenderContext<P, S, O> { }
abstract class StatelessWorkflow<P, O, R>() : Workflow<P, Unit, O , R> {
inner class RenderContext : AbstractRenderContext<P, Unit, Nothing> { ... }
}
class StatelessRenderTester <P, O, R>: AbstractRenderContext<P, Unit, O> { } |
That's not right, but you get the idea. |
Yea, something like that. I'm not too worried about exploding the number of |
Good news, upgrading Android Studio to Kotlin plugin 1.4-M1 seems to fix the issue in our repro project (https://github.com/zach-klippenstein/repro-KT-34524). The kotlin file is parsed, the |
1.4-M1 didn't fix for everyone. But latest comms from Jetbrains is that it's been fixed in M3. I'll mark as blocked until then and leave it open, but there's no action items on our part. I will remove from the 1.0.0 milestone as well. |
One report that plugin 1.4-M3 has fixed this issue in AS 4.0 (internal message). |
There is a bug in the plugin that crashes the parser when it encounters
action
. @kirillzh filed JetBrains an issue about it.I've created a minimal Android Studio project that demonstrates this bug: https://github.com/zach-klippenstein/repro-KT-34524
Open the project in Android Studio and open the file
app/src/main/java/com/example/kt_34524repro/SampleWorkflow.kt
to see the bug in action.There are a few other issues that look to be related or duplicates:
The text was updated successfully, but these errors were encountered: