You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by wjm wjm <zz...@gmail.com> on 2018/10/25 17:19:08 UTC

problem of latest IntelliJ(ideaIU-2018.2.5)

currently i'm using ideaIU-2018.1.4, there is no problem

but after upgrade to ideaIU-2018.2.5, java-chassis can not compiled, but no
problem when run mvn clean install in console out of IntelliJ.

i rollback to ideaIU-2018.1.4, but anybody know what happened in
ideaIU-2018.2.5?

problems:
1.NetUtils can not compile
  public static boolean canTcpListen(InetAddress address, int port) {
    try (ServerSocket ss = new ServerSocket(port, 0, address)) {
      // to avoid latest IntelliJ compile warning
      ss.getLocalPort();
      return true;
    } catch (IOException e) {
      return false;
    }
  }

2.force to depend optional vertx-codegen, even report error after add the
dependency

Re: problem of latest IntelliJ(ideaIU-2018.2.5)

Posted by Willem Jiang <wi...@gmail.com>.
Oh, thanks for sharing this.  I just added a JIRA[1] for it.

[1]https://issues.apache.org/jira/browse/SCB-982

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem
On Fri, Oct 26, 2018 at 8:54 AM wjm wjm <zz...@gmail.com> wrote:
>
> ideaIU-2018.2.5 is no problem, this  version  load more compile options
> from pom.xml, include: "-Werror -Xlint:all"
>
> "mvn clean install" is "no problem", because default has the option
> "-nowarn"
> that's the reason our CI is "no problem", but load source code by eclipse
> will show many compile warnings
>
> we should add options in pom.xml and resolve all the warnings.
>
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-compiler-plugin</artifactId>
>   <version>3.1</version>
>   <configuration>
>     <source>1.8</source>
>     <target>1.8</target>
>     <showDeprecation>true</showDeprecation>
>     <showWarnings>true</showWarnings>
>     <compilerArgs>
>       <arg>-Werror</arg>
>       <arg>-Xlint:all</arg>
>     </compilerArgs>
>   </configuration>
> </plugin>
>
>
> Willem Jiang <wi...@gmail.com> 于2018年10月26日周五 上午8:44写道:
>
> > Hi
> >
> > It looks like an IDEA issue, do you send a bug report to IDEA?
> > I'm not sure if it relates to cache file, did you try to clean up the
> > cache files of new IDEA?
> >
> > BTW, I always keep the old major version when upgrade the IDEA version.
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Fri, Oct 26, 2018 at 1:19 AM wjm wjm <zz...@gmail.com> wrote:
> > >
> > > currently i'm using ideaIU-2018.1.4, there is no problem
> > >
> > > but after upgrade to ideaIU-2018.2.5, java-chassis can not compiled, but
> > no
> > > problem when run mvn clean install in console out of IntelliJ.
> > >
> > > i rollback to ideaIU-2018.1.4, but anybody know what happened in
> > > ideaIU-2018.2.5?
> > >
> > > problems:
> > > 1.NetUtils can not compile
> > >   public static boolean canTcpListen(InetAddress address, int port) {
> > >     try (ServerSocket ss = new ServerSocket(port, 0, address)) {
> > >       // to avoid latest IntelliJ compile warning
> > >       ss.getLocalPort();
> > >       return true;
> > >     } catch (IOException e) {
> > >       return false;
> > >     }
> > >   }
> > >
> > > 2.force to depend optional vertx-codegen, even report error after add the
> > > dependency
> >

Re: problem of latest IntelliJ(ideaIU-2018.2.5)

Posted by wjm wjm <zz...@gmail.com>.
ideaIU-2018.2.5 is no problem, this  version  load more compile options
from pom.xml, include: "-Werror -Xlint:all"

"mvn clean install" is "no problem", because default has the option
"-nowarn"
that's the reason our CI is "no problem", but load source code by eclipse
will show many compile warnings

we should add options in pom.xml and resolve all the warnings.

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.1</version>
  <configuration>
    <source>1.8</source>
    <target>1.8</target>
    <showDeprecation>true</showDeprecation>
    <showWarnings>true</showWarnings>
    <compilerArgs>
      <arg>-Werror</arg>
      <arg>-Xlint:all</arg>
    </compilerArgs>
  </configuration>
</plugin>


Willem Jiang <wi...@gmail.com> 于2018年10月26日周五 上午8:44写道:

> Hi
>
> It looks like an IDEA issue, do you send a bug report to IDEA?
> I'm not sure if it relates to cache file, did you try to clean up the
> cache files of new IDEA?
>
> BTW, I always keep the old major version when upgrade the IDEA version.
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Fri, Oct 26, 2018 at 1:19 AM wjm wjm <zz...@gmail.com> wrote:
> >
> > currently i'm using ideaIU-2018.1.4, there is no problem
> >
> > but after upgrade to ideaIU-2018.2.5, java-chassis can not compiled, but
> no
> > problem when run mvn clean install in console out of IntelliJ.
> >
> > i rollback to ideaIU-2018.1.4, but anybody know what happened in
> > ideaIU-2018.2.5?
> >
> > problems:
> > 1.NetUtils can not compile
> >   public static boolean canTcpListen(InetAddress address, int port) {
> >     try (ServerSocket ss = new ServerSocket(port, 0, address)) {
> >       // to avoid latest IntelliJ compile warning
> >       ss.getLocalPort();
> >       return true;
> >     } catch (IOException e) {
> >       return false;
> >     }
> >   }
> >
> > 2.force to depend optional vertx-codegen, even report error after add the
> > dependency
>

Re: problem of latest IntelliJ(ideaIU-2018.2.5)

Posted by Willem Jiang <wi...@gmail.com>.
Hi

It looks like an IDEA issue, do you send a bug report to IDEA?
I'm not sure if it relates to cache file, did you try to clean up the
cache files of new IDEA?

BTW, I always keep the old major version when upgrade the IDEA version.

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Fri, Oct 26, 2018 at 1:19 AM wjm wjm <zz...@gmail.com> wrote:
>
> currently i'm using ideaIU-2018.1.4, there is no problem
>
> but after upgrade to ideaIU-2018.2.5, java-chassis can not compiled, but no
> problem when run mvn clean install in console out of IntelliJ.
>
> i rollback to ideaIU-2018.1.4, but anybody know what happened in
> ideaIU-2018.2.5?
>
> problems:
> 1.NetUtils can not compile
>   public static boolean canTcpListen(InetAddress address, int port) {
>     try (ServerSocket ss = new ServerSocket(port, 0, address)) {
>       // to avoid latest IntelliJ compile warning
>       ss.getLocalPort();
>       return true;
>     } catch (IOException e) {
>       return false;
>     }
>   }
>
> 2.force to depend optional vertx-codegen, even report error after add the
> dependency