pascal-lab/Tai-e

Set up failed in IDEA community edition, but succeeded in the ultimate edition

enochii opened this issue · 4 comments

Environment: Windows 10
Idea: Community Version, 2022.2.1

When I try to set up Tai-e, I met some problems. It seems that the language feature(multi-line string, pattern matching for switch) are not supported, which confused me. Follow the instruction here, I can not find the Oracle openjdk17.

So I use openjdk 18 instead. I also try the language level as 17(Preview), 18(no new) and 18(Preview), still has errors(see below).

When I run the tests or Main class, it complains the below errors. Although the idea UI seems all right(i.e. no red line...).

I new a demo project with pattern matching switch, use the openjdk18 and 18(Preview), the program works fine. With 17 - Sealed types, ... as suggested, the idea UI has red lines, the error also suggest --enable-preview(but it is only supported in 18). Also the error here is quite different when setting up Tai-e.

image

This issue may be a little stupid... Any advide? Thanks for your time.

I can't reproduce your issue.

Maybe you can try to Invalidate Caches and restart your IDE.

image

I can't reproduce your issue.

Maybe you can try to Invalidate Caches and restart your IDE.

image

Thanks for your response! Invalidate Caches seems doesn't work. 😂 I also encounter this issue in another machine. Maybe I could try idea ultimate version later.

@enochii

Could you try the following actions ? (IDEA Ultimate Edition is better)

  1. Delete .gradle, build, .idea, buildSrc/.gradle and buildSrc/build.
  2. Restart IDEA.
  3. In Project Structure, set the SDK to Oracle OpenJdk 18, set the Language level to SDK default.

image

4. Refresh Gradle.

image

@enochii

Could you try the following actions ? (IDEA Ultimate Edition is better)

  1. Delete .gradle, build, .idea, buildSrc/.gradle and buildSrc/build.
  2. Restart IDEA.
  3. In Project Structure, set the SDK to Oracle OpenJdk 18, set the Language level to SDK default.
image
  1. Refresh Gradle.
image

@zhangt2333 Thanks for your detailed response! I try the ultimate version, it works like a charm~

Though the community idea still get the same error. Also, in community version, when I execute step 4 Refresh Gradle , the previously set language level(i.e. SDK Default) will automatically change to 8(...). So I guess this set up issue may be related to the community idea?

Thanks a lot! Have a nice day.