Running Linkerd in Intellij 15.0.3


#1

My Intellij setup had been broken for a while, so I was surprised that it started working after I upgraded to version 15.0.3! I also did an “Invalidate Caches/Restart” for good luck :wink:

To setup, import as an sbt project and make sure the version of scala is 2.12 (as of linkerd:1.0.0):

And here’s my run configuration for the linkerd http example:

Happy debugging!


#2

I couldn’t get linkerd to load in IntellJ unless I enabled the experimental option Use SBT shell for build and import. It went pretty quickly after that though.


#3

I’m unable work on the linkerd source in Intellij. When I open the route of the source and import project, everything opens ok but if I browse a code file then it is filled with syntax errors. It seems that Intellij doesn’t know about the dependencies.

For example here is a screen shot of the LocalhostTransformerInitializer file:

You can see that Intellij doesn’t know about two of the imports:

import com.fasterxml.jackson.annotation.JsonIgnore
import com.twitter.finagle.{Path, Stack}

Hence the errors.

If I build from the command line using ./sbt as per the build.md instructions the project builds ok.

It won’t let me upload multiple screenshots so I cannot paste my project settings but they are the same as @zackangelo’s.

Any help would be greatly appreciated as this is stopping me from working on a plugin.

Thanks in advance.


#4

Hey all,

I managed to get it working. The trick was to open up the sbt window in IntelliJ and then click the refresh button. I think its a bug that Intellij doesn’t auto refresh. Wanted to post the answer in case someone else ran into this problem.


#5

Thanks for following up, @kevholditch!


#6

@zackangelo Awesome! Helped.

  • use sbt shell for build and import(experimental)
  • Max heap 2048

Tested
linkerd - 1.1.3
intelliJ - 2017
scala - 2.12

:cowboy_hat_face: