Anyone know why classic frontend <diagnostics test...
# eap
r
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?
1
d
What do you mean by "no longer working"?
r
All tests are failing in 2.0.0-Beta1. None of the diagnostics are present in the output.
image.png
d
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
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.dolovov Could you help with it?
r
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
Yeah, native is much more internal than other internals
👍🏻 1
v
@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