Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Improve logging capabilities of standalone image and native image creation #177

@PhilippSalvisberg

Description

@PhilippSalvisberg

Logging

Currently the logging for the standalone image is disabled to suppress unwanted output of various components. This is a good default since the console output is usually good enough. However, to analyze the behavior it would help to support the following:

  • Configure a custom logging.conf based on java.util.logging as used by SQLDev and configured for the tests.

  • Enable Arbori debugging output (oracle.dbtools.arbori.Program.debug = true)

  • Enable Arbori timing output (oracle.dbtools.arbori.Program.timing = true)

Native Image

The current build allows to create a native image. But this image always requires a JDK since it is created with the --force-fallback option.

I've experimented with --no-fallback option with GraalVM 21.2 and had a lot of issues back then. I considered it a dead end. However, it might be possible to get this up and running with the newer versions of GraalVM and complete configuration of classes loaded via reflection and some amendments in the JavaScript code. In any case the build file should be extended that it is possible to build a --no-fallback variant of the native image, even if it is not fully working. Known issues can be documented in the pom.xml directly. A non-working image when using the --no-fallback option is OK for the time being.

This way we get a base to fix the pending issues step by step in the future.

EMCAScript 5.1 compatibility

Some JavaScript incompatibilities are visible only when running a native image created with the --no-fallback option. SQLcl and SQLDev use the Nashorn engine and therefore we must comply with the features of EMCAScript 5.1. No let, const, etc. Furthermore we have to stick to String methods available for this JavaScript version, since the support of the Nashorn compatibility in the GraalVM is limited. We can even get a step further and make the standalone image work without using the Nashorn compatibility mode. This should work at least for format.js. The Arbori callback functions will be executed with the configuration defined by SQLDev and SQLcl.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions