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

Using new Scala 3 language features #682

Merged
merged 11 commits into from
May 4, 2024
Merged

Using new Scala 3 language features #682

merged 11 commits into from
May 4, 2024

Conversation

alexklibisz
Copy link
Owner

@alexklibisz alexklibisz commented Apr 28, 2024

Related Issue

#393

Changes

  • using enum where possible
  • using using where possible
  • using given where possible. I had to keep using implicit val and implicit def in several places because given seems to invoke the scala 3 lazy val implementation, which invokes sun.misc.unsafe, which requires extra security permissions in Elasticsearch. This is covered in Runtime code implementing lazy val should not use sun.misc.Unsafe on Java 9+ (JEP-471) scala/scala3#9013 and it's a variant of same issue I encountered in Dependencies: Upgrade Scala to 3.3.3 #653
  • using Conversion where possible.
  • removed a couple minor unused/unnecessary things: a trait that we were no longer using, and a Try wrapper in several places that just ends up using .get, a type check that was getting called for every iteration of a while loop.

Testing and Validation

Standard CI and benchmarking

@alexklibisz alexklibisz marked this pull request as ready for review May 4, 2024 14:21
@alexklibisz alexklibisz merged commit 705749d into main May 4, 2024
5 checks passed
@alexklibisz alexklibisz deleted the use-scala3-features branch May 4, 2024 14:22
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.

1 participant