Hi, Junit5 team is encountering a weird issue wher...
# compiler
j
Hi, Junit5 team is encountering a weird issue where, in the face of 30+ overloads for a method, there seems to be a weird case where the Kotlin compiler generates a completely invalid call. We are looking at the bytecode and the compiler generates a call to the following method that doesn't exist:
Copy code
org/junit/jupiter/api/Assertions.assertEquals:(ILjava/lang/Integer;)V
https://github.com/junit-team/junit5/issues/1859
d
It would be highly appreciated if you could provide some kind of reproduction, even if it’s not quite minimal. I wasn’t able to deep dive into details, but a few notes: - such JVM signature is valid and denotes a method with signature like
void assertEquals(int, Integer)
- such method actually exists in
junit-jupiter-api-5.4.1
, but doesn’t in
junit-jupiter-api-5.3.2
- hence I would re-check compile/runtime classpaths in build where such exception arises Once again, I could miss something, so if you’ll find a reproduction, feel free to submit an issue to kotl.in/issue
j
@dsavvinov Supposedly the example (that is absolutely not minimalistic) can be found here. https://github.com/micromata/projectforge/blob/PROJECTFORGE-3614-ReactJS/projectforge-jax-rs/src/test/kotlin/org/projectforge/rest/json/JsonValidatorTest.kt#L27 I'll see if someone from the Junit 5 team can create a minimal viable reproduction.
d
Yes, it would be very nice to have a reproduction without complicated build environment involved, to rule out classpath-hell.
j
Hahah. Can't blame you there. This isn't my bug, I'm just the messenger. I'll try to get something smaller before reporting officially.
🙏 1
👍 1
@dsavvinov According to sormuras, he's unable to create a MVR. Do you have a Github username so I can CC you on the conversation there?
d
It’s the same as here,
@dsavvinov
(https://github.com/dsavvinov)
j
Looks like you either need to subscribe or comment to get notifications.
@dsavvinov Thanks for figuring that out!