Using idk.incubator.vector in debugger type renderer says package idk.incubator.vector is not visible

已回答

I'm playing around with the new vector module in JDK 20. This is a preview feature and is not visible by default. My module includes the correct dependency and so builds and runs without any problem. I'd like to add a type renderer to the debugger for ByteVector. I have added the necessary expression which refers to the class ByteVector. When the debugger tries to display a ByteVector using my renderer, instead of the expected value the IDE shows

Unable to evaluate the expression Compilation failed: package jdk.incubator.vector is not visible
  (package jdk.incubator.vector is declared in module jdk.incubator.vector, which is not in the module graph)

My guess is that my renderer expression is executed in IntelliJ's Java environment, not the one where my code is executed. This would make sense. How do I get IntelliJ to add idk.incubator.vector to its module dependencies? Or rather how do I make this work? Unsurprisingly my renderer expression depends on the type being rendered so there ought to be a way to make it work.

0

Could you please share the following information:
- which version of IDEA do you use?
- which language level do you have for project and for module?
- please share a sample code or a project if possible

0

请先登录再写评论。