Skip to content

IllegalArgumentException: Option 'js.nashorn-compat' is experimental and must be enabled with allowExperimentalOptions() #210

@thurka

Description

@thurka

Describe the bug
Polyglot sampler fails with Graal.js started in nashorn compatibility mode.

To Reproduce
Steps to reproduce the behavior:

  1. Start GraalVM JavaScript interpreter in nashorn compatibility mode (-Dpolyglot.js.nashorn-compat=true)
  2. run JavaScript in above GraalVM
  3. open GraalVM in VisualVM a go to polyglot sampler
  4. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions