ScalaTest for IntelliJ

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

ScalaTest for IntelliJ

Felix Neutatz
Hi,

I imported the whole git repository of Flink into IntelliJ. All Java and Scala programs work and the Java unit tests as well. But Scala unit tests don't work.

I followed this tutorial: http://www.scalatest.org/user_guide/using_scalatest_with_intellij to install ScalaTest for IntelliJ, but it didn't work. I use build version: IC-139.225.3 on Ubuntu 14.04.

Attached you find pictures which show how the errors look like. Can you tell me how I can run the Scala tests?

Thank you :)

Best regards,

Felix Neutatz
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Stephan Ewen
Hey!

The dev list does not support attachments, can you put the image somewhere
else an share a link to it?


Stephan


On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <[hidden email]>
wrote:

> Hi,
>
> I imported the whole git repository of Flink into IntelliJ. All Java and
> Scala programs work and the Java unit tests as well. But Scala unit tests
> don't work.
>
> I followed this tutorial:
> http://www.scalatest.org/user_guide/using_scalatest_with_intellij to
> install ScalaTest for IntelliJ, but it didn't work. I use build
> version: IC-139.225.3 on Ubuntu 14.04.
>
> Attached you find pictures which show how the errors look like. Can you
> tell me how I can run the Scala tests?
>
> Thank you :)
>
> Best regards,
>
> Felix Neutatz
>
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Felix Neutatz
Hi,

sry, here you can find the pictures:
https://www.dropbox.com/sh/djgoncxcfs9j25i/AACCJ-VNcyz0MOGHmEPGPaYsa?dl=0

Thanks,

Felix

2014-11-28 15:02 GMT+01:00 Stephan Ewen <[hidden email]>:

> Hey!
>
> The dev list does not support attachments, can you put the image somewhere
> else an share a link to it?
>
>
> Stephan
>
>
> On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <[hidden email]>
> wrote:
>
> > Hi,
> >
> > I imported the whole git repository of Flink into IntelliJ. All Java and
> > Scala programs work and the Java unit tests as well. But Scala unit tests
> > don't work.
> >
> > I followed this tutorial:
> > http://www.scalatest.org/user_guide/using_scalatest_with_intellij to
> > install ScalaTest for IntelliJ, but it didn't work. I use build
> > version: IC-139.225.3 on Ubuntu 14.04.
> >
> > Attached you find pictures which show how the errors look like. Can you
> > tell me how I can run the Scala tests?
> >
> > Thank you :)
> >
> > Best regards,
> >
> > Felix Neutatz
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Chiwan Park
Hi, Could you run `mvn clean && mvn test` command first?
I think that there is no library for test in maven repository. After run that command, IntelliJ will be import automatically them.


Chiwan Park (Sent with iPhone)



> On Nov 28, 2014, at 11:07 PM, Felix Neutatz <[hidden email]> wrote:
>
> Hi,
>
> sry, here you can find the pictures:
> https://www.dropbox.com/sh/djgoncxcfs9j25i/AACCJ-VNcyz0MOGHmEPGPaYsa?dl=0
>
> Thanks,
>
> Felix
>
> 2014-11-28 15:02 GMT+01:00 Stephan Ewen <[hidden email]>:
>
>> Hey!
>>
>> The dev list does not support attachments, can you put the image somewhere
>> else an share a link to it?
>>
>>
>> Stephan
>>
>>
>> On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <[hidden email]>
>> wrote:
>>
>>> Hi,
>>>
>>> I imported the whole git repository of Flink into IntelliJ. All Java and
>>> Scala programs work and the Java unit tests as well. But Scala unit tests
>>> don't work.
>>>
>>> I followed this tutorial:
>>> http://www.scalatest.org/user_guide/using_scalatest_with_intellij to
>>> install ScalaTest for IntelliJ, but it didn't work. I use build
>>> version: IC-139.225.3 on Ubuntu 14.04.
>>>
>>> Attached you find pictures which show how the errors look like. Can you
>>> tell me how I can run the Scala tests?
>>>
>>> Thank you :)
>>>
>>> Best regards,
>>>
>>> Felix Neutatz
>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Felix Neutatz
Hi,
I ran `mvn clean && mvn test`. It was successful, but nothing changed in
IntelliJ.

