-
Notifications
You must be signed in to change notification settings - Fork 317
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
Use SnakeYAML 2.3 for YAML parsing (instead of circe) #9113
Comments
In addition to startup cost, we should also investigate independence on enso$ rm -rf jdk; ~/bin/graalvm/bin/jlink --output jdk --add-modules java.net.http,jdk.unsupported,java.sql,jdk.management,jdk.jfr; ./jdk/bin/java --list-modules
# remove Python, JavaScript, regex:
enso$ rm ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/component/python-* ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/component/js-language-24.0.0.jar ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/component/icu4j-24.0.0.jar ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/component/regex-24.0.0.jar ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/component/bc*
enso$ ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run test/Base_Tests/Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.enso.runtime/org.enso.EngineRunnerBootLoader.main(EngineRunnerBootLoader.java:46)
Caused by: java.lang.NoClassDefFoundError: java/beans/IntrospectionException
at org.yaml.snakeyaml.constructor.BaseConstructor.getPropertyUtils(BaseConstructor.java:645)
at org.yaml.snakeyaml.constructor.Constructor.<init>(Constructor.java:60)
at org.yaml.snakeyaml.Yaml.<init>(Yaml.java:82)
at io.circe.yaml.Parser.$anonfun$parseSingle$1(Parser.scala:39)
at io.circe.yaml.parser.package$.parse(package.scala:18)
at org.enso.pkg.Config$.fromYaml(Config.scala:273)
at scala.util.Using$.apply(Using.scala:113)
at org.enso.pkg.PackageManager.readConfig$1(Package.scala:340)
at org.enso.pkg.PackageManager.loadPackage(Package.scala:346)
at org.enso.runner.Main.run(Main.java:694) Isn't there some other, more modern library that would work with JavaBeans dependency? |
Looks like YamlBeans is the only alternative. |
Looks like SnakeYML is ready to run on Android and avoid usage of Note: Of course, such a configuration may require changes in upstream project to allow it, but maybe not. The construction stack is:
if we remove |
The pull request comes with a workaround around current limitations of SnakeYaml. There is a PR updating the upstream project once it is integrated we'll have to update to new version of SnakeYaml (probably 2.x). I am not sure whether |
SnakeYaml fix got merged:
Please:
|
Follow up on #8692 and a related PR.
We use a lot of
circe
which has a high startup cost upfront due to class loading. Behind the scenescirce
usesSnakeYAML
engine for YAML parsing and we could potentially cut some startup time by using it directly with Java classes (won't work with plain Scala case classes).The text was updated successfully, but these errors were encountered: