Closed spring-projects-issues closed 6 years ago
Mark Paluch commented
We're using Kotlin internals to determine whether a particular class type is supported or not. In particular, we only support regular classes (no facades/SAM classes/multi-file classes). This check is required as unsupported classes cause exceptions within Kotlin libraries so we're basically guarding all code from Kotlin bugs.
Kotlin changed its internals and moved around packages
Mark Paluch commented
Moved to Spring Data Commons and changed this ticket to a task adopting to Kotlin 1.2.20
Mark Paluch commented
I pushed a change to the DATACMNS-1245 branch that picks up Kotlin's changes. Care to give 2.1.0.DATACMNS-1245-SNAPSHOT
a spin?
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>2.1.0.DATACMNS-1245-SNAPSHOT</version>
</dependency>
<repository>
<id>spring-libs-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/libs-snapshot</url>
</repository>
Juergen Zimmermann commented
The issue is gone after I added org.springframework.data:spring-data-commons:2.1.0.DATACMNS-1245-SNAPSHOT
in build.gradle
Mark Paluch commented
Changed the pull request to evaluate Kotlin's @Metadata
annotation after feedback from Jetbrains
Juergen Zimmermann commented
@mp911de
What is the implication after your PR is declined? Can I test something different?
Mark Paluch commented
No worries, the PR isn't declined, the code is merged. GitHub expects the same commit hash in the target branch to consider a pull request merged. We use cherry-picking to bring our commits from a feature branch into master
and service-release branches. That said, you can use 2.0.3 and 2.1.0 snapshots that already contain the fix
Juergen Zimmermann opened DATACMNS-1245 and commented
After upgrading from Kotlin 1.2.10 to 1.2.20 I'm getting the error log below. My own class DbConfig (because of TLS connection w/ MongoDB) is derived from
org.springframework.data.mongodb.config.AbstractMongoConfiguration
, and just inheritsmappingMongoConverter()
which invokesorg.springframework.data.mongodb.config.MongoConfigurationSupport.mongoMappingContext()
. I'll attach my own files DbConfig.kt and DbReactiveConfig.kt.The error log:
Affects: 2.0.2 (Kay SR2)
Attachments:
Referenced from: pull request https://github.com/spring-projects/spring-data-commons/pull/269
Backported to: 2.0.3 (Kay SR3)
1 votes, 4 watchers