FabricMC / fabric-loom

Gradle build system plugin used to automate the setup of a minecraft mod development environment.
MIT License
241 stars 211 forks source link

loom:injected_interfaces methods not visible in kotlin code, but fine in java code with jetbrains idea #931

Open hellozyemlya opened 1 year ago

hellozyemlya commented 1 year ago

Issues is self explanatory. When interface injected, its methods visible and auto-completed in java code, but not visible in kotlin code.

hellozyemlya commented 1 year ago

Just a quick update here - if I add owo lib as dependency, its interfaces resolved absolutely fine.

hellozyemlya commented 1 year ago

Also happens in project with submodules. See https://github.com/hellozyemlya/cool-resource-finder/tree/kotlin-loom-bug-repro.

https://github.com/hellozyemlya/cool-resource-finder/blob/3e99eb3efc40992f3960406890468f88c4ef8938/src/main/kotlin/hellozyemlya/resourcefinder/items/ResourceFinderCompass.kt#L29C27-L29C27 here is a call, it compiled and executed, but this is how it looks like in idea:

image

Calling same method from java - https://github.com/hellozyemlya/cool-resource-finder/blob/3e99eb3efc40992f3960406890468f88c4ef8938/src/main/java/hellozyemlya/resourcefinder/mixin/RecipeManagerMixin.java#L10

image

modmuss50 commented 11 months ago

I have no idea what could cause this, if its working fine in java then it should just work in Kotlin?