Skip to content

Conversation

@hanslovsky
Copy link
Member

@hanslovsky hanslovsky commented Dec 27, 2020

This PR fixes the Kotlin scripting engine and re-implements in Kotlin while at it. The major issues were

  1. The Kotlin script engine is not thread-safe and would be in an unrecoverable state after failure. Fixed by wrapping in an engine that synchronizes all calls.
  2. The Kotlin script engine does not use bindings in a useful way. Fixed by updating Kotlin version. Required a few changes to pom.xml.

Status:

@hanslovsky
Copy link
Member Author

I was able to get the unit tests to work on the command line. The issue was the surefire plugin that would use a manifest-only jar that would contain the classpath. For some reason, the order in which the jars were listed in that manifest-only jar caused the issues described in the Kotlin Discourse linked in the initial PR comment. I was able to fix this issue by setting

<properties>
	<surefire.useManifestOnlyJar>false</surefire.useManifestOnlyJar>
</properties>

For more details on that surefire property, see

mvn surefire:help -Ddetail=true

@ctrueden
Copy link
Member

ctrueden commented Mar 8, 2021

Thanks a lot, @hanslovsky! 🍻

@ctrueden ctrueden merged commit 29c1941 into master Mar 8, 2021
@ctrueden ctrueden deleted the fix-kotlin-engine branch March 8, 2021 19:23
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