Skip to content

Conversation

@alexander-yevsyukov
Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov commented Mar 24, 2025

This PR bumps major external and local dependencies and introduce changes described in the sections below.

Changes in the routing code

  • RouteFn no longer extends Kotlin's Function2, which avoids automatic conversion of the derived types performed by the newer Kotlin compiler . The conversion caused casting problems both in production and testing code.
  • Previously deprecated EventRouting.unicast() function which accepted BiFunction was removed.
  • @FunctionalInterface annotations were removed on types extending RouteFn. This did not cause any problems with existing Java routing functions.

Other notable changes

  • Test fixtures in the server module were separated in the testFixtures source set.
  • Enabled the null-ness check in FilterMixinTest back because the generated code now supports it.
  • io.spine.server.security package was converted to Kotlin. Also, the deprecated SecurityManager Java API is no longer used.
  • Addressed warnings of nullability of generic arguments to be ? extends @Nullable Object.
  • The documentation of the @Route annotation was updated to mention generated routing setup classes.

@alexander-yevsyukov alexander-yevsyukov self-assigned this Mar 27, 2025
@alexander-yevsyukov alexander-yevsyukov changed the title Bump Kotlin and all Bump JDK, Kotlin, Gradle, and local dependencies Mar 27, 2025
@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review March 27, 2025 20:00
@codecov
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.51%. Comparing base (693dbb8) to head (1920405).
Report is 59 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1577      +/-   ##
============================================
- Coverage     90.73%   90.51%   -0.22%     
- Complexity     5008     5012       +4     
============================================
  Files           645      644       -1     
  Lines         15640    15658      +18     
  Branches        939      941       +2     
============================================
- Hits          14191    14173      -18     
- Misses         1110     1149      +39     
+ Partials        339      336       -3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

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

@alexander-yevsyukov LGTM with a minor comment.

from(sourceSets.testFixtures.get().output)
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

This line is redundant.

* @see RoutingMap
*/
internal sealed class RoutingMethod<I: Any, M: Message, C: Message, R: Any>(
internal sealed class RoutingMethod<I: Any, M: Routable, C: SignalContext, R: Any>(

Choose a reason for hiding this comment

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

Suggested change
internal sealed class RoutingMethod<I: Any, M: Routable, C: SignalContext, R: Any>(
internal sealed class RoutingMethod<I : Any, M : Routable, C : SignalContext, R : Any>(

) {
override fun self(): StateUpdateRouting<I> = this


Choose a reason for hiding this comment

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

This line looks redundant.

private const val TESTING_SERVER_PACKAGE = "io.spine.testing.server"

/**
* Throws [SecurityException] of the calling class does not belong to

Choose a reason for hiding this comment

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

Suggested change
* Throws [SecurityException] of the calling class does not belong to
* Throws [SecurityException] if the calling class does not belong to

return result
}

private fun nonAllowedCaller(callingClass: Class<*>): SecurityException {

Choose a reason for hiding this comment

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

Suggested change
private fun nonAllowedCaller(callingClass: Class<*>): SecurityException {
private fun notAllowedCaller(callingClass: Class<*>): SecurityException {

I have not seen non allowed before. You can save on braces here.

/**
* Test environment repository for {@linkplain AggregateTest
* Aggregate tests}.
* Test environment repository for Aggregate tests}.

Choose a reason for hiding this comment

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

Suggested change
* Test environment repository for Aggregate tests}.
* Test environment repository for Aggregate tests.

option java_package = "io.spine.test.server.envelope";
option java_multiple_files = true;


Choose a reason for hiding this comment

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

Redundant line.

@alexander-yevsyukov alexander-yevsyukov merged commit c574d1f into master Mar 28, 2025
6 of 7 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the bump-kotlin-and-all branch March 28, 2025 14:50
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.

4 participants