Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.09k stars 106 forks source link

Moved cache in message_type serializer to ConcurrentHashMap #404

Closed jbaron closed 1 year ago

jbaron commented 1 year ago

Moved cache in message_type serializer to ConcurrentHashMap to avoid concurrent modification exceptions. ConcurrentHashMap seems a good fit due to low overhead when reading from the map (which is the main purpose of a cache).

Updated both MessageTypeSerializer and DetailsLevelSerializer.

jbaron commented 1 year ago

Test were running fine on my laptop, so not sure what went wrong in the TeamCity build. I cannot access details of what went wrong, since it requires a jetbrains email account.

ileasile commented 1 year ago

Thank you for PR! Please run Reformat.. run configuration, I think there's an issue with imports order. Also, run :check instead of :test, it also checks formatting and Readme consistency. And it's actually run on TC

jbaron commented 1 year ago

@ileasile thanks for fixing it, not sure what the logic behind "Imports must be ordered in lexicographic order" exactly implies. It is clearly not as simple as alphabetically ordered.

ileasile commented 1 year ago

Yes, it's some order that our formatter respects :)