Best regards,
Felix

2014-11-28 15:39 GMT+01:00 Chiwan Park <[hidden email]>:

> Hi, Could you run `mvn clean && mvn test` command first?
> I think that there is no library for test in maven repository. After run
> that command, IntelliJ will be import automatically them.
>
> —
> Chiwan Park (Sent with iPhone)
>
>
>
> > On Nov 28, 2014, at 11:07 PM, Felix Neutatz <[hidden email]>
> wrote:
> >
> > Hi,
> >
> > sry, here you can find the pictures:
> >
> https://www.dropbox.com/sh/djgoncxcfs9j25i/AACCJ-VNcyz0MOGHmEPGPaYsa?dl=0
> >
> > Thanks,
> >
> > Felix
> >
> > 2014-11-28 15:02 GMT+01:00 Stephan Ewen <[hidden email]>:
> >
> >> Hey!
> >>
> >> The dev list does not support attachments, can you put the image
> somewhere
> >> else an share a link to it?
> >>
> >>
> >> Stephan
> >>
> >>
> >> On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <[hidden email]>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> I imported the whole git repository of Flink into IntelliJ. All Java
> and
> >>> Scala programs work and the Java unit tests as well. But Scala unit
> tests
> >>> don't work.
> >>>
> >>> I followed this tutorial:
> >>> http://www.scalatest.org/user_guide/using_scalatest_with_intellij to
> >>> install ScalaTest for IntelliJ, but it didn't work. I use build
> >>> version: IC-139.225.3 on Ubuntu 14.04.
> >>>
> >>> Attached you find pictures which show how the errors look like. Can you
> >>> tell me how I can run the Scala tests?
> >>>
> >>> Thank you :)
> >>>
> >>> Best regards,
> >>>
> >>> Felix Neutatz
> >>>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Chiwan Park
Hi.

Could you click re-import all maven projects in IntelliJ?
http://imgur.com/lWIQaQX <http://imgur.com/lWIQaQX>

Thanks.


Chiwan Park (Sent with iPhone)



> On Nov 29, 2014, at 12:12 AM, Felix Neutatz <[hidden email]> wrote:
>
> Hi,
> I ran `mvn clean && mvn test`. It was successful, but nothing changed in
> IntelliJ.
>
> Best regards,
> Felix
>
> 2014-11-28 15:39 GMT+01:00 Chiwan Park <[hidden email]>:
>
>> Hi, Could you run `mvn clean && mvn test` command first?
>> I think that there is no library for test in maven repository. After run
>> that command, IntelliJ will be import automatically them.
>>
>> —
>> Chiwan Park (Sent with iPhone)
>>
>>
>>
>>> On Nov 28, 2014, at 11:07 PM, Felix Neutatz <[hidden email]>
>> wrote:
>>>
>>> Hi,
>>>
>>> sry, here you can find the pictures:
>>>
>> https://www.dropbox.com/sh/djgoncxcfs9j25i/AACCJ-VNcyz0MOGHmEPGPaYsa?dl=0
>>>
>>> Thanks,
>>>
>>> Felix
>>>
>>> 2014-11-28 15:02 GMT+01:00 Stephan Ewen <[hidden email]>:
>>>
>>>> Hey!
>>>>
>>>> The dev list does not support attachments, can you put the image
>> somewhere
>>>> else an share a link to it?
>>>>
>>>>
>>>> Stephan
>>>>
>>>>
>>>> On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <[hidden email]>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I imported the whole git repository of Flink into IntelliJ. All Java
>> and
>>>>> Scala programs work and the Java unit tests as well. But Scala unit
>> tests
>>>>> don't work.
>>>>>
>>>>> I followed this tutorial:
>>>>> http://www.scalatest.org/user_guide/using_scalatest_with_intellij to
>>>>> install ScalaTest for IntelliJ, but it didn't work. I use build
>>>>> version: IC-139.225.3 on Ubuntu 14.04.
>>>>>
>>>>> Attached you find pictures which show how the errors look like. Can you
>>>>> tell me how I can run the Scala tests?
>>>>>
>>>>> Thank you :)
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Felix Neutatz
>>>>>
>>>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Stephan Ewen
Hey!

