You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Jan Lahoda <la...@gmail.com> on 2019/04/07 09:30:07 UTC

[VOTE] Release Apache Netbeans Standalone Java Hints Tool 11.0 (incubating) [vote candidate 1]

Dear all,

I'd like to release the standalone Java Hints tool ("jackpot") based on
Apache NetBeans 11.0.

The release is here:
https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-vc1.zip

Signature file:
https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-vc1.zip.asc

SHA512:
eaf96e91f65f28d56a309ad50acc24216f96c93cde2a0c08f43cd8cbc862c80e58a44ac9d7c361ed02aff4b54187d3ad2bcdd55e1be70bcd814e8ff70364db3c
incubating-apache-netbeans-jackpot-11.0-vc1.zip

KEYS file:

https://dist.apache.org/repos/dist/release/incubator/netbeans/KEYS

Apache NetBeans Jackpot 3.0 Git Repo tag:
https://github.com/apache/incubator-netbeans-jackpot30/releases/tag/netbeans-jackpot-11.0-vc1

Convenience binaries:
-built standalone tool:
https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-bin-vc1.zip

Its signature file:
https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-bin-vc1.zip.asc

and its SHA512:
c62b307b3862bd2eeb15e8a9ee783ca1de2c942e3804720d3f18ae2567aad169a2b7fb52a4550fd8aae223ae7d2c4809271f14a49a8e8fbf80b4542d881986f0
incubating-apache-netbeans-jackpot-11.0-bin-vc1.zip

-there is also a plugin for Maven, a snapshot of the Maven repository,
containing what would be uploaded there is here:
https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-mavenrepo-11.0-bin-vc1.zip

Its signature file:
https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-mavenrepo-11.0-bin-vc1.zip.asc

and its SHA512:
db4b1d8d4c9ac3a822e6acd653d58b6f4a14a278e2c75ffec8e807150ba6a8cc3a26d4d34d82c4f7f230f61063857336ff1d2c787a9629efebd57ec2dbfe95d2
incubating-apache-netbeans-jackpot-mavenrepo-11.0-bin-vc1.zip


This vote is going to be open at least 72 hours, vote with +1, 0, and -1 as
usual. If it will pass, the IPMC vote will follow, carrying over any IPMC
binding votes.

Thanks for any feedback!

Jan

Re: [VOTE] Release Apache Netbeans Standalone Java Hints Tool 11.0 (incubating) [vote candidate 1]

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
+1

- the signature was verified
- the checksums match
- contents of source zip matches 
  https://github.com/apache/incubator-netbeans-jackpot30/tree/master/cmdline 
  tag: netbeans-jackpot-11.0-vc1
- source code compiles and results in a usable package
- basic tests were also done with the binary package
- LICENSE and NOTICE files look sane
- the biggest NOTICE parts is taken from lucene-core as required by the ALv2.0
  (I think it is a bug in lucene, that servlet and junit are mentioned,
   even though they are not part of the package)
- DISCLAIMER is present

Am Sonntag, den 07.04.2019, 11:30 +0200 schrieb Jan Lahoda:
> Dear all,
> 
> I'd like to release the standalone Java Hints tool ("jackpot") based
> on
> Apache NetBeans 11.0.
> 
> The release is here:
> https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-vc1.zip
> 
> Signature file:
> https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-vc1.zip.asc
> 
> SHA512:
> eaf96e91f65f28d56a309ad50acc24216f96c93cde2a0c08f43cd8cbc862c80e58a44
> ac9d7c361ed02aff4b54187d3ad2bcdd55e1be70bcd814e8ff70364db3c
> incubating-apache-netbeans-jackpot-11.0-vc1.zip
> 
> KEYS file:
> 
> https://dist.apache.org/repos/dist/release/incubator/netbeans/KEYS
> 
> Apache NetBeans Jackpot 3.0 Git Repo tag:
> https://github.com/apache/incubator-netbeans-jackpot30/releases/tag/netbeans-jackpot-11.0-vc1
> 
> Convenience binaries:
> -built standalone tool:
> https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-bin-vc1.zip
> 
> Its signature file:
> https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-11.0-bin-vc1.zip.asc
> 
> and its SHA512:
> c62b307b3862bd2eeb15e8a9ee783ca1de2c942e3804720d3f18ae2567aad169a2b7f
> b52a4550fd8aae223ae7d2c4809271f14a49a8e8fbf80b4542d881986f0
> incubating-apache-netbeans-jackpot-11.0-bin-vc1.zip
> 
> -there is also a plugin for Maven, a snapshot of the Maven
> repository,
> containing what would be uploaded there is here:
> https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-mavenrepo-11.0-bin-vc1.zip
> 
> Its signature file:
> https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans-jackpot/incubating-netbeans-jackpot-11.0-vc1/incubating-apache-netbeans-jackpot-mavenrepo-11.0-bin-vc1.zip.asc
> 
> and its SHA512:
> db4b1d8d4c9ac3a822e6acd653d58b6f4a14a278e2c75ffec8e807150ba6a8cc3a26d
> 4d34d82c4f7f230f61063857336ff1d2c787a9629efebd57ec2dbfe95d2
> incubating-apache-netbeans-jackpot-mavenrepo-11.0-bin-vc1.zip
> 
> 
> This vote is going to be open at least 72 hours, vote with +1, 0, and
> -1 as
> usual. If it will pass, the IPMC vote will follow, carrying over any
> IPMC
> binding votes.
> 
> Thanks for any feedback!
> 
> Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: [DISCUSS] Release Apache Netbeans Standalone Java Hints Tool 11.0 (incubating) [vote candidate 1]

Posted by Jan Lahoda <la...@gmail.com>.
On Sun, Apr 7, 2019 at 6:26 PM Matthias Bläsing <mb...@doppel-helix.eu>
wrote:

> Hi Jan,
>
> thank you for the hint. With that I was able to test the functionality
> on the JNA code base. There are hints, that cause
> IllegalArgumentExceptions (run with the netbeans config file), but in
> general it works as I would expect.
>
> The formal parts: checksums and signatures look good. What I'm missing
> is the source code repository for the source file. This does not look
> like the right one:
>
> https://github.com/apache/incubator-netbeans-jackpot30


I've forgot to mention: this is only the part under the "cmdline" directory
there.


>
> The licenses/notice look strange though and are hard to verify. The one
> for the source zip looks good. The one for the the binaries looks
> strange though. I'm surprised to see JUnit, JLine and google prettify
> there. Are they all included? There is also a reference to the servlet-
> api (in the NOTICE file) and to a bunch of apache commons files, is
> that intended?
>

This tools includes (classes from) lucene-core-3.5.0.jar, and this text in
LICENSE/NOTICE is taken verbatim from the lucene-core-3.5.0.jar's LICENSE
and NOTICE (in the same way as the NetBeans IDE uses them). At least I
think this is what you see. Other libraries included are joptsimple and
ByteBuddy(+ASM).

I believe that in the IDE, the final decision was to keep the Lucene's
LICENSE/NOTICE as they are, despite being weird. Although I may be wrong
here.

Jan


>
> Greetings
>
> Matthias
>
> Am Sonntag, den 07.04.2019, 16:34 +0200 schrieb Jan Lahoda:
> > On Sun, Apr 7, 2019 at 1:24 PM Matthias Bläsing <
> > mblaesing@doppel-helix.eu>
> > wrote:
> >
> > > Hi Jan,
> > >
> > > Am Sonntag, den 07.04.2019, 11:30 +0200 schrieb Jan Lahoda:
> > > > I'd like to release the standalone Java Hints tool ("jackpot")
> > > > based on
> > > > Apache NetBeans 11.0.
> > >
> > > could you please give a sample how to use it. I now managed to
> > > build it
> > > after some fiddeling, but I don't see how to use it.
> > >
> >
> > As the simplest way, imagine a file: "<somedir>src/test/Test.java
> > with
> > content:
> > ---
> > package test;
> >
> > public class Test {
> >
> >     public void test(boolean b) {
> >         int i = 0;
> >         if (b)
> >             System.err.println("was true");
> >             assert (i = 1) == 1;
> >     }
> >
> > }
> > ---
> >
> > One can get the list of all known hints using:
> > ---
> > jackpot --list
> > ---
> >
> > Then it is possible to run some hint:
> > ---
> > $ jackpot --hint "Confusing indentation" <somedir>/src
> > <somedir>/src/test/Test.java:9: warning: [Confusing_indentation]
> > Confusing
> > indentation
> >             assert (i = 1) == 1;
> >             ^
> > ---
> >
> > Or:
> > ---
> > $ jackpot --hint "Assert with side effects" <somedir>/src
> > <somedir>/src/test/Test.java:9: warning: [Assert_with_side_effects]
> > Assert
> > condition produces side effects
> >             assert (i = 1) == 1;
> >                     ^
> > ---
> >
> > When one has the hint configuration file, like the one under the main
> > repo,
> > in nbbuild/misc/hint-settings.xml, then this can be used:
> > ---
> > $ ./jackpot --config-file
> > <path-to-netbeans-checkout>/nbbuild/misc/hints-settings.xml
> > <somedir>/src
> > <somedir>/src/test/Test.java:9: warning: [Confusing_indentation]
> > Confusing
> > indentation
> >             assert (i = 1) == 1;
> >             ^
> > <somedir>/src/test/Test.java:9: warning: [Assert_with_side_effects]
> > Assert
> > condition produces side effects
> >             assert (i = 1) == 1;
> >                     ^
> > <somedir>/src/test/Test.java:9: warning: [Nested_assignment] Nested
> > assignment 'i = 1'
> >             assert (i = 1) == 1;
> >                     ^
> > ---
> >
> > With "--apply" the tool will apply the primary fix for each warning
> > produced, and will write the changes directly into the sources. With
> > "--out" it will apply the primary fix, but will not write the changes
> > into
> > the sources, but will rather produce a patch.
> >
> >
> > > Randomly playing, I notices, that there is something fishy.
> > > According
> > > to the CLI output, this should show me a GUI:
> > >
> > > ./jackpot --show-gui --config-file test.config
> > >
> >
> > Hmm, the gui is disabled, that was only showing allowing to configure
> > which
> > hints should be enabled in configuration file (and not really needed
> > that
> > much, since NetBeans itself can be used to configure the settings,
> > which
> > was not the case when this option was introduced.) But I forgot to
> > remove
> > the command line option. Sorry for that.
> >
> > Jan
> >
> >
> > > but is silently fails.
> > >
> > > Running with debug I get:
> > >
> > > matthias@athena:~/tmp/x/x/jackpot$ ./jackpot --debug --show-gui
> > > --config-file test.config
> > > Apr. 07, 2019 1:19:29 NACHM.
> > > org.openide.util.lookup.MetaInfServicesLookup
> > > search
> > > INFORMATION: null
> > > java.lang.ClassNotFoundException:
> > > org.netbeans.modules.web.common.remote.RemoteURLMapper
> > >         at
> > > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinC
> > > lassLoader.java:583)
> > >         at
> > > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass
> > > (ClassLoaders.java:178)
> > >         at
> > > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> > >         at java.base/java.lang.Class.forName0(Native Method)
> > >         at java.base/java.lang.Class.forName(Class.java:398)
> > >         at
> > > org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfService
> > > sLookup.java:306)
> > >         at
> > > org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfS
> > > ervicesLookup.java:131)
> > >         at
> > > org.openide.util.lookup.MetaInfServicesLookup.beforeLookupResult(Me
> > > taInfServicesLookup.java:110)
> > >         at
> > > org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:4
> > > 58)
> > >         at
> > > org.openide.util.lookup.ProxyLookup$R.initResults(ProxyLookup.java:
> > > 365)
> > >         at
> > > org.openide.util.lookup.ProxyLookup$R.addLookupListener(ProxyLookup
> > > .java:464)
> > >         at
> > > org.openide.filesystems.URLMapper.reset(URLMapper.java:92)
> > >         at
> > > org.openide.filesystems.URLMapper.<clinit>(URLMapper.java:82)
> > >         at
> > > org.netbeans.modules.jackpot30.cmdline.lib.Utils.createDefaultBootC
> > > lassPath(Utils.java:122)
> > >         at
> > > org.netbeans.modules.jackpot30.cmdline.Main$RootConfiguration.<init
> > > >(Main.java:866)
> > >         at
> > > org.netbeans.modules.jackpot30.cmdline.Main.compile(Main.java:189)
> > >         at
> > > org.netbeans.modules.jackpot30.cmdline.Main.main(Main.java:121)
> > >
> > > matthias@athena:~/tmp/x/x/jackpot$
> > >
> > >
> > > The JDK looks reasonably sane:
> > >
> > > matthias@athena:~/tmp/x/x/jackpot$ java -version
> > > openjdk version "11.0.1" 2018-10-16
> > > OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-
> > > 3ubuntu3.18.10.1)
> > > OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1,
> > > mixed
> > > mode, sharing)
> > > matthias@athena:~/tmp/x/x/jackpot$
> > >
> > >
> > > Greetings
> > >
> > > Matthias
> > >
> > >
> > > -----------------------------------------------------------------
> > > ----
> > > To unsubscribe, e-mail:
> > > dev-unsubscribe@netbeans.incubator.apache.org
> > > For additional commands, e-mail:
> > > dev-help@netbeans.incubator.apache.org
> > >
> > > For further information about the NetBeans mailing lists, visit:
> > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > >
> > >
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: [DISCUSS] Release Apache Netbeans Standalone Java Hints Tool 11.0 (incubating) [vote candidate 1]

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hi Jan,

thank you for the hint. With that I was able to test the functionality
on the JNA code base. There are hints, that cause
IllegalArgumentExceptions (run with the netbeans config file), but in
general it works as I would expect.

The formal parts: checksums and signatures look good. What I'm missing
is the source code repository for the source file. This does not look
like the right one:

https://github.com/apache/incubator-netbeans-jackpot30

The licenses/notice look strange though and are hard to verify. The one
for the source zip looks good. The one for the the binaries looks
strange though. I'm surprised to see JUnit, JLine and google prettify
there. Are they all included? There is also a reference to the servlet-
api (in the NOTICE file) and to a bunch of apache commons files, is
that intended?

Greetings

Matthias

Am Sonntag, den 07.04.2019, 16:34 +0200 schrieb Jan Lahoda:
> On Sun, Apr 7, 2019 at 1:24 PM Matthias Bläsing <
> mblaesing@doppel-helix.eu>
> wrote:
> 
> > Hi Jan,
> > 
> > Am Sonntag, den 07.04.2019, 11:30 +0200 schrieb Jan Lahoda:
> > > I'd like to release the standalone Java Hints tool ("jackpot")
> > > based on
> > > Apache NetBeans 11.0.
> > 
> > could you please give a sample how to use it. I now managed to
> > build it
> > after some fiddeling, but I don't see how to use it.
> > 
> 
> As the simplest way, imagine a file: "<somedir>src/test/Test.java
> with
> content:
> ---
> package test;
> 
> public class Test {
> 
>     public void test(boolean b) {
>         int i = 0;
>         if (b)
>             System.err.println("was true");
>             assert (i = 1) == 1;
>     }
> 
> }
> ---
> 
> One can get the list of all known hints using:
> ---
> jackpot --list
> ---
> 
> Then it is possible to run some hint:
> ---
> $ jackpot --hint "Confusing indentation" <somedir>/src
> <somedir>/src/test/Test.java:9: warning: [Confusing_indentation]
> Confusing
> indentation
>             assert (i = 1) == 1;
>             ^
> ---
> 
> Or:
> ---
> $ jackpot --hint "Assert with side effects" <somedir>/src
> <somedir>/src/test/Test.java:9: warning: [Assert_with_side_effects]
> Assert
> condition produces side effects
>             assert (i = 1) == 1;
>                     ^
> ---
> 
> When one has the hint configuration file, like the one under the main
> repo,
> in nbbuild/misc/hint-settings.xml, then this can be used:
> ---
> $ ./jackpot --config-file
> <path-to-netbeans-checkout>/nbbuild/misc/hints-settings.xml
> <somedir>/src
> <somedir>/src/test/Test.java:9: warning: [Confusing_indentation]
> Confusing
> indentation
>             assert (i = 1) == 1;
>             ^
> <somedir>/src/test/Test.java:9: warning: [Assert_with_side_effects]
> Assert
> condition produces side effects
>             assert (i = 1) == 1;
>                     ^
> <somedir>/src/test/Test.java:9: warning: [Nested_assignment] Nested
> assignment 'i = 1'
>             assert (i = 1) == 1;
>                     ^
> ---
> 
> With "--apply" the tool will apply the primary fix for each warning
> produced, and will write the changes directly into the sources. With
> "--out" it will apply the primary fix, but will not write the changes
> into
> the sources, but will rather produce a patch.
> 
> 
> > Randomly playing, I notices, that there is something fishy.
> > According
> > to the CLI output, this should show me a GUI:
> > 
> > ./jackpot --show-gui --config-file test.config
> > 
> 
> Hmm, the gui is disabled, that was only showing allowing to configure
> which
> hints should be enabled in configuration file (and not really needed
> that
> much, since NetBeans itself can be used to configure the settings,
> which
> was not the case when this option was introduced.) But I forgot to
> remove
> the command line option. Sorry for that.
> 
> Jan
> 
> 
> > but is silently fails.
> > 
> > Running with debug I get:
> > 
> > matthias@athena:~/tmp/x/x/jackpot$ ./jackpot --debug --show-gui
> > --config-file test.config
> > Apr. 07, 2019 1:19:29 NACHM.
> > org.openide.util.lookup.MetaInfServicesLookup
> > search
> > INFORMATION: null
> > java.lang.ClassNotFoundException:
> > org.netbeans.modules.web.common.remote.RemoteURLMapper
> >         at
> > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinC
> > lassLoader.java:583)
> >         at
> > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass
> > (ClassLoaders.java:178)
> >         at
> > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> >         at java.base/java.lang.Class.forName0(Native Method)
> >         at java.base/java.lang.Class.forName(Class.java:398)
> >         at
> > org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfService
> > sLookup.java:306)
> >         at
> > org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfS
> > ervicesLookup.java:131)
> >         at
> > org.openide.util.lookup.MetaInfServicesLookup.beforeLookupResult(Me
> > taInfServicesLookup.java:110)
> >         at
> > org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:4
> > 58)
> >         at
> > org.openide.util.lookup.ProxyLookup$R.initResults(ProxyLookup.java:
> > 365)
> >         at
> > org.openide.util.lookup.ProxyLookup$R.addLookupListener(ProxyLookup
> > .java:464)
> >         at
> > org.openide.filesystems.URLMapper.reset(URLMapper.java:92)
> >         at
> > org.openide.filesystems.URLMapper.<clinit>(URLMapper.java:82)
> >         at
> > org.netbeans.modules.jackpot30.cmdline.lib.Utils.createDefaultBootC
> > lassPath(Utils.java:122)
> >         at
> > org.netbeans.modules.jackpot30.cmdline.Main$RootConfiguration.<init
> > >(Main.java:866)
> >         at
> > org.netbeans.modules.jackpot30.cmdline.Main.compile(Main.java:189)
> >         at
> > org.netbeans.modules.jackpot30.cmdline.Main.main(Main.java:121)
> > 
> > matthias@athena:~/tmp/x/x/jackpot$
> > 
> > 
> > The JDK looks reasonably sane:
> > 
> > matthias@athena:~/tmp/x/x/jackpot$ java -version
> > openjdk version "11.0.1" 2018-10-16
> > OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-
> > 3ubuntu3.18.10.1)
> > OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1,
> > mixed
> > mode, sharing)
> > matthias@athena:~/tmp/x/x/jackpot$
> > 
> > 
> > Greetings
> > 
> > Matthias
> > 
> > 
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: 
> > dev-unsubscribe@netbeans.incubator.apache.org
> > For additional commands, e-mail: 
> > dev-help@netbeans.incubator.apache.org
> > 
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > 
> > 
> > 
> > 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: [DISCUSS] Release Apache Netbeans Standalone Java Hints Tool 11.0 (incubating) [vote candidate 1]

Posted by Jan Lahoda <la...@gmail.com>.
On Sun, Apr 7, 2019 at 1:24 PM Matthias Bläsing <mb...@doppel-helix.eu>
wrote:

> Hi Jan,
>
> Am Sonntag, den 07.04.2019, 11:30 +0200 schrieb Jan Lahoda:
> > I'd like to release the standalone Java Hints tool ("jackpot") based on
> > Apache NetBeans 11.0.
>
> could you please give a sample how to use it. I now managed to build it
> after some fiddeling, but I don't see how to use it.
>

As the simplest way, imagine a file: "<somedir>src/test/Test.java with
content:
---
package test;

public class Test {

    public void test(boolean b) {
        int i = 0;
        if (b)
            System.err.println("was true");
            assert (i = 1) == 1;
    }

}
---

One can get the list of all known hints using:
---
jackpot --list
---

Then it is possible to run some hint:
---
$ jackpot --hint "Confusing indentation" <somedir>/src
<somedir>/src/test/Test.java:9: warning: [Confusing_indentation] Confusing
indentation
            assert (i = 1) == 1;
            ^
---

Or:
---
$ jackpot --hint "Assert with side effects" <somedir>/src
<somedir>/src/test/Test.java:9: warning: [Assert_with_side_effects] Assert
condition produces side effects
            assert (i = 1) == 1;
                    ^
---

When one has the hint configuration file, like the one under the main repo,
in nbbuild/misc/hint-settings.xml, then this can be used:
---
$ ./jackpot --config-file
<path-to-netbeans-checkout>/nbbuild/misc/hints-settings.xml <somedir>/src
<somedir>/src/test/Test.java:9: warning: [Confusing_indentation] Confusing
indentation
            assert (i = 1) == 1;
            ^
<somedir>/src/test/Test.java:9: warning: [Assert_with_side_effects] Assert
condition produces side effects
            assert (i = 1) == 1;
                    ^
<somedir>/src/test/Test.java:9: warning: [Nested_assignment] Nested
assignment 'i = 1'
            assert (i = 1) == 1;
                    ^
---

With "--apply" the tool will apply the primary fix for each warning
produced, and will write the changes directly into the sources. With
"--out" it will apply the primary fix, but will not write the changes into
the sources, but will rather produce a patch.


> Randomly playing, I notices, that there is something fishy. According
> to the CLI output, this should show me a GUI:
>
> ./jackpot --show-gui --config-file test.config
>

Hmm, the gui is disabled, that was only showing allowing to configure which
hints should be enabled in configuration file (and not really needed that
much, since NetBeans itself can be used to configure the settings, which
was not the case when this option was introduced.) But I forgot to remove
the command line option. Sorry for that.

Jan


>
> but is silently fails.
>
> Running with debug I get:
>
> matthias@athena:~/tmp/x/x/jackpot$ ./jackpot --debug --show-gui
> --config-file test.config
> Apr. 07, 2019 1:19:29 NACHM. org.openide.util.lookup.MetaInfServicesLookup
> search
> INFORMATION: null
> java.lang.ClassNotFoundException:
> org.netbeans.modules.web.common.remote.RemoteURLMapper
>         at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
>         at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
>         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
>         at java.base/java.lang.Class.forName0(Native Method)
>         at java.base/java.lang.Class.forName(Class.java:398)
>         at
> org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:306)
>         at
> org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfServicesLookup.java:131)
>         at
> org.openide.util.lookup.MetaInfServicesLookup.beforeLookupResult(MetaInfServicesLookup.java:110)
>         at
> org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:458)
>         at
> org.openide.util.lookup.ProxyLookup$R.initResults(ProxyLookup.java:365)
>         at
> org.openide.util.lookup.ProxyLookup$R.addLookupListener(ProxyLookup.java:464)
>         at org.openide.filesystems.URLMapper.reset(URLMapper.java:92)
>         at org.openide.filesystems.URLMapper.<clinit>(URLMapper.java:82)
>         at
> org.netbeans.modules.jackpot30.cmdline.lib.Utils.createDefaultBootClassPath(Utils.java:122)
>         at
> org.netbeans.modules.jackpot30.cmdline.Main$RootConfiguration.<init>(Main.java:866)
>         at
> org.netbeans.modules.jackpot30.cmdline.Main.compile(Main.java:189)
>         at org.netbeans.modules.jackpot30.cmdline.Main.main(Main.java:121)
>
> matthias@athena:~/tmp/x/x/jackpot$
>
>
> The JDK looks reasonably sane:
>
> matthias@athena:~/tmp/x/x/jackpot$ java -version
> openjdk version "11.0.1" 2018-10-16
> OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1)
> OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1, mixed
> mode, sharing)
> matthias@athena:~/tmp/x/x/jackpot$
>
>
> Greetings
>
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: [DISCUSS] Release Apache Netbeans Standalone Java Hints Tool 11.0 (incubating) [vote candidate 1]

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Hi Jan,

Am Sonntag, den 07.04.2019, 11:30 +0200 schrieb Jan Lahoda:
> I'd like to release the standalone Java Hints tool ("jackpot") based on
> Apache NetBeans 11.0.

could you please give a sample how to use it. I now managed to build it
after some fiddeling, but I don't see how to use it.

Randomly playing, I notices, that there is something fishy. According
to the CLI output, this should show me a GUI:

./jackpot --show-gui --config-file test.config

but is silently fails.

Running with debug I get:

matthias@athena:~/tmp/x/x/jackpot$ ./jackpot --debug --show-gui --config-file test.config
Apr. 07, 2019 1:19:29 NACHM. org.openide.util.lookup.MetaInfServicesLookup search
INFORMATION: null
java.lang.ClassNotFoundException: org.netbeans.modules.web.common.remote.RemoteURLMapper
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:306)
	at org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfServicesLookup.java:131)
	at org.openide.util.lookup.MetaInfServicesLookup.beforeLookupResult(MetaInfServicesLookup.java:110)
	at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:458)
	at org.openide.util.lookup.ProxyLookup$R.initResults(ProxyLookup.java:365)
	at org.openide.util.lookup.ProxyLookup$R.addLookupListener(ProxyLookup.java:464)
	at org.openide.filesystems.URLMapper.reset(URLMapper.java:92)
	at org.openide.filesystems.URLMapper.<clinit>(URLMapper.java:82)
	at org.netbeans.modules.jackpot30.cmdline.lib.Utils.createDefaultBootClassPath(Utils.java:122)
	at org.netbeans.modules.jackpot30.cmdline.Main$RootConfiguration.<init>(Main.java:866)
	at org.netbeans.modules.jackpot30.cmdline.Main.compile(Main.java:189)
	at org.netbeans.modules.jackpot30.cmdline.Main.main(Main.java:121)

matthias@athena:~/tmp/x/x/jackpot$ 


The JDK looks reasonably sane:

matthias@athena:~/tmp/x/x/jackpot$ java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1, mixed mode, sharing)
matthias@athena:~/tmp/x/x/jackpot$ 


Greetings

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists