Tapir IDE support (IntelliJ)

hello, question to tapir maintainers: how are you dealing with IntelliJ being overwhelmed by the gargantuan (379033 settings, +300 subprojects) tapir codebase? I attach the screen from the IDE. Given its complexity, working on tapir code with a broken IDE is quite troublesome…

I don’t have a silver bullet advice, because I’m using metals (with neovim), but I used IDEA brielfy when I was working on performance tests recently. I guess your issues may not be related to the size of the build. Idea import via sbt should detect the “idea.managed” system property, which excludes the scala 3 projects from IDE, keeping only 2.13. Native and ScalaJS are also excluded, see the ideSkipProject setting in build.sbt. This makes the actual number of modules loaded into IDE more like 50 instead of 300.
I think your “red editor” experience is related more to build settings than the size of the project? As far as I remember, sbt shell should be enabled for builds and reloads.

@kciesielski thank you for the response. I do have the defaults

  ideSkipProject := (scalaVersion.value != ideScalaVersion) ||
    thisProjectRef.value.project.contains("Native") ||
    thisProjectRef.value.project.contains("JS"),

so Native and JS are skipped from the build. I also build with Scala 2.13, and use sbt for the builds and reloads. Still, IJ is overwhelmed :confused:

I haven’t tried it, but maybe an acceptable workaround would be to add ideSkipProject := true locally in modules you’re not interested in building?

I’m using IntelliJ, and while it’s not perfect, it’s usually working … I didn’t see problems like yours, more often what I get is that import suggestions etc. stop working and I have to restart the IDE.

FWIW, in sbt settings I’ve got “sbt shell use for: proejct reload” (not for builds, though) & maximum heap size of 8192.

1 Like