Analysis: where GraalJS / TypeScript are used, and what making them optional or removing them would take
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- java, node.js, typescript
Direzione di ricerca
Start with the module and class inventories in the issue, then trace the named Maven dependencies and Java imports, especially the TscWatcherService and its publisher handler. Compare each runtime feature with the listed Java equivalents and record remaining gaps, including platform-internal JS use. The result should be an inventory, hard coupling list, recommendation with effort estimate, and follow-up sequence; the issue calls for measured no-JS build comparisons as well.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Goal
Analyse where the platform depends on GraalJS, and with it the TypeScript toolchain. Then work out what it would take to make that dependency optional, meaning a runtime that boots without it, or to remove it entirely.
This issue is for the analysis only. Its outcome should be an inventory, a gap list, and a recommendation with an effort estimate. Implementation would follow in separate issues.
Why now
- Applications have moved to Java. Applications can now be built entirely on the Java path: AOT-compiled module jars,
@Controller/@Entity/@Scheduled/@Listener/@Websocket, and FlowableJavaDelegates. One production solution we run on 14.93.0 ships 57 module jars with 1206 compiled classes and zero.tsfiles. It still carries the whole JS stack at runtime. - Footprint. The JS stack accounts for a large part of the image size and of the memory used outside the heap. We had repeated kernel OOM kills on a 2 GiB task, see #7963.
- We plan to retire GraalJS in the near future. A fact-based map of what depends on it is the prerequisite.
What we already know (14.93.0, commit 862f6d1a3e)
Runtime artefacts (Gaia 14.93.0 image)
- The GraalJS/Truffle jars total about 68 MiB in
BOOT-INF/lib(all 25.4.4.1.1):js-language27.9 MB,icu4j18.6 MB,truffle-api17.0 MB,regex3.9 MB;- also
chromeinspector-tool,profiler-tool,truffle-runtime,polyglotand others.
- The base image also ships Node (
/usr/bin/node,npm), esbuild and tsc, with about 52 MB ofnode_modules. - The JVM is Corretto 21, which has no Graal JIT.
EngineCreatorsetsengine.WarnInterpreterOnly=false, so JS most likely runs interpreter-only.
Maven modules
- Direct GraalVM dependencies exist only in
modules/engines/engine-graalium/execution(polyglot,js-community,inspect-community) andcomponents/api/api-log. dirigible-components-engine-javascriptis a dependency of 20 modules:- api:
api-component,api-http,api-indexing,api-messaging,api-mongodb,api-net,api-platform,api-qunit,api-rabbitmq,api-security,api-template,api-test; - engine:
engine-bpm-flowable,engine-camel,engine-di,engine-jobs,engine-listeners,engine-template-javascript,engine-typescript,engine-websockets.
- api:
dirigible-components-engine-typescriptis a dependency ofgroup-enginesandide-workspace.
Java code importing org.graalvm, outside tests
engine-graalium(12 classes):ContextCreator,EngineCreator,GraalJSCodeRunner,GraalJSFileSystem,GraalJSSourceCreator,ValueTransformer,Module, theDirigibleJavascript*hooks/interceptors.engine-javascript:JavascriptEndpoint,JavascriptHandler.engine-di:ComponentMetadataRegistry,ComponentRegister,ComponentService(TypeScript decorator-based components).engine-bpm-flowable:DirigibleCallDelegate,DirigibleTaskListener(JS handlers on BPMN tasks).engine-camel:DirigibleJavaScriptInvokerImpl.engine-websockets:WebsocketProcessor.engine-template-javascript:JavascriptGenerationEngine(the IDE generators and templates).api-component:ComponentFacade.
JS/TS SDK
- 241
.js/.ts/.mjsfiles undercomponents/api/*/META-INF/dirigible. - Of these, 134 are in
api-modules-javascript, 31 inapi-utilsand 16 inapi-http.
Java equivalents that already exist in engine-java
ControllerClassConsumer,HandlerClassConsumer,ListenerClassConsumer,ScheduledClassConsumer,WebsocketClassConsumer, andEntityClassConsumerindata-store-java.
The TypeScript toolchain
TypeScriptServicetranspiles on publish with esbuild, running it as a process.TscWatcherServiceruns a long-livedtsc --watchNode process over the registry.- This shows how tightly the pieces are coupled: on 14.93.0,
DIRIGIBLE_TSC_WATCH_SERVICE_ENABLED=falseprevents the application from starting.TscWatcherServicePublisherHandleris an unconditional@Componentthat needs the conditionalTscWatcherServicebean.
Questions the analysis should answer
- Full inventory. For every artefact type and engine that executes JS/TS at runtime, list it and whether a Java equivalent exists. That covers HTTP endpoints, jobs, listeners, BPMN delegates/listeners, websockets, Camel invokers, DI components, extensions, templates/generators, tests (QUnit), security hooks and so on. Is the Java equivalent complete, partial or missing?
- Platform-internal use. Which built-in features use JS themselves, not just on behalf of user projects? For example: IDE services, generators/templates, system jobs, extension points, the
intentengine,api-*facades only reachable from JS, andapi-log. - Optional first. What would a "no-JS" runtime profile need? Excluding
engine-graalium/engine-javascript/engine-typescript(and Node/esbuild/tsc in the image) must leave a bootable app. Which beans and modules hard-depend on them today, like theTscWatcherexample above? - Removal impact.
- What breaks for existing JS/TS projects?
- Is a migration path needed (tooling, docs, a deprecation window)?
- What happens to the JS SDK (
api-modules-javascriptetc.)? - What happens to the IDE's JS/TS features: editor, debugger via
inspect-community, templates?
- Expected gains, measured. Compare the image size, boot time, heap and metaspace / native memory (NMT), and thread count of a no-JS build against the current one, on the same Java-only application.
- Risks and order of work. A suggested sequence. For example: decouple the beans (make it optional), then a no-JS profile or image variant, then deprecation, then removal. List the risks of each step.
Expected output
- An inventory table: feature / artefact → JS-only, Java available, or both → gap.
- A list of hard couplings that block an optional JS engine, each with file references.
- A recommendation (optional vs removal) with a rough effort estimate, plus follow-up issues.
- Lingua principale
- Java
- Stelle
- 278
- Fork
- 97
- Merge medio
- 17h 19m
- PR unite (30g)
- 261
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-dirigible/dirigible
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
eclipse-dirigible/dirigible#7958 ·
I maintainer di solito rispondono entro 1 giorno
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eclipse-dirigible/dirigible#7945 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#7891 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#6538 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
eclipse-dirigible/dirigible#4812 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-dirigible/dirigible
Issue simili
-
dev/release: verify-release-candidate.sh runs 0 Java tests with Debian's MavenForse già presa @kou l’ha presa oggi. ApertaType: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/arrow-adbc#4947 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
checkstyle/checkstyle#22153 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Documentation Needs Triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
frankframework/frankframework#11908 ·
I maintainer di solito rispondono entro 1 giorno