https://kotlinlang.org logo
#eap
Title
# eap
r

Rick Clephas

11/16/2023, 2:32 PM
Anyone know why classic frontend diagnostics tests are no longer working in 2.0.0-Beta1? Some kind of new config that I am missing?
d

dmitriy.novozhilov

11/16/2023, 2:35 PM
What do you mean by "no longer working"?
r

Rick Clephas

11/16/2023, 2:36 PM
All tests are failing in 2.0.0-Beta1. None of the diagnostics are present in the output.
image.png
d

dmitriy.novozhilov

11/16/2023, 2:38 PM
We still use them in master, so nothing wasn't broken intentionally Some stack trace maybe helpful
There recently was change about handling klibs for classic frontend facade It may be relevant
🙏🏻 1
r

Rick Clephas

11/16/2023, 2:45 PM
Yeah I noticed similar tests in master (that haven’t changed much since I based my tests on them). A stack trace in case it points to any obvious issues:
d

dmitriy.novozhilov

11/16/2023, 2:47 PM
@dmitriy.dolovov Could you help with it?
r

Rick Clephas

11/16/2023, 3:11 PM
Found another change related to DiagnosticsNativeTests and stdlib. Not sure why it’s needed/what it’s supposed to do, but adding that
LibraryProvider
and the
WITH_STDLIB
directive solved it.
👍 1
👀 1
FYI the stack trace mentions a
NoSuchElementException
at
ClassicFrontendFacade.kt:554
, not sure about the line number (554 doesn’t exist), but it seems that with this change stdlib is now required for all tests using the
ClassicFrontendFacade
.
Not really an issue to include stdlib, though for the native environment that requires
kotlin.internal.native.test.nativeHome
to be set (which I am currently getting from
NativeCompilerDownloader
). I guess that is to be expected as I am using the internal test framework 😁.
d

dmitriy.novozhilov

11/16/2023, 3:36 PM
Yeah, native is much more internal than other internals
👍🏻 1
v

Vladimir Sukharev

11/17/2023, 7:58 AM
@Rick Clephas Hi, yes, you found a recent fix of ClassicFrontendFacade to use native stdlib instead of common stdlib. Without fix, native diagnostic test without
// WITH_STDLIB
used common stdlib and did not see
public final /*synthesized*/ val entries: kotlin.enums.EnumEntries<T>
in enums, which are unique to native stdlib. It can be seen in lines like https://github.com/JetBrains/kotlin/commit/8f03eb931467f375d1428c5b73196bf015892f54#diff-754bc0f20ca136f2868b92a96101339637ad779f805581b49edc88f8a9461468R53 So,
WITH_STDLIB
directive was permanently set, and native stdlib proper lookup now is needed for all native tests Before fix, common stdlib was used, which did not have
enumEntries
property (I guess this https://github.com/JetBrains/kotlin/blob/1564f2c549bbdff361c02f71aa128e06274336ce/core/builtins/native/kotlin/Enum.kt#L13) and now native stdlib is used, which has the property https://github.com/JetBrains/kotlin/blob/64fd4ac510f56f1d5480a1631849c1852a689d5a/kotlin-native/runtime/src/main/kotlin/kotlin/Enum.kt#L44
thank you color 1
👍🏻 1
2 Views