How to make changes to Akka -- IntelliJ issues

97 views
Skip to first unread message

Richard Bradley

unread,
Apr 10, 2015, 9:25:33 AM4/10/15
to akka...@googlegroups.com, Reid Spencer
Hi,

I'd like to try to make some Pull Requests to Akka to fix a few open issues that are causing me trouble (I seem to have been raising a few lately :-) https://github.com/akka/akka/issues/created_by/RichardBradley ), but I can't get the project to open in InteliJ.

Is there a guide for developers on how best to make changes to Akka, e.g. how to edit the project, how to run the tests etc? I can't see anything in the https://github.com/akka/akka/blob/master/CONTRIBUTING.md guide on those topics.

I have added my specific IntelliJ issues as a comment to Reid Spencer's IntelliJ bug at https://youtrack.jetbrains.com/issue/SCL-8233 but my issue appears slightly different to his, and that IntelliJ bug is now closed. Does anyone have any tips on how to edit Akka in IntelliJ?

(Of course I can try to make these changes without IDE support, but I find that very slow in Scala.)

Thanks,


Rich

Mathias Doenitz

unread,
Apr 10, 2015, 9:28:14 AM4/10/15
to akka...@googlegroups.com
Richard,

using the latest IDEA version plus Scala plugin I can simply “File / New / Project from existing sources”-import the project into IDEA.
Works great, no SBT plugin required anymore.

Cheers,
Mathias

---
mat...@spray.io
http://spray.io
> --
> You received this message because you are subscribed to the Google Groups "Akka Developer List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to akka-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Roland Kuhn

unread,
Apr 10, 2015, 9:30:57 AM4/10/15
to akka-dev, Reid Spencer
My (rather useless) answer would be to use Eclipse, that works fine :-) But I do know that half the core team uses IntelliJ, so it is definitely possible.

Regards,

Roland

--
You received this message because you are subscribed to the Google Groups "Akka Developer List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Reactive apps on the JVM.
twitter: @rolandkuhn


Richard Bradley

unread,
Apr 10, 2015, 9:57:54 AM4/10/15
to akka...@googlegroups.com

When I do that, the first thing that happens is a dialog asking whether to "import from external model" (i.e. SBT) or "create project from existing sources". Which did you mean?


If I do the former, I get the error discussed below.

 

If I do the latter then IJ does a process of "searching for sources", "searching for libraries", etc. etc.

If I choose the defaults throughout that process then the resulting IJ project isn't useable.

For example, I can't run any tests, and nothing compiles.

 

In the "create project from existing sources" case, the guessed structure is a bit of a mess -- I have about 100 modules, including "test1" to "test26" and "main1" to "main45", so I assume you meant to "import from external model", i.e. import from SBT?

The import from SBT fails for me at the head of "release-2.3-dev" @ 7699481c1. See my comment at https://youtrack.jetbrains.com/issue/SCL-8233 for the error, if you're interested.

 

What revision were you at when you did the SBT import?

 

I have the latest public versions of IJ and the Scala plugin (I updated this morning).

 

Thanks,

 

 

Rich

Endre Varga

unread,
Apr 10, 2015, 10:12:24 AM4/10/15
to akka...@googlegroups.com
On Fri, Apr 10, 2015 at 3:57 PM, Richard Bradley <richard.brad...@gmail.com> wrote:

When I do that, the first thing that happens is a dialog asking whether to "import from external model" (i.e. SBT) or "create project from existing sources". Which did you mean?


I always use SBT import ("import from external model - SBT"). It works for me without problems.
 


If I do the former, I get the error discussed below.

If I do the latter then IJ does a process of "searching for sources", "searching for libraries", etc. etc.

If I choose the defaults throughout that process then the resulting IJ project isn't useable.

For example, I can't run any tests, and nothing compiles.

Ok, I never tried running anything from IDE (maybe it works), I always use an interactive SBT shell on my second screen. 
 

 

In the "create project from existing sources" case, the guessed structure is a bit of a mess -- I have about 100 modules, including "test1" to "test26" and "main1" to "main45", so I assume you meant to "import from external model", i.e. import from SBT?

The import from SBT fails for me at the head of "release-2.3-dev" @ 7699481c1. See my comment at https://youtrack.jetbrains.com/issue/SCL-8233 for the error, if you're interested.

 

What revision were you at when you did the SBT import?

Different revisions actually. With the recent update to Intellij IDEA 14.1 I had to reimport. I don't know what was the revision, but I had no problem importing at that time (it was last week).

-Endre

Mathias Doenitz

unread,
Apr 10, 2015, 10:42:49 AM4/10/15
to akka...@googlegroups.com
Richard,

I just tried the following against a clean checkout of the Akka `release-2.3-dev` branch:

- File / New / Project from existing Sources
- Select checkout base directory
- Import Project from external model is selected (keep it that way)
- Click Next
- Check “Download sources and docs”
- Click “Finish”
- wait

IDEA imports everything cleanly.
It might be that I have certain artefacts in my local ivy cache that you don’t have and that IDEA has issues finding.
This is hard for me to verify.
I also haven’t checked whether IDEA can actually compile and run tests, because I usually do that in the terminal directly in SBT.

My setup:
- OS/X 10.9.5
- IDEA 14.1.0 (build 141.177) running on JRE 1.7.0_75-b13 x86_64
- Scala Plugin 1.4.15

HTH and cheers,

Richard Bradley

unread,
Apr 10, 2015, 1:41:44 PM4/10/15
to akka...@googlegroups.com
I've retried with a completely clean checkout and I've got much further this time, thanks.
I think I had a few IntelliJ config files / SBT compiled artifacts which were hidden by the ".gitignore" file.

I still have lots of compile errors, but at least I have the rough project structure open in IntelliJ and I can now try to fix the missing dependencies manually.

Will Sargent

unread,
Apr 13, 2015, 11:52:18 AM4/13/15
to akka...@googlegroups.com
You might want to try the EAP, which has better SBT support:


Import the project by deleting the .idea folder, then click on Import project, select SBT from the drop down, and DON'T click the Auto-Import checkbox -- it will prompt you manually when you change the SBT config, so there's no real advantage in it.


Will Sargent
Consultant, Professional Services
Typesafe, the company behind Play Framework, Akka and Scala

Richard Bradley

unread,
Apr 15, 2015, 11:29:50 AM4/15/15
to akka...@googlegroups.com
I've tried this on a clean checkout and IDEA can import the project, but it's fairly broken.
I'm now using the EAP plugin.

The imported libraries seem to be broken:

$ cat .idea/libraries/SBT__com_typesafe_config_*
<component name="libraryTable">
  <library name="SBT: com.typesafe:config:1.0.0:jar">
    <CLASSES />
    <JAVADOC />
    <SOURCES />
  </library>
</component><component name="libraryTable">
  <library name="SBT: com.typesafe:config:1.2.0:jar">
    <CLASSES />
    <JAVADOC />
    <SOURCES />
  </library>
</component><component name="libraryTable">
  <library name="SBT: com.typesafe:config:1.2.1:jar">
    <CLASSES />
    <JAVADOC />
    <SOURCES />
  </library>
</component>

On a working SBT imported project, these XML files would have the paths to JARs in my ~/.ivy

I'll keep poking at it and trying different things.
Reply all
Reply to author
Forward
0 new messages