-
Notifications
You must be signed in to change notification settings - Fork 325
Closed
Labels
Description
Describe the bug
Polyglot sampler fails with Graal.js started in nashorn compatibility mode.
To Reproduce
Steps to reproduce the behavior:
- Start GraalVM JavaScript interpreter in nashorn compatibility mode (-Dpolyglot.js.nashorn-compat=true)
- run JavaScript in above GraalVM
- open GraalVM in VisualVM a go to polyglot sampler
- CPU sampling is not enabled and the following error is in the console:
Caused by: java.lang.IllegalArgumentException: Option 'js.nashorn-compat' is experimental and must be enabled with allowExperimentalOptions(). Do not use experimental options in production environments.
at com.oracle.truffle.polyglot.PolyglotEngineException.illegalArgument(PolyglotEngineException.java:122)
at com.oracle.truffle.polyglot.OptionValuesImpl.failExperimental(OptionValuesImpl.java:251)
at com.oracle.truffle.polyglot.OptionValuesImpl.findDescriptor(OptionValuesImpl.java:243)
at com.oracle.truffle.polyglot.OptionValuesImpl.put(OptionValuesImpl.java:142)
at com.oracle.truffle.polyglot.OptionValuesImpl.putAll(OptionValuesImpl.java:137)
at com.oracle.truffle.polyglot.PolyglotEngineImpl.<init>(PolyglotEngineImpl.java:261)
at com.oracle.truffle.polyglot.PolyglotEngineImpl.<init>(PolyglotEngineImpl.java:189)
at com.oracle.truffle.polyglot.PolyglotImpl.buildEngine(PolyglotImpl.java:211)
at org.graalvm.polyglot.Engine$Builder.build(Engine.java:529)
at org.graalvm.polyglot.Context$Builder.build(Context.java:1489)
at org.graalvm.polyglot.Context.create(Context.java:710)
... 12 more
Desktop (please complete the following information):
- OS: macOS
- JDK version: JDK 1.8.0_181
- Version: 2.0.2