Error about download akka proj from github and open it as a proj in intellij

26 views
Skip to first unread message

Leo Wolf

unread,
Jul 21, 2016, 4:16:55 AM7/21/16
to Akka User List
Hi,

I'm new to akka-proj. I encounter some problems about modify the akka-proj, and found you have made some pull request on it so I decide to ask you about it.
I have forked the akka-proj, download it, and open it as a project in intellij. But I found out there are lots of errors in build.sbt in every directory. For instance,

build.sbt in akka proj:


build.sbt in akka/akka-http-marshallers-scala/akka-http-spray-json/build.sbt:

And even the line of import akka._ is useless and encounter errors with AkkaBuild??


And, I create a test.scala in akka.http.scaladsl.server.Directives, but I found out I can't import akka.http.scaladsl.marshallers.sprayjson because I can't find the directory below the menu:



I'll very appreciate if you can give me some advices. Thank you for your attention to this matter.



Konrad Malawski

unread,
Jul 21, 2016, 4:25:16 AM7/21/16
to akka...@googlegroups.com, Leo Wolf
Hi Leo,
what PR are you working on?

But I found out there are lots of errors in build.sbt in every directory. For instance,

For the most part you can ignore these if intellij doesn't pick them up.

The import into intellij from sbt feature works properly.

And, I create a test.scala in akka.http.scaladsl.server.Directives, but I found out I can't import akka.http.scaladsl.marshallers.sprayjson because I can't find the directory below the menu:


"Akka-http" does not depend on "Akka-http-sprayjson", so it's not available there.
"Akka-http-sprayjson" does depend on "Akka HTTP" though, so in that project you have all you need to write your test.scala

Hope this helps

-- konrad

Leo Wolf

unread,
Jul 21, 2016, 6:46:13 AM7/21/16
to Akka User List, leo.la...@gmail.com
Hi Konrad,

Thank you for getting back to me.
I have create a scala test file under Akka-http-sprayjson and the path is "/akka/akka-http-marshallers-scala/akka-http-spray-json/src/main/scala/akka/http/scaladsl/marshallers/sprayjson/UploadHandler.scala", and package it as package akka.http.scaladsl.marshallers.sprayjson
, but some strange error shown:


But the whole same scala file in a new project using sbt to include the normal akka library , I mean something like "com.typesafe.akka" %% "akka-http-experimental" % akkaVer withSources() withJavadoc(),is OK:



And I do not really know why these errors occurred...




Konrad Malawski於 2016年7月21日星期四 UTC+8下午4時25分16秒寫道:

Leo Wolf

unread,
Jul 21, 2016, 6:48:57 AM7/21/16
to Akka User List, leo.la...@gmail.com
By the way, the error shows this message:


Very thanks for the help!



Leo Wolf於 2016年7月21日星期四 UTC+8下午6時46分13秒寫道:

Johan Andrén

unread,
Jul 23, 2016, 5:53:21 AM7/23/16
to Akka User List, leo.la...@gmail.com
Hi Leo,

What IntelliJ version and how did you open/import the Akka into IntelliJ? Make sure you have the latest as that works best, and just use Open make IntelliJ load the project.

IntelliJ doesn't quite understand the Akka build files in that it will give those red warning lines in the .sbt files because of not understanding what is available on the sbt project classpath or something like that. It should however work fine to open the project, let the IntelliJ Scala plugin do it's thing reading the sbt build into an IntelliJ project.

At some point when IntelliJ broke it's own project files I have had to close IntelliJ delete the generated .idea directory and open the project anew to make IntelliJ re-parse the sbt build, maybe this helps.

--
Johan

Leo Wolf

unread,
Jul 25, 2016, 1:59:01 AM7/25/16
to Akka User List, leo.la...@gmail.com
Hi Johan,

Thank you for your reply and the information!
Now it's correctly worked!!

Leo

Johan Andrén於 2016年7月23日星期六 UTC+8下午5時53分21秒寫道:
Reply all
Reply to author
Forward
0 new messages