I am not an IntelliJ user, but sometimes calling "mvn clean install" works
wonders in maven projects. Wild guess only, sorry...

On Fri, Nov 28, 2014 at 4:30 PM, Chiwan Park <[hidden email]> wrote:

> Hi.
>
> Could you click re-import all maven projects in IntelliJ?
> http://imgur.com/lWIQaQX <http://imgur.com/lWIQaQX>
>
> Thanks.
>
> —
> Chiwan Park (Sent with iPhone)
>
>
>
> > On Nov 29, 2014, at 12:12 AM, Felix Neutatz <[hidden email]>
> wrote:
> >
> > Hi,
> > I ran `mvn clean && mvn test`. It was successful, but nothing changed in
> > IntelliJ.
> >
> > Best regards,
> > Felix
> >
> > 2014-11-28 15:39 GMT+01:00 Chiwan Park <[hidden email]>:
> >
> >> Hi, Could you run `mvn clean && mvn test` command first?
> >> I think that there is no library for test in maven repository. After run
> >> that command, IntelliJ will be import automatically them.
> >>
> >> —
> >> Chiwan Park (Sent with iPhone)
> >>
> >>
> >>
> >>> On Nov 28, 2014, at 11:07 PM, Felix Neutatz <[hidden email]>
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> sry, here you can find the pictures:
> >>>
> >>
> https://www.dropbox.com/sh/djgoncxcfs9j25i/AACCJ-VNcyz0MOGHmEPGPaYsa?dl=0
> >>>
> >>> Thanks,
> >>>
> >>> Felix
> >>>
> >>> 2014-11-28 15:02 GMT+01:00 Stephan Ewen <[hidden email]>:
> >>>
> >>>> Hey!
> >>>>
> >>>> The dev list does not support attachments, can you put the image
> >> somewhere
> >>>> else an share a link to it?
> >>>>
> >>>>
> >>>> Stephan
> >>>>
> >>>>
> >>>> On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <
> [hidden email]>
> >>>> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I imported the whole git repository of Flink into IntelliJ. All Java
> >> and
> >>>>> Scala programs work and the Java unit tests as well. But Scala unit
> >> tests
> >>>>> don't work.
> >>>>>
> >>>>> I followed this tutorial:
> >>>>> http://www.scalatest.org/user_guide/using_scalatest_with_intellij to
> >>>>> install ScalaTest for IntelliJ, but it didn't work. I use build
> >>>>> version: IC-139.225.3 on Ubuntu 14.04.
> >>>>>
> >>>>> Attached you find pictures which show how the errors look like. Can
> you
> >>>>> tell me how I can run the Scala tests?
> >>>>>
> >>>>> Thank you :)
> >>>>>
> >>>>> Best regards,
> >>>>>
> >>>>> Felix Neutatz
> >>>>>
> >>>>
> >>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Robert Metzger
What solved my recent Scala / IntelliJ problems (which started occurring
after migrating to Intellij 14) was adding this jar
"/home/robert/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar"
on the scala compiler settings page in IntelliJ as a compiler plugin.
(And I think due to a bug in IntelliJ I have to do this import after every
restart ;) )


On Fri, Nov 28, 2014 at 5:08 PM, Stephan Ewen <[hidden email]> wrote:

> Hey!
>
> I am not an IntelliJ user, but sometimes calling "mvn clean install" works
> wonders in maven projects. Wild guess only, sorry...
>
> On Fri, Nov 28, 2014 at 4:30 PM, Chiwan Park <[hidden email]>
> wrote:
>
> > Hi.
> >
> > Could you click re-import all maven projects in IntelliJ?
> > http://imgur.com/lWIQaQX <http://imgur.com/lWIQaQX>
> >
> > Thanks.
> >
> > —
> > Chiwan Park (Sent with iPhone)
> >
> >
> >
> > > On Nov 29, 2014, at 12:12 AM, Felix Neutatz <[hidden email]>
> > wrote:
> > >
> > > Hi,
> > > I ran `mvn clean && mvn test`. It was successful, but nothing changed
> in
> > > IntelliJ.
> > >
> > > Best regards,
> > > Felix
> > >
> > > 2014-11-28 15:39 GMT+01:00 Chiwan Park <[hidden email]>:
> > >
> > >> Hi, Could you run `mvn clean && mvn test` command first?
> > >> I think that there is no library for test in maven repository. After
> run
> > >> that command, IntelliJ will be import automatically them.
> > >>
> > >> —
> > >> Chiwan Park (Sent with iPhone)
> > >>
> > >>
> > >>
> > >>> On Nov 28, 2014, at 11:07 PM, Felix Neutatz <[hidden email]>
> > >> wrote:
> > >>>
> > >>> Hi,
> > >>>
> > >>> sry, here you can find the pictures:
> > >>>
> > >>
> >
> https://www.dropbox.com/sh/djgoncxcfs9j25i/AACCJ-VNcyz0MOGHmEPGPaYsa?dl=0
> > >>>
> > >>> Thanks,
> > >>>
> > >>> Felix
> > >>>
> > >>> 2014-11-28 15:02 GMT+01:00 Stephan Ewen <[hidden email]>:
> > >>>
> > >>>> Hey!
> > >>>>
> > >>>> The dev list does not support attachments, can you put the image
> > >> somewhere
> > >>>> else an share a link to it?
> > >>>>
> > >>>>
> > >>>> Stephan
> > >>>>
> > >>>>
> > >>>> On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <
> > [hidden email]>
> > >>>> wrote:
> > >>>>
> > >>>>> Hi,
> > >>>>>
> > >>>>> I imported the whole git repository of Flink into IntelliJ. All
> Java
> > >> and
> > >>>>> Scala programs work and the Java unit tests as well. But Scala unit
> > >> tests
> > >>>>> don't work.
> > >>>>>
> > >>>>> I followed this tutorial:
> > >>>>> http://www.scalatest.org/user_guide/using_scalatest_with_intellij
> to
> > >>>>> install ScalaTest for IntelliJ, but it didn't work. I use build
> > >>>>> version: IC-139.225.3 on Ubuntu 14.04.
> > >>>>>
> > >>>>> Attached you find pictures which show how the errors look like. Can
> > you
> > >>>>> tell me how I can run the Scala tests?
> > >>>>>
> > >>>>> Thank you :)
> > >>>>>
> > >>>>> Best regards,
> > >>>>>
> > >>>>> Felix Neutatz
> > >>>>>
> > >>>>
> > >>
> > >>
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Kostas Tzoumas-2
In reply to this post by Stephan Ewen
Hey, I have not run into this issue, but something that works many times in
IntelliJ is:

- delete maven dependencies from your local maven repository
- mvn clean install
- Reimport all modules from maven in IntelliJ
- Invalidate caches and restart IntelliJ



On Fri, Nov 28, 2014 at 5:08 PM, Stephan Ewen <[hidden email]> wrote:

> Hey!
>
> I am not an IntelliJ user, but sometimes calling "mvn clean install" works
> wonders in maven projects. Wild guess only, sorry...
>
> On Fri, Nov 28, 2014 at 4:30 PM, Chiwan Park <[hidden email]>
> wrote:
>
> > Hi.
> >
> > Could you click re-import all maven projects in IntelliJ?
> > http://imgur.com/lWIQaQX <http://imgur.com/lWIQaQX>
> >
> > Thanks.
> >
> > —
> > Chiwan Park (Sent with iPhone)
> >
> >
> >
> > > On Nov 29, 2014, at 12:12 AM, Felix Neutatz <[hidden email]>
> > wrote:
> > >
> > > Hi,
> > > I ran `mvn clean && mvn test`. It was successful, but nothing changed
> in
> > > IntelliJ.
> > >
> > > Best regards,
> > > Felix
> > >
> > > 2014-11-28 15:39 GMT+01:00 Chiwan Park <[hidden email]>:
> > >
> > >> Hi, Could you run `mvn clean && mvn test` command first?
> > >> I think that there is no library for test in maven repository. After
> run
> > >> that command, IntelliJ will be import automatically them.
> > >>
> > >> —
> > >> Chiwan Park (Sent with iPhone)
> > >>
> > >>
> > >>
> > >>> On Nov 28, 2014, at 11:07 PM, Felix Neutatz <[hidden email]>
> > >> wrote:
> > >>>
> > >>> Hi,
> > >>>
> > >>> sry, here you can find the pictures:
> > >>>
> > >>
> >
> https://www.dropbox.com/sh/djgoncxcfs9j25i/AACCJ-VNcyz0MOGHmEPGPaYsa?dl=0
> > >>>
> > >>> Thanks,
> > >>>
> > >>> Felix
> > >>>
> > >>> 2014-11-28 15:02 GMT+01:00 Stephan Ewen <[hidden email]>:
> > >>>
> > >>>> Hey!
> > >>>>
> > >>>> The dev list does not support attachments, can you put the image
> > >> somewhere
> > >>>> else an share a link to it?
> > >>>>
> > >>>>
> > >>>> Stephan
> > >>>>
> > >>>>
> > >>>> On Fri, Nov 28, 2014 at 2:54 PM, Felix Neutatz <
> > [hidden email]>
> > >>>> wrote:
> > >>>>
> > >>>>> Hi,
> > >>>>>
> > >>>>> I imported the whole git repository of Flink into IntelliJ. All
> Java
> > >> and
> > >>>>> Scala programs work and the Java unit tests as well. But Scala unit
> > >> tests
> > >>>>> don't work.
> > >>>>>
> > >>>>> I followed this tutorial:
> > >>>>> http://www.scalatest.org/user_guide/using_scalatest_with_intellij
> to
> > >>>>> install ScalaTest for IntelliJ, but it didn't work. I use build
> > >>>>> version: IC-139.225.3 on Ubuntu 14.04.
> > >>>>>
> > >>>>> Attached you find pictures which show how the errors look like. Can
> > you
> > >>>>> tell me how I can run the Scala tests?
> > >>>>>
> > >>>>> Thank you :)
> > >>>>>
> > >>>>> Best regards,
> > >>>>>
> > >>>>> Felix Neutatz
> > >>>>>
> > >>>>
> > >>
> > >>
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Sean Owen
In reply to this post by Robert Metzger
Oh, that's interesting. I have also had significant problems that
sound like this. I was unable to compile Scala code due to...

Error:scalac: bad option:
-P:/Users/srowen/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar

Yes, IntelliJ adds this as an option to scalac by default. I just removed it.

I tried adding this jar file as a plugin as you say, but just see the
same error.

Did you observe the same thing, and is there more to making it work?

On Fri, Nov 28, 2014 at 4:19 PM, Robert Metzger <[hidden email]> wrote:
> What solved my recent Scala / IntelliJ problems (which started occurring
> after migrating to Intellij 14) was adding this jar
> "/home/robert/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar"
> on the scala compiler settings page in IntelliJ as a compiler plugin.
> (And I think due to a bug in IntelliJ I have to do this import after every
> restart ;) )
>
Reply | Threaded
Open this post in threaded view
|

Re: ScalaTest for IntelliJ

Ufuk Celebi-2
I've experienced the same problem a few days ago. I don't know if it is of
any help, but this is what I did:

1. I got the "bad option" -P flag error
2. I removed the flag, which resulted in problems compiling Quasiquotes
(q"..."):

Error:(118, 18) value q is not a member of StringContext
    val result = q"""
                 ^

3. I added the -Xplugin flag (Kostas' suggestion) and rebuilt the project
(Build => Rebuild Project):

-Xplugin:/Users/uce/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar

This worked for me, but it is kind of strange as I couldn't find any
documentation on the "-Xplugin" flag.

---

Another thing I've noticed is that after changing the Hadoop profile of
Flink in IntelliJ, the initial JAR was appended again (which I had to
remove again to make it work):

-Xplugin:/Users/uce/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar
-P:/Users/uce/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar

I am using IntelliJ 14.0.1