Hi devs,
Yesterday, I updated the master code which include [FLINK-7030]: Build with scala-2.11 by default. After that, I entered a strange problem with IDEA that many classes can't be found, and the project can't be built/compiled (in IDEA), but maven install worked good. After a series of attempts, I found that IDEA activate the scala-2.10 profile by default which result in this problem. After deactivate scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate "scala-2.10" profile, and every works good again. I share this tip in the dev list, because a lot of my colleagues have the same issues, and maybe many other Flink devs have the same problem too. BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a IDEA bug or the wrong profile setting somewhere. Regards, Jark Wu |
Looks like the picture didn't go thru.
Mind using third party site ? Thanks On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: > Hi devs, > > Yesterday, I updated the master code which include [FLINK-7030]: Build > with scala-2.11 by default. After that, I entered a strange problem with > IDEA that many classes can't be found, and the project can't be > built/compiled (in IDEA), but maven install worked good. > > After a series of attempts, I found that IDEA activate the scala-2.10 > profile by default which result in this problem. After deactivate > scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate > "scala-2.10" profile, and every works good again. > > [image: 内嵌图片 1] > > I share this tip in the dev list, because a lot of my colleagues have the > same issues, and maybe many other Flink devs have the same problem too. > > BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a > IDEA bug or the wrong profile setting somewhere. > > > Regards, > Jark Wu > |
Thanks for the hint!
> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: > > Looks like the picture didn't go thru. > > Mind using third party site ? > > Thanks > > On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: > >> Hi devs, >> >> Yesterday, I updated the master code which include [FLINK-7030]: Build >> with scala-2.11 by default. After that, I entered a strange problem with >> IDEA that many classes can't be found, and the project can't be >> built/compiled (in IDEA), but maven install worked good. >> >> After a series of attempts, I found that IDEA activate the scala-2.10 >> profile by default which result in this problem. After deactivate >> scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate >> "scala-2.10" profile, and every works good again. >> >> [image: 内嵌图片 1] >> >> I share this tip in the dev list, because a lot of my colleagues have the >> same issues, and maybe many other Flink devs have the same problem too. >> >> BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a >> IDEA bug or the wrong profile setting somewhere. >> >> >> Regards, >> Jark Wu >> |
In reply to this post by Jark Wu
+1
Meet the same problem. I have tried reimporting the maven project but have no effect. From: Jark Wu <[hidden email]> Reply-To: "[hidden email]" <[hidden email]> Date: Tuesday, July 4, 2017 at 11:56 To: "[hidden email]" <[hidden email]> Subject: [外部邮件] Tips to fix IDEA strange problem after updating master code Hi devs, Yesterday, I updated the master code which include [FLINK-7030]: Build with scala-2.11 by default. After that, I entered a strange problem with IDEA that many classes can't be found, and the project can't be built/compiled (in IDEA), but maven install worked good. After a series of attempts, I found that IDEA activate the scala-2.10 profile by default which result in this problem. After deactivate scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate "scala-2.10" profile, and every works good again. [嵌图片 1] I share this tip in the dev list, because a lot of my colleagues have the same issues, and maybe many other Flink devs have the same problem too. BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a IDEA bug or the wrong profile setting somewhere. Regards, Jark Wu |
In reply to this post by Aljoscha Krettek-2
Besides deactivating “scala-2.10” profile in the Intellij it might be necessary to:
- reimport maven project: 1. Right click on root module: “flink-parent” 2. Maven 3. reimport - invalidate caches and restart: File -> Invalidate caches and restart -> invalidate /restart - rebuild whole project I suspect that either activation of scala-2.10 by default comes from flink-scala and flick-scala-shell poms or it’s an artifact because you created/imported Intellij project when 2.10 was the default. If the first option is true, this PR: https://github.com/apache/flink/pull/4240 <https://github.com/apache/flink/pull/4240> might fix this issue. Another quirk that I encauntered is the compile error about ILoopCompat class being defined twice in Intellij (works fine from console). This comes from flink-scala-shell/pom.xml, which defines two different source paths depending on Scala version: <source>src/main/scala-${scala.binary.version}</source> Such thing is not supported by Intellij and one have to manually remove one of the source directory (either 2.11 or 2.10) from the project settings. Piotrek > On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> wrote: > > Thanks for the hint! > >> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: >> >> Looks like the picture didn't go thru. >> >> Mind using third party site ? >> >> Thanks >> >> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: >> >>> Hi devs, >>> >>> Yesterday, I updated the master code which include [FLINK-7030]: Build >>> with scala-2.11 by default. After that, I entered a strange problem with >>> IDEA that many classes can't be found, and the project can't be >>> built/compiled (in IDEA), but maven install worked good. >>> >>> After a series of attempts, I found that IDEA activate the scala-2.10 >>> profile by default which result in this problem. After deactivate >>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate >>> "scala-2.10" profile, and every works good again. >>> >>> [image: 内嵌图片 1] >>> >>> I share this tip in the dev list, because a lot of my colleagues have the >>> same issues, and maybe many other Flink devs have the same problem too. >>> >>> BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a >>> IDEA bug or the wrong profile setting somewhere. >>> >>> >>> Regards, >>> Jark Wu >>> > |
In reply to this post by Jark Wu
I have done all these but still got some issue in IDEA, especially in the flink-connector project.
---- On 7/4/17, 15:57, "Piotr Nowojski" <[hidden email]> wrote: Besides deactivating “scala-2.10” profile in the Intellij it might be necessary to: - reimport maven project: 1. Right click on root module: “flink-parent” 2. Maven 3. reimport - invalidate caches and restart: File -> Invalidate caches and restart -> invalidate /restart - rebuild whole project I suspect that either activation of scala-2.10 by default comes from flink-scala and flick-scala-shell poms or it’s an artifact because you created/imported Intellij project when 2.10 was the default. If the first option is true, this PR: https://github.com/apache/flink/pull/4240 <https://github.com/apache/flink/pull/4240> might fix this issue. Another quirk that I encauntered is the compile error about ILoopCompat class being defined twice in Intellij (works fine from console). This comes from flink-scala-shell/pom.xml, which defines two different source paths depending on Scala version: <source>src/main/scala-${scala.binary.version}</source> Such thing is not supported by Intellij and one have to manually remove one of the source directory (either 2.11 or 2.10) from the project settings. Piotrek > On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> wrote: > > Thanks for the hint! > >> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: >> >> Looks like the picture didn't go thru. >> >> Mind using third party site ? >> >> Thanks >> >> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: >> >>> Hi devs, >>> >>> Yesterday, I updated the master code which include [FLINK-7030]: Build >>> with scala-2.11 by default. After that, I entered a strange problem with >>> IDEA that many classes can't be found, and the project can't be >>> built/compiled (in IDEA), but maven install worked good. >>> >>> After a series of attempts, I found that IDEA activate the scala-2.10 >>> profile by default which result in this problem. After deactivate >>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate >>> "scala-2.10" profile, and every works good again. >>> >>> [image: 内嵌图片 1] >>> >>> I share this tip in the dev list, because a lot of my colleagues have the >>> same issues, and maybe many other Flink devs have the same problem too. >>> >>> BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a >>> IDEA bug or the wrong profile setting somewhere. >>> >>> >>> Regards, >>> Jark Wu >>> > |
Maybe try
$ mvn clean Before reimporting and restarting/invalidating caches in IntelliJ? Did you deactivate scala-2.10 profile in the IntelliJ? Piotrek > On Jul 4, 2017, at 11:05 AM, 郭健 <[hidden email]> wrote: > > I have done all these but still got some issue in IDEA, especially in the flink-connector project. > ---- > > On 7/4/17, 15:57, "Piotr Nowojski" <[hidden email]> wrote: > > Besides deactivating “scala-2.10” profile in the Intellij it might be necessary to: > - reimport maven project: > 1. Right click on root module: “flink-parent” > 2. Maven > 3. reimport > - invalidate caches and restart: File -> Invalidate caches and restart -> invalidate /restart > - rebuild whole project > > I suspect that either activation of scala-2.10 by default comes from flink-scala and flick-scala-shell poms or it’s an artifact because you created/imported Intellij project when 2.10 was the default. If the first option is true, this PR: https://github.com/apache/flink/pull/4240 <https://github.com/apache/flink/pull/4240> might fix this issue. > > > Another quirk that I encauntered is the compile error about ILoopCompat class being defined twice in Intellij (works fine from console). This comes from flink-scala-shell/pom.xml, which defines two different source paths depending on Scala version: > > <source>src/main/scala-${scala.binary.version}</source> > > Such thing is not supported by Intellij and one have to manually remove one of the source directory (either 2.11 or 2.10) from the project settings. > > Piotrek > >> On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> wrote: >> >> Thanks for the hint! >> >>> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: >>> >>> Looks like the picture didn't go thru. >>> >>> Mind using third party site ? >>> >>> Thanks >>> >>> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: >>> >>>> Hi devs, >>>> >>>> Yesterday, I updated the master code which include [FLINK-7030]: Build >>>> with scala-2.11 by default. After that, I entered a strange problem with >>>> IDEA that many classes can't be found, and the project can't be >>>> built/compiled (in IDEA), but maven install worked good. >>>> >>>> After a series of attempts, I found that IDEA activate the scala-2.10 >>>> profile by default which result in this problem. After deactivate >>>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate >>>> "scala-2.10" profile, and every works good again. >>>> >>>> [image: 内嵌图片 1] >>>> >>>> I share this tip in the dev list, because a lot of my colleagues have the >>>> same issues, and maybe many other Flink devs have the same problem too. >>>> >>>> BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a >>>> IDEA bug or the wrong profile setting somewhere. >>>> >>>> >>>> Regards, >>>> Jark Wu >>>> >> > > > |
You could also try the nuclear option of actually re-importing the
project into intellij (as if you just downloaded it), that worked for me. On 04.07.2017 11:11, Piotr Nowojski wrote: > Maybe try > > $ mvn clean > > Before reimporting and restarting/invalidating caches in IntelliJ? Did you deactivate scala-2.10 profile in the IntelliJ? > > Piotrek > > > >> On Jul 4, 2017, at 11:05 AM, 郭健 <[hidden email]> wrote: >> >> I have done all these but still got some issue in IDEA, especially in the flink-connector project. >> ---- >> >> On 7/4/17, 15:57, "Piotr Nowojski" <[hidden email]> wrote: >> >> Besides deactivating “scala-2.10” profile in the Intellij it might be necessary to: >> - reimport maven project: >> 1. Right click on root module: “flink-parent” >> 2. Maven >> 3. reimport >> - invalidate caches and restart: File -> Invalidate caches and restart -> invalidate /restart >> - rebuild whole project >> >> I suspect that either activation of scala-2.10 by default comes from flink-scala and flick-scala-shell poms or it’s an artifact because you created/imported Intellij project when 2.10 was the default. If the first option is true, this PR: https://github.com/apache/flink/pull/4240 <https://github.com/apache/flink/pull/4240> might fix this issue. >> >> >> Another quirk that I encauntered is the compile error about ILoopCompat class being defined twice in Intellij (works fine from console). This comes from flink-scala-shell/pom.xml, which defines two different source paths depending on Scala version: >> >> <source>src/main/scala-${scala.binary.version}</source> >> >> Such thing is not supported by Intellij and one have to manually remove one of the source directory (either 2.11 or 2.10) from the project settings. >> >> Piotrek >> >>> On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> wrote: >>> >>> Thanks for the hint! >>> >>>> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: >>>> >>>> Looks like the picture didn't go thru. >>>> >>>> Mind using third party site ? >>>> >>>> Thanks >>>> >>>> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: >>>> >>>>> Hi devs, >>>>> >>>>> Yesterday, I updated the master code which include [FLINK-7030]: Build >>>>> with scala-2.11 by default. After that, I entered a strange problem with >>>>> IDEA that many classes can't be found, and the project can't be >>>>> built/compiled (in IDEA), but maven install worked good. >>>>> >>>>> After a series of attempts, I found that IDEA activate the scala-2.10 >>>>> profile by default which result in this problem. After deactivate >>>>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate >>>>> "scala-2.10" profile, and every works good again. >>>>> >>>>> [image: 内嵌图片 1] >>>>> >>>>> I share this tip in the dev list, because a lot of my colleagues have the >>>>> same issues, and maybe many other Flink devs have the same problem too. >>>>> >>>>> BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a >>>>> IDEA bug or the wrong profile setting somewhere. >>>>> >>>>> >>>>> Regards, >>>>> Jark Wu >>>>> >> >> > |
In reply to this post by Jark Wu
After deactivating scala-2.10 profile in IntelliJ, this issue is gone.
Thank you all. On 7/4/17, 17:11, "Piotr Nowojski" <[hidden email]> wrote: Maybe try $ mvn clean Before reimporting and restarting/invalidating caches in IntelliJ? Did you deactivate scala-2.10 profile in the IntelliJ? Piotrek > On Jul 4, 2017, at 11:05 AM, 郭健 <[hidden email]> wrote: > > I have done all these but still got some issue in IDEA, especially in the flink-connector project. > ---- > > On 7/4/17, 15:57, "Piotr Nowojski" <[hidden email]> wrote: > > Besides deactivating “scala-2.10” profile in the Intellij it might be necessary to: > - reimport maven project: > 1. Right click on root module: “flink-parent” > 2. Maven > 3. reimport > - invalidate caches and restart: File -> Invalidate caches and restart -> invalidate /restart > - rebuild whole project > > I suspect that either activation of scala-2.10 by default comes from flink-scala and flick-scala-shell poms or it’s an artifact because you created/imported Intellij project when 2.10 was the default. If the first option is true, this PR: https://github.com/apache/flink/pull/4240 <https://github.com/apache/flink/pull/4240> might fix this issue. > > > Another quirk that I encauntered is the compile error about ILoopCompat class being defined twice in Intellij (works fine from console). This comes from flink-scala-shell/pom.xml, which defines two different source paths depending on Scala version: > > <source>src/main/scala-${scala.binary.version}</source> > > Such thing is not supported by Intellij and one have to manually remove one of the source directory (either 2.11 or 2.10) from the project settings. > > Piotrek > >> On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> wrote: >> >> Thanks for the hint! >> >>> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: >>> >>> Looks like the picture didn't go thru. >>> >>> Mind using third party site ? >>> >>> Thanks >>> >>> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: >>> >>>> Hi devs, >>>> >>>> Yesterday, I updated the master code which include [FLINK-7030]: Build >>>> with scala-2.11 by default. After that, I entered a strange problem with >>>> IDEA that many classes can't be found, and the project can't be >>>> built/compiled (in IDEA), but maven install worked good. >>>> >>>> After a series of attempts, I found that IDEA activate the scala-2.10 >>>> profile by default which result in this problem. After deactivate >>>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate >>>> "scala-2.10" profile, and every works good again. >>>> >>>> [image: 内嵌图片 1] >>>> >>>> I share this tip in the dev list, because a lot of my colleagues have the >>>> same issues, and maybe many other Flink devs have the same problem too. >>>> >>>> BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a >>>> IDEA bug or the wrong profile setting somewhere. >>>> >>>> >>>> Regards, >>>> Jark Wu >>>> >> > > > |
Is it possible to not use a profile for that, but only an actual property
variable? Or do we use different dependencies with Scala 2.10 vs Scala 2.11 ? On Tue, Jul 4, 2017 at 11:23 AM, 郭健 <[hidden email]> wrote: > After deactivating scala-2.10 profile in IntelliJ, this issue is gone. > Thank you all. > > On 7/4/17, 17:11, "Piotr Nowojski" <[hidden email]> wrote: > > Maybe try > > $ mvn clean > > Before reimporting and restarting/invalidating caches in IntelliJ? Did > you deactivate scala-2.10 profile in the IntelliJ? > > Piotrek > > > > > On Jul 4, 2017, at 11:05 AM, 郭健 <[hidden email]> wrote: > > > > I have done all these but still got some issue in IDEA, especially > in the flink-connector project. > > ---- > > > > On 7/4/17, 15:57, "Piotr Nowojski" <[hidden email]> wrote: > > > > Besides deactivating “scala-2.10” profile in the Intellij it > might be necessary to: > > - reimport maven project: > > 1. Right click on root module: “flink-parent” > > 2. Maven > > 3. reimport > > - invalidate caches and restart: File -> Invalidate caches and > restart -> invalidate /restart > > - rebuild whole project > > > > I suspect that either activation of scala-2.10 by default comes > from flink-scala and flick-scala-shell poms or it’s an artifact because you > created/imported Intellij project when 2.10 was the default. If the first > option is true, this PR: https://github.com/apache/flink/pull/4240 < > https://github.com/apache/flink/pull/4240> might fix this issue. > > > > > > Another quirk that I encauntered is the compile error about > ILoopCompat class being defined twice in Intellij (works fine from > console). This comes from flink-scala-shell/pom.xml, which defines two > different source paths depending on Scala version: > > > > <source>src/main/scala-${scala.binary.version}</source> > > > > Such thing is not supported by Intellij and one have to manually > remove one of the source directory (either 2.11 or 2.10) from the project > settings. > > > > Piotrek > > > >> On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> > wrote: > >> > >> Thanks for the hint! > >> > >>> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: > >>> > >>> Looks like the picture didn't go thru. > >>> > >>> Mind using third party site ? > >>> > >>> Thanks > >>> > >>> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: > >>> > >>>> Hi devs, > >>>> > >>>> Yesterday, I updated the master code which include [FLINK-7030]: > Build > >>>> with scala-2.11 by default. After that, I entered a strange > problem with > >>>> IDEA that many classes can't be found, and the project can't be > >>>> built/compiled (in IDEA), but maven install worked good. > >>>> > >>>> After a series of attempts, I found that IDEA activate the > scala-2.10 > >>>> profile by default which result in this problem. After deactivate > >>>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> > deactivate > >>>> "scala-2.10" profile, and every works good again. > >>>> > >>>> [image: 内嵌图片 1] > >>>> > >>>> I share this tip in the dev list, because a lot of my colleagues > have the > >>>> same issues, and maybe many other Flink devs have the same > problem too. > >>>> > >>>> BTW, I don't know why IDEA activate scala-2.10 by default, not > sure it's a > >>>> IDEA bug or the wrong profile setting somewhere. > >>>> > >>>> > >>>> Regards, > >>>> Jark Wu > >>>> > >> > > > > > > > > > > |
First of all by activating scala-2.10/2.11 profile we change two properties to some predefined values:
<scala.version>2.10.6</scala.version> <scala.binary.version>2.10</scala.binary.version> To drop profile for that, one would have to overwrite both of those properties simultaneously. Secondly yes, we have different dependencies between Scala-2.10 and Scala-2.11 (flink-scala-shell and flink-scala modules). One more thing is that once we add Kafka 0.11 connector, changing Scala profile will also have to add/remove flink-connector-kafka-0.11 module. I’m not sure if that could be done without profiles. Piotrek > On Jul 6, 2017, at 4:01 PM, Stephan Ewen <[hidden email]> wrote: > > Is it possible to not use a profile for that, but only an actual property > variable? > Or do we use different dependencies with Scala 2.10 vs Scala 2.11 ? > > > On Tue, Jul 4, 2017 at 11:23 AM, 郭健 <[hidden email]> wrote: > >> After deactivating scala-2.10 profile in IntelliJ, this issue is gone. >> Thank you all. >> >> On 7/4/17, 17:11, "Piotr Nowojski" <[hidden email]> wrote: >> >> Maybe try >> >> $ mvn clean >> >> Before reimporting and restarting/invalidating caches in IntelliJ? Did >> you deactivate scala-2.10 profile in the IntelliJ? >> >> Piotrek >> >> >> >>> On Jul 4, 2017, at 11:05 AM, 郭健 <[hidden email]> wrote: >>> >>> I have done all these but still got some issue in IDEA, especially >> in the flink-connector project. >>> ---- >>> >>> On 7/4/17, 15:57, "Piotr Nowojski" <[hidden email]> wrote: >>> >>> Besides deactivating “scala-2.10” profile in the Intellij it >> might be necessary to: >>> - reimport maven project: >>> 1. Right click on root module: “flink-parent” >>> 2. Maven >>> 3. reimport >>> - invalidate caches and restart: File -> Invalidate caches and >> restart -> invalidate /restart >>> - rebuild whole project >>> >>> I suspect that either activation of scala-2.10 by default comes >> from flink-scala and flick-scala-shell poms or it’s an artifact because you >> created/imported Intellij project when 2.10 was the default. If the first >> option is true, this PR: https://github.com/apache/flink/pull/4240 < >> https://github.com/apache/flink/pull/4240> might fix this issue. >>> >>> >>> Another quirk that I encauntered is the compile error about >> ILoopCompat class being defined twice in Intellij (works fine from >> console). This comes from flink-scala-shell/pom.xml, which defines two >> different source paths depending on Scala version: >>> >>> <source>src/main/scala-${scala.binary.version}</source> >>> >>> Such thing is not supported by Intellij and one have to manually >> remove one of the source directory (either 2.11 or 2.10) from the project >> settings. >>> >>> Piotrek >>> >>>> On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> >> wrote: >>>> >>>> Thanks for the hint! >>>> >>>>> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: >>>>> >>>>> Looks like the picture didn't go thru. >>>>> >>>>> Mind using third party site ? >>>>> >>>>> Thanks >>>>> >>>>> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: >>>>> >>>>>> Hi devs, >>>>>> >>>>>> Yesterday, I updated the master code which include [FLINK-7030]: >> Build >>>>>> with scala-2.11 by default. After that, I entered a strange >> problem with >>>>>> IDEA that many classes can't be found, and the project can't be >>>>>> built/compiled (in IDEA), but maven install worked good. >>>>>> >>>>>> After a series of attempts, I found that IDEA activate the >> scala-2.10 >>>>>> profile by default which result in this problem. After deactivate >>>>>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> >> deactivate >>>>>> "scala-2.10" profile, and every works good again. >>>>>> >>>>>> [image: 内嵌图片 1] >>>>>> >>>>>> I share this tip in the dev list, because a lot of my colleagues >> have the >>>>>> same issues, and maybe many other Flink devs have the same >> problem too. >>>>>> >>>>>> BTW, I don't know why IDEA activate scala-2.10 by default, not >> sure it's a >>>>>> IDEA bug or the wrong profile setting somewhere. >>>>>> >>>>>> >>>>>> Regards, >>>>>> Jark Wu >>>>>> >>>> >>> >>> >>> >> >> >> >> |
In reply to this post by Piotr Nowojski
I’m wondering if we can remove the ILoopCompat duplication by checking and reading the trait properties with reflection … but I have not discovered how to do this.
> On Jul 4, 2017, at 3:57 AM, Piotr Nowojski <[hidden email]> wrote: > > Besides deactivating “scala-2.10” profile in the Intellij it might be necessary to: > - reimport maven project: > 1. Right click on root module: “flink-parent” > 2. Maven > 3. reimport > - invalidate caches and restart: File -> Invalidate caches and restart -> invalidate /restart > - rebuild whole project > > I suspect that either activation of scala-2.10 by default comes from flink-scala and flick-scala-shell poms or it’s an artifact because you created/imported Intellij project when 2.10 was the default. If the first option is true, this PR: https://github.com/apache/flink/pull/4240 <https://github.com/apache/flink/pull/4240> might fix this issue. > > > Another quirk that I encauntered is the compile error about ILoopCompat class being defined twice in Intellij (works fine from console). This comes from flink-scala-shell/pom.xml, which defines two different source paths depending on Scala version: > > <source>src/main/scala-${scala.binary.version}</source> > > Such thing is not supported by Intellij and one have to manually remove one of the source directory (either 2.11 or 2.10) from the project settings. > > Piotrek > >> On Jul 4, 2017, at 9:46 AM, Aljoscha Krettek <[hidden email]> wrote: >> >> Thanks for the hint! >> >>> On 4. Jul 2017, at 06:03, Ted Yu <[hidden email]> wrote: >>> >>> Looks like the picture didn't go thru. >>> >>> Mind using third party site ? >>> >>> Thanks >>> >>> On Mon, Jul 3, 2017 at 8:56 PM, Jark Wu <[hidden email]> wrote: >>> >>>> Hi devs, >>>> >>>> Yesterday, I updated the master code which include [FLINK-7030]: Build >>>> with scala-2.11 by default. After that, I entered a strange problem with >>>> IDEA that many classes can't be found, and the project can't be >>>> built/compiled (in IDEA), but maven install worked good. >>>> >>>> After a series of attempts, I found that IDEA activate the scala-2.10 >>>> profile by default which result in this problem. After deactivate >>>> scala-2.10 profile via sidebar Maven Projects -> Profiles -> deactivate >>>> "scala-2.10" profile, and every works good again. >>>> >>>> [image: 内嵌图片 1] >>>> >>>> I share this tip in the dev list, because a lot of my colleagues have the >>>> same issues, and maybe many other Flink devs have the same problem too. >>>> >>>> BTW, I don't know why IDEA activate scala-2.10 by default, not sure it's a >>>> IDEA bug or the wrong profile setting somewhere. >>>> >>>> >>>> Regards, >>>> Jark Wu >>>> >> > |
Free forum by Nabble | Edit this page |