Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATAMONGO-1689 Add Kotlin extensions for [Reactive]MongoOperations. #463

Closed
wants to merge 5 commits into from

Conversation

sdeleuze
Copy link
Contributor

No description provided.

@@ -230,13 +231,93 @@
<artifactId>spring-webmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be optional dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I will change that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on the need for this quite significant change in the compile settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be the recommanded way to handle Kotlin + Java Maven builds.

JetBrains explantation is the following:

To compile mixed code applications Kotlin compiler should be invoked before Java compiler. In maven terms that means kotlin-maven-plugin should be run before maven-compiler-plugin using the following method, making sure that the kotlin plugin is above the maven-compiler-plugin in your pom.xml file.

@sdeleuze
Copy link
Contributor Author

Another thing we could do is to provide extensions with alternative function names to in and is which are Kotlin reserved keywords and currently need to be escaped.

We should also update the @since version which was set by mistake to 5.0 instead of 2.0.

@sdeleuze
Copy link
Contributor Author

sdeleuze commented Jun 13, 2017

I will send an updated version of this PR tomorrow with the following changes:

  • Fluent alternative for MongoOperations extensions (cc @christophstrobl @mp911de)
  • @since 2.0
  • Removal of KClass based variants and keep only reified type parameter variant as explained on SPR-15660

Could we consider inclusion in master when I will have pushed this updated PR?

@christophstrobl
Copy link
Member

@sdeleuze I already started working on integrating Kotlin in this branch (https://github.com/spring-projects/spring-data-mongodb/tree/issue/DATAMONGO-1689).
I also extracted the plugin part (see spring-projects/spring-data-build#370).

@sdeleuze
Copy link
Contributor Author

Ok thanks I will send the update against your branch and will answer on the spring-data-build side.

@odrotbohm
Copy link
Member

Given the short amount of time before the M4 release tomorrow, I'd love to keep the build changes in this module for now.

@sdeleuze do you think you can get your changes in tonight or early tomorrow morning CET?

christophstrobl and others added 3 commits June 14, 2017 14:57
We now offer dedicated Kotlin extensions for MongoOperations and ReactiveMongoOperations.
Remove Kotlin specifics from pom.xml as those are managed in spring-data-build.
Additionally format code, update license header, update JavaDoc and add issue reference to tests.
Bring back Maven Kotlin configuration for now + documentation fixes.
odrotbohm pushed a commit that referenced this pull request Jun 14, 2017
We now offer dedicated Kotlin extensions for MongoOperations and ReactiveMongoOperations.

Original pull request: #463.
odrotbohm pushed a commit that referenced this pull request Jun 14, 2017
Additionally format code, update license header, update JavaDoc and add issue reference to tests.

Original pull request: #463.
odrotbohm pushed a commit that referenced this pull request Jun 14, 2017
Improve Maven Kotlin configuration for now + documentation fixes.

Original pull request: #463.
odrotbohm pushed a commit that referenced this pull request Jun 14, 2017
odrotbohm added a commit that referenced this pull request Jun 14, 2017
odrotbohm added a commit that referenced this pull request Jun 14, 2017
@odrotbohm odrotbohm closed this Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants