- GraalVM for JDK 23 (Latest)
- GraalVM for JDK 24 (Early Access)
- GraalVM for JDK 21
- GraalVM for JDK 17
- Archives
- Dev Build
- Truffle Language Implementation Framework
- Truffle Branches Instrumentation
- Dynamic Object Model
- Static Object Model
- Host Optimization for Interpreter Code
- Truffle Approach to Function Inlining
- Profiling Truffle Interpreters
- Truffle Interop 2.0
- Language Implementations
- Implementing a New Language with Truffle
- Truffle Native Function Interface
- Optimizing Truffle Interpreters
- Options
- On-Stack Replacement
- Truffle Strings Guide
- Specialization Histogram
- Testing DSL Specializations
- Polyglot API Based TCK
- Truffle Approach to the Compilation Queue
- Truffle Library Guide
- Truffle AOT Overview
- Truffle AOT Compilation
- Auxiliary Engine Caching
- Truffle Language Safepoint Tutorial
- Monomorphization
- Splitting Algorithm
- Monomorphization Use Cases
- Reporting Polymorphic Specializations to Runtime
Truffle DSL Warnings
Since version 23.0, Truffle DSL now produces significantly more warnings. These warnings are intended to guide the user to better DSL usage. The following sections describe how to handle and eventually suppress warnings.
All warnings of Truffle DSL can be suppressed using the -Atruffle.dsl.SuppressAllWarnings=true
option.
If a language uses strict checks where warnings are treated as errors in their CI, it is recommended to add this option to the Java compilation command line. This can be useful to avoid CI failures when Truffle DSL adds new warning messages. Adding new warning messages in Truffle DSL is considered a compatible change.
Truffle DSL warnings can be suppressed just like Java warnings using the @SuppressWarnings
annotation or with@SuppressPackageWarnings
for entire packages.
The following warning keys are supported:
all
all warnings emitted by the Java compiler or Truffle DSLtruffle
all warnings emitted by Truffle DSLtruffle-sharing
warnings when the DSL recommends sharing between cached valuestruffle-inlining
warnings when the DSL recommends using node object inlining.truffle-neverdefault
warnings for when cached initializers should be marked as never having a default value.truffle-limit
warnings when a specialization limit is recommended, but not specified.truffle-static-method
warnings when the DSL recommends to use thestatic
modifier.truffle-unused
warnings if a DSL attribute or annotation has no effect and is recommended to be removed.truffle-abstract-export
warnings if an abstract message of a Truffle library is not exported.truffle-assumption
if the assumptions feature is used with a specialization that reaches a@Fallback
specialization.truffle-guard
if a guard uses methods where a@Idempotent
or@NonIdempotent
method may be beneficial for the generated code.
Specific warnings can also be suppressed globally using the -Atruffle.dsl.SuppressWarnings=truffle-inlining,truffle-neverdefault
Java compiler processor option.
Note that also Java system properties can be used to configure the annotation processor. (e.g. by passing -J-Dtruffle.dsl.SuppressWarnings=truffle-inlining,truffle-neverdefault
to javac)
Suppressing a specific warning should be preferred over suppressing all warnings. Find the latest list of warnings in the source code