You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val duplicatedIso = countries.groupingBy { it.iso }
works in ArchUnit 0.22.0 but crashes 0.23.0:
java.lang.IllegalStateException: Never found a JavaCodeUnit that matches supposed origin
CodeUnit{name='keyOf', descriptor=(Ljava/lang/Object;)Ljava/lang/Object;, declaringClassName='com.example.CountryValidator$failOnDuplicatedIso$$inlined$groupingBy$1'}
at com.tngtech.archunit.core.importer.AccessRecord$Factory.getOrigin(AccessRecord.java:325)
at com.tngtech.archunit.core.importer.AccessRecord$Factory.access$1200(AccessRecord.java:67)
at com.tngtech.archunit.core.importer.AccessRecord$Factory$10.get(AccessRecord.java:314)
at com.tngtech.archunit.core.importer.AccessRecord$Factory$10.get(AccessRecord.java:311)
at com.tngtech.archunit.thirdparty.com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167)
at com.tngtech.archunit.core.importer.AccessRecord$Factory$RawAccessRecordProcessed.getOrigin(AccessRecord.java:282)
at com.tngtech.archunit.core.importer.ClassGraphCreator.tryProcess(ClassGraphCreator.java:146)
Thanks a lot for raising the issue and in particular for taking the effort to provide a sample 😃 This is likely due to the more strict search for matching methods to disambiguate bridge methods from real methods 🤔 I guess in Kotlin there is some compiler magic that doesn't match anymore now, but I'll look into it 👍
I think I found the culprit: It seems to happen if the generic signature of the return type of a method is out of sync with the descriptor 😬 I.e. The descriptor says the return type is Object, but the signature says it's String from the generic context. I'll try to release a fix within the next couple of days...
Using 'groupingBy' in Kotlin:
works in ArchUnit 0.22.0 but crashes 0.23.0:
A project that reproduces the bug: https://github.com/pkubowicz/archunit-accessrecord-bug (see GitHub action result).
The text was updated successfully, but these errors were encountered: