Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E8913200CBB for ; Tue, 4 Jul 2017 11:19:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E71EE160BEF; Tue, 4 Jul 2017 09:19:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 38D25160BE1 for ; Tue, 4 Jul 2017 11:19:53 +0200 (CEST) Received: (qmail 71784 invoked by uid 500); 4 Jul 2017 09:19:52 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 71773 invoked by uid 99); 4 Jul 2017 09:19:52 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2017 09:19:52 +0000 Received: from [192.168.178.53] (ipservice-092-208-199-000.092.208.pools.vodafone-ip.de [92.208.199.0]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 1B5071A0029 for ; Tue, 4 Jul 2017 09:19:50 +0000 (UTC) Subject: Re: Tips to fix IDEA strange problem after updating master code To: dev@flink.apache.org References: <27D9BBDA-6E16-45EF-BACC-88F01F0338CD@immomo.com> From: Chesnay Schepler Message-ID: <0a94c2d8-7655-3e96-8da9-74d4720c4cb5@apache.org> Date: Tue, 4 Jul 2017 11:19:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US archived-at: Tue, 04 Jul 2017 09:19:54 -0000 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, 郭健 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" 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 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: >> >> src/main/scala-${scala.binary.version} >> >> 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 wrote: >>> >>> Thanks for the hint! >>> >>>> On 4. Jul 2017, at 06:03, Ted Yu 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 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 >>>>> >> >> >