You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Scott Palmer <sw...@gmail.com> on 2022/11/25 19:19:43 UTC

NetBEans 16-rc4 - More Gradle weirdness

My .java files show a hint on the first line:

"Missing mandatory Classpath entries. Resolve Project Problems."

The "Resolve Project Problems" dialog has two entries:

The first is: "Unsupported Java Runtime" which shows the text:

The IDE is running on Java 19 that is not supported by Gradle 7.6.
The IDE will attempt to use Gradle 7.5 to gather the project information.

Either upgrade your Gradle version on your project or run the IDE on Java
18 to avoid this problem!

The next is the usual "Priming Build Required", the priming build always
fails with (and I really wish I could copy paste this message, but it isn't
selectable):

"Could not open cp_init generic class cache for initialization script
'/Users/scott/Library/Caches/NetBeans/16-rc4/gradle/nb-tooling.gradle'
(/Users/scott/.gradle/caches/7.5/scripts/7xonayhtu59gy36tmrwmb6dqe). BUG!
exception is phase "

Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Michael Bien <mb...@gmail.com>.
yes I am looking forward to that one. The average dusty enterprise 
project has 5+ shaded versions of ASM in it right now.

JDK 20 already has java.lang.reflect.ClassFileFormatVersion which is a 
start.

-mbien

On 26.11.22 18:50, Scott Palmer wrote:
> Another FYI...
> Hopefully someday these class version issues will be less common.  There is
> a proposed API for the JDK that could reduce the need for libraries like
> ASM, but it will be a while before it is public (assuming it is accepted)
> and projects like Gradle and NetBeans would be able to use it.
> https://openjdk.org/jeps/8280389
>
>
> On Sat, Nov 26, 2022 at 12:38 PM Laszlo Kishalmi <la...@gmail.com>
> wrote:
>
>> Well. the Gradle Tooling API is said to be backward and forward
>> compatible with Gradle and JDK versions.
>>
>> On 11/26/22 05:21, Neil C Smith wrote:
>>> On 11/25/22 15:27, Michael Bien wrote:
>>>> there is wip in this area for NB17:
>>>> https://github.com/apache/netbeans/pull/4985
>>> Yes, following with interest!  The problem in #4944 is slightly
>>> different though.  Is the Gradle Tooling API itself immune to the
>>> problem of running on future JDKs?
>>>
>>> On Sat, 26 Nov 2022 at 00:47, Laszlo Kishalmi <la...@gmail.com>
>> wrote:
>>>> I'm thinking about a patch release for Gradle Support for NB16...
>>> Great!  I wish we could make the pushing updates process a little easier
>> ...
>>> Best wishes,
>>>
>>> Neil
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
>>> For additional commands, e-mail: dev-help@netbeans.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.apache.org
>> For additional commands, e-mail: dev-help@netbeans.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.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

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




Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Scott Palmer <sw...@gmail.com>.
Another FYI...
Hopefully someday these class version issues will be less common.  There is
a proposed API for the JDK that could reduce the need for libraries like
ASM, but it will be a while before it is public (assuming it is accepted)
and projects like Gradle and NetBeans would be able to use it.
https://openjdk.org/jeps/8280389


On Sat, Nov 26, 2022 at 12:38 PM Laszlo Kishalmi <la...@gmail.com>
wrote:

> Well. the Gradle Tooling API is said to be backward and forward
> compatible with Gradle and JDK versions.
>
> On 11/26/22 05:21, Neil C Smith wrote:
> > On 11/25/22 15:27, Michael Bien wrote:
> >> there is wip in this area for NB17:
> >> https://github.com/apache/netbeans/pull/4985
> > Yes, following with interest!  The problem in #4944 is slightly
> > different though.  Is the Gradle Tooling API itself immune to the
> > problem of running on future JDKs?
> >
> > On Sat, 26 Nov 2022 at 00:47, Laszlo Kishalmi <la...@gmail.com>
> wrote:
> >> I'm thinking about a patch release for Gradle Support for NB16...
> > Great!  I wish we could make the pushing updates process a little easier
> ...
> >
> > Best wishes,
> >
> > Neil
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: dev-help@netbeans.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.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well. the Gradle Tooling API is said to be backward and forward 
compatible with Gradle and JDK versions.

On 11/26/22 05:21, Neil C Smith wrote:
> On 11/25/22 15:27, Michael Bien wrote:
>> there is wip in this area for NB17:
>> https://github.com/apache/netbeans/pull/4985
> Yes, following with interest!  The problem in #4944 is slightly
> different though.  Is the Gradle Tooling API itself immune to the
> problem of running on future JDKs?
>
> On Sat, 26 Nov 2022 at 00:47, Laszlo Kishalmi <la...@gmail.com> wrote:
>> I'm thinking about a patch release for Gradle Support for NB16...
> Great!  I wish we could make the pushing updates process a little easier ...
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.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.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

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




Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Scott Palmer <sw...@gmail.com>.
Just FYI, Gradle 7.6 was released on Nov 25th.

+1 to a patch release.

On Sat, Nov 26, 2022 at 8:21 AM Neil C Smith <ne...@apache.org> wrote:

> On 11/25/22 15:27, Michael Bien wrote:
> > there is wip in this area for NB17:
> > https://github.com/apache/netbeans/pull/4985
>
> Yes, following with interest!  The problem in #4944 is slightly
> different though.  Is the Gradle Tooling API itself immune to the
> problem of running on future JDKs?
>
> On Sat, 26 Nov 2022 at 00:47, Laszlo Kishalmi <la...@gmail.com>
> wrote:
> > I'm thinking about a patch release for Gradle Support for NB16...
>
> Great!  I wish we could make the pushing updates process a little easier
> ...
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Neil C Smith <ne...@apache.org>.
On 11/25/22 15:27, Michael Bien wrote:
> there is wip in this area for NB17:
> https://github.com/apache/netbeans/pull/4985

Yes, following with interest!  The problem in #4944 is slightly
different though.  Is the Gradle Tooling API itself immune to the
problem of running on future JDKs?

On Sat, 26 Nov 2022 at 00:47, Laszlo Kishalmi <la...@gmail.com> wrote:
> I'm thinking about a patch release for Gradle Support for NB16...

Great!  I wish we could make the pushing updates process a little easier ...

Best wishes,

Neil

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

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




Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Laszlo Kishalmi <la...@gmail.com>.
I'm thinking about a patch release for Gradle Support for NB16...

We will have a few patches already for NB17.

On 11/25/22 15:27, Michael Bien wrote:
> On 25.11.22 20:44, Neil C Smith wrote:
>> On Fri, 25 Nov 2022, 19:24 Scott Palmer, <sw...@gmail.com> wrote:
>>
>>> Basically the release notes for NetBeans 16 should mention that Gradle
>>> projects don't work if you run the IDE with JDK 19, JDK 17 should be 
>>> used
>>> instead.
>>>
>> We know. They will. It's not released yet!
>>
>> Hopefully we can find some better ways to make this work in future (or
>> rethink our schedules). If not using Gradle, running on JDK 19 seems to
>> work well.
>>
>> Best wishes,
>>
>> Neil
>>
> there is wip in this area for NB17:
>
> https://github.com/apache/netbeans/pull/4985
>
> best regards,
>
> michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.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.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

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




Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Michael Bien <mb...@gmail.com>.
On 25.11.22 20:44, Neil C Smith wrote:
> On Fri, 25 Nov 2022, 19:24 Scott Palmer, <sw...@gmail.com> wrote:
>
>> Basically the release notes for NetBeans 16 should mention that Gradle
>> projects don't work if you run the IDE with JDK 19, JDK 17 should be used
>> instead.
>>
> We know. They will. It's not released yet!
>
> Hopefully we can find some better ways to make this work in future (or
> rethink our schedules). If not using Gradle, running on JDK 19 seems to
> work well.
>
> Best wishes,
>
> Neil
>
there is wip in this area for NB17:

https://github.com/apache/netbeans/pull/4985

best regards,

michael


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

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




Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Neil C Smith <ne...@apache.org>.
On Fri, 25 Nov 2022, 19:24 Scott Palmer, <sw...@gmail.com> wrote:

> Basically the release notes for NetBeans 16 should mention that Gradle
> projects don't work if you run the IDE with JDK 19, JDK 17 should be used
> instead.
>

We know. They will. It's not released yet!

Hopefully we can find some better ways to make this work in future (or
rethink our schedules). If not using Gradle, running on JDK 19 seems to
work well.

Best wishes,

Neil

Re: NetBEans 16-rc4 - More Gradle weirdness

Posted by Scott Palmer <sw...@gmail.com>.
Stupid GMail sent the message before I was done...
The rest of the error says:
"phase 'semanic anaylisis' in source unit '__BuildScript_' Unsupported
major class version 63"

I.e. it is trying to use Gradle 7.5 while NetBeans is running on JDK 19 and
failing.

What is interesting is the first message - that Java 19 is not supported by
Gradle 7.6.  That is false.  7.6 is when Gradle gets Java 19 support.  The
suggestion to downgrade to 7.5 which is known not to work is a little funny.

Basically the release notes for NetBeans 16 should mention that Gradle
projects don't work if you run the IDE with JDK 19, JDK 17 should be used
instead.


Regards, scott


> My .java files show a hint on the first line:
>
> "Missing mandatory Classpath entries. Resolve Project Problems."
>
> The "Resolve Project Problems" dialog has two entries:
>
> The first is: "Unsupported Java Runtime" which shows the text:
>
> The IDE is running on Java 19 that is not supported by Gradle 7.6.
> The IDE will attempt to use Gradle 7.5 to gather the project information.
>
> Either upgrade your Gradle version on your project or run the IDE on Java
> 18 to avoid this problem!
>
> The next is the usual "Priming Build Required", the priming build always
> fails with (and I really wish I could copy paste this message, but it isn't
> selectable):
>
> "Could not open cp_init generic class cache for initialization script
> '/Users/scott/Library/Caches/NetBeans/16-rc4/gradle/nb-tooling.gradle'
> (/Users/scott/.gradle/caches/7.5/scripts/7xonayhtu59gy36tmrwmb6dqe). BUG!
> exception is phase "
>