You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, we only have documentations for individual modules and these documentations are bit isolated. To have a comprehensive view of these modules, we need a walk-through documentation so that we can learn how to build applications using Airframe starting from logging, web application development, RPC, runtime DI, building UI with Scala.js, etc. #2169
Scala 3 does not fully support runtime-reflection. Airframe is heavily using airframe-surface (e.g., Surface.of[X]) to extract type information (constructor parameters, generic types, alias, and public methods) at runtime.
We need to use split the source code folder between Scala 2 and Scala 3 if runtime-reflection package scala.runtime.universe is used.
If we rely on runtime-reflection, compiling applications using Airframe into native applications (e.g., Scala Native, GraalVM) need some tricks.
This makes difficult to use some of airframe-modules in serverless applications (e.g., AWS lambda)
The usage of runtime-reflection in Airframe is quite limited and it already can support Scala.js, so even if we only use compile-time only macros for extracting type information, there should be no major obstacles. Some redesign of Surface (or recreation as a new module) might be necessary to effectively limit the scope of Surface.
Details: How Is Surface loaded from a given class?
A notable usage of runtime-reflection in Airframe is Surface.ofClass(cl), which is used in AnyCodec for resolving Surface from a given class:
To avoid using runtime-reflection, we need a way to pre-register Surfaces of these classes that need to be serialized. An approach for providing runtime-reflection for Scala 3 can be found in https://github.com/gzoller/scala-reflection, but without a help from Scala compiler plugin, the performance for looking up type information will be quite slow.
The text was updated successfully, but these errors were encountered:
Airframe Development Roadmap for 2022 https://github.com/orgs/wvlet/projects/1
We only have three major goals for 2022: RPC, Documentation, and Scala 3.
Finalizing the RPC Framework
Airframe RPC has been battle tested and becomes comfortable enough for building production applications. It's time to standardize RPC programming, error handling, logging, etc. If you are interested see also the presentation: Unifying Frontend and Backend Application Development with Scala (ScalaCon 2021) (slides)
Better Documentation
So far, we only have documentations for individual modules and these documentations are bit isolated. To have a comprehensive view of these modules, we need a walk-through documentation so that we can learn how to build applications using Airframe starting from logging, web application development, RPC, runtime DI, building UI with Scala.js, etc. #2169
Better Scala 3 Support
Related: #1077
Scala 3 does not fully support runtime-reflection. Airframe is heavily using airframe-surface (e.g., Surface.of[X]) to extract type information (constructor parameters, generic types, alias, and public methods) at runtime.
There are several challenges:
scala.runtime.universe
is used.The usage of runtime-reflection in Airframe is quite limited and it already can support Scala.js, so even if we only use compile-time only macros for extracting type information, there should be no major obstacles. Some redesign of Surface (or recreation as a new module) might be necessary to effectively limit the scope of Surface.
Details: How Is Surface loaded from a given class?
A notable usage of runtime-reflection in Airframe is
Surface.ofClass(cl)
, which is used inAnyCodec
for resolving Surface from a given class:airframe/airframe-codec/.jvm/src/main/scala/wvlet/airframe/codec/Compat.scala
Line 52 in 038fcc9
airframe/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/RouteScanner.scala
Line 75 in cf2b371
To avoid using runtime-reflection, we need a way to pre-register Surfaces of these classes that need to be serialized. An approach for providing runtime-reflection for Scala 3 can be found in https://github.com/gzoller/scala-reflection, but without a help from Scala compiler plugin, the performance for looking up type information will be quite slow.
The text was updated successfully, but these errors were encountered: