You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Neil C Smith <ne...@apache.org> on 2022/01/11 12:53:33 UTC

Excluding a module from build depending on JDK?

Hi,

Anyone know if there's a non-hacky way to exclude a module from being
included at all if building the IDE on JDK 8?  I was under the
impression there might be in the conversations about support of
--release 11, but I now think I might have misinterpreted something
that was said.

Ideally all our tests would be building on JDK 11 now, but that's not
yet the case.  I'm going to look at more doing so before we branch off
13.  But I was also hoping to get an upgraded module in that requires
JDK 11 (due to third-party dependency).

Thanks,

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: Excluding a module from build depending on JDK?

Posted by Michael Bien <mb...@gmail.com>.
On 11.01.22 16:24, Neil C Smith wrote:
> On Tue, 11 Jan 2022 at 15:05, Michael Bien <mb...@gmail.com> wrote:
>> On 11.01.22 13:53, Neil C Smith wrote:
>>> Hi,
>>>
>>> Anyone know if there's a non-hacky way to exclude a module from being
>>> included at all if building the IDE on JDK 8?  I was under the
>>> impression there might be in the conversations about support of
>>> --release 11, but I now think I might have misinterpreted something
>>> that was said.
>> I don't know a clean way. But what would happen if the ant script would
>> simply skip the build if JDK < 11?
> Not sure.  I was looking to see if filtering the cluster config list
> was enough.  Depends how much that is used vs built output I guess.

That would be the better approach for sure.


>
> For some reason I thought we had a way to do this.  It might be
> useful, say when we're ready to bump the build on to JDK 17 (in the
> distant future! :-) ), that you could build on JDK 11 at least the
> modules that would run on JDK 11.
>
> I may have another look shortly - currently working on a PR to bump
> more of the testing up to JDK 11.

btw is there any timeframe of how long NB still has to support running 
on JDK 8?

We build on 11, compile to 8 and use a backported javac from 17 and 
can't run tests on 17 - this adds a lot of complexity.

there is a chance that JDK 8 will outlive the internal combustion engine.

-mbien


---------------------------------------------------------------------
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: Excluding a module from build depending on JDK?

Posted by Neil C Smith <ne...@apache.org>.
On Tue, 11 Jan 2022 at 15:05, Michael Bien <mb...@gmail.com> wrote:
>
> On 11.01.22 13:53, Neil C Smith wrote:
> > Hi,
> >
> > Anyone know if there's a non-hacky way to exclude a module from being
> > included at all if building the IDE on JDK 8?  I was under the
> > impression there might be in the conversations about support of
> > --release 11, but I now think I might have misinterpreted something
> > that was said.
>
> I don't know a clean way. But what would happen if the ant script would
> simply skip the build if JDK < 11?

Not sure.  I was looking to see if filtering the cluster config list
was enough.  Depends how much that is used vs built output I guess.

For some reason I thought we had a way to do this.  It might be
useful, say when we're ready to bump the build on to JDK 17 (in the
distant future! :-) ), that you could build on JDK 11 at least the
modules that would run on JDK 11.

I may have another look shortly - currently working on a PR to bump
more of the testing up to JDK 11.

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: Excluding a module from build depending on JDK?

Posted by Michael Bien <mb...@gmail.com>.
On 11.01.22 13:53, Neil C Smith wrote:
> Hi,
>
> Anyone know if there's a non-hacky way to exclude a module from being
> included at all if building the IDE on JDK 8?  I was under the
> impression there might be in the conversations about support of
> --release 11, but I now think I might have misinterpreted something
> that was said.

I don't know a clean way. But what would happen if the ant script would 
simply skip the build if JDK < 11?

If this works, it could be moved to the super script and controlled via 
a property or similar.

-mbien


---------------------------------------------------------------------
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




How to Update Netbeans with a new JDK [Re: Excluding a module from build depending on JDK?]

Posted by Eric Bresie <eb...@gmail.com>.
Is it worth starting a confluence page to start documenting what is
necessary when upgrading between JDK versions?

Assume it would have have to consider things like:


   1. Update project property files to identify jdk requirements (i.e.
   target, resource, release)
   2. Update (ant) build scripts where applicable
   3. Update build testing to account for JDK specific testing where
   applicable
   4. Update dependencies (i.e. if compiled to a specific JDK version, may
   require updated dependencies)
   5. If JDK depreciates/removes a given API, recommend raising a issue to
   plan for eventual rework to address this (i.e. replace with new API or new
   dependencies)
   6. If any updates impact Netbeans APIs, update api version files
   7. Update documentation pages to identify compatible JDK to Netbeans
   (assume this may be implied on a given release page but not sure a
   "compatibility specific page" exists and/or is needed to track this to
   account for JDK for build and JDK supported in Netbeans,etc.)
   8. Account for nb-javac updates as applicable
   9. Update any hints/autocompletions (may be addressed by other places
   lib nb-javac) to help in adding/refactoring with new JDK support
   10. Start introducing JDK version specific functionality as needed (i.e.
   with JDK 8 add lambdas, JDK 9 add modules, records, etc.) where applicable
   (note: when introducing new feature this will impact above jdk properties
   mentioned earlier)

I'm sure there is more (including the details) but it seems a good place to
start to make doing so in the future a little easier.

Eric


Eric Bresie
ebresie@gmail.com


On Sat, Jan 15, 2022 at 4:15 AM Neil C Smith <ne...@apache.org> wrote:

> On Sat, 15 Jan 2022 at 05:25, Jaroslav Tulach <ja...@gmail.com>
> wrote:
> > út 11. 1. 2022 v 13:54 odesílatel Neil C Smith <ne...@apache.org>
> > > Anyone know if there's a non-hacky way to exclude a module from being
> > > included at all if building the IDE on JDK 8?
> >
> > There was an agreement to require JDK-11 to build NetBeans code.
>
> I know! :-)  However, unfortunately there are a few edge cases in
> release-related tasks, not to mention tests right now, that make
> dropping the ability to build on JDK 8 a little problematic.
>
> I was hoping to get something in NetBeans 13 that requires --release
> 11, but that will have to wait until 14 now.  Too close to branch
> anyway.
>
> > Our tests shall continue to run on JDK-8. There was no consensus to move
> > away from JDK-8 when running tests, as far as I can tell.
>
> Build on 11, test on 11, 17 and 8 - IMO in that order of priority
> though.  JDK 8 was where required and infrastructure can handle it.
> That might mean moving some identified testing to a daily thing,
> manual trigger or path based triggers.  There are ASF resource
> limitations to consider across GitHub, Travis and Jenkins here.
>
> > The ideal setup is shown at
> >
> https://github.com/apache/netbeans/blob/master/.github/workflows/ensure-jdk8.yml
>
> Yes, I've seen, and thanks for that.  Although there are other
> potential ways to do this I'm exploring too.  I started looking at
> updating testing, but waylaid by other things.  Hopefully between
> 13-rc1 and 13-rc2 we can get some additional changes in, in case
> there's anything to pick up before release.
>
> > E.g. build with JDK-11, but test on JDK-8. That's what needs to happen to
> > all CI jobs, before one can use `--release 11`.
>
> Yes, that was the thing I was hoping we had a way to short circuit.
> Which I guess we have if we did something like
> org.openide.util.enumerations and leave the jar empty.  May even be
> benefits in the short term to taking that approach.
>
> 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: Excluding a module from build depending on JDK?

Posted by Neil C Smith <ne...@apache.org>.
On Sat, 15 Jan 2022 at 05:25, Jaroslav Tulach <ja...@gmail.com> wrote:
> út 11. 1. 2022 v 13:54 odesílatel Neil C Smith <ne...@apache.org>
> > Anyone know if there's a non-hacky way to exclude a module from being
> > included at all if building the IDE on JDK 8?
>
> There was an agreement to require JDK-11 to build NetBeans code.

I know! :-)  However, unfortunately there are a few edge cases in
release-related tasks, not to mention tests right now, that make
dropping the ability to build on JDK 8 a little problematic.

I was hoping to get something in NetBeans 13 that requires --release
11, but that will have to wait until 14 now.  Too close to branch
anyway.

> Our tests shall continue to run on JDK-8. There was no consensus to move
> away from JDK-8 when running tests, as far as I can tell.

Build on 11, test on 11, 17 and 8 - IMO in that order of priority
though.  JDK 8 was where required and infrastructure can handle it.
That might mean moving some identified testing to a daily thing,
manual trigger or path based triggers.  There are ASF resource
limitations to consider across GitHub, Travis and Jenkins here.

> The ideal setup is shown at
> https://github.com/apache/netbeans/blob/master/.github/workflows/ensure-jdk8.yml

Yes, I've seen, and thanks for that.  Although there are other
potential ways to do this I'm exploring too.  I started looking at
updating testing, but waylaid by other things.  Hopefully between
13-rc1 and 13-rc2 we can get some additional changes in, in case
there's anything to pick up before release.

> E.g. build with JDK-11, but test on JDK-8. That's what needs to happen to
> all CI jobs, before one can use `--release 11`.

Yes, that was the thing I was hoping we had a way to short circuit.
Which I guess we have if we did something like
org.openide.util.enumerations and leave the jar empty.  May even be
benefits in the short term to taking that approach.

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: Excluding a module from build depending on JDK?

Posted by Jaroslav Tulach <ja...@gmail.com>.
út 11. 1. 2022 v 13:54 odesílatel Neil C Smith <ne...@apache.org>
napsal:

> Hi,
>
> Anyone know if there's a non-hacky way to exclude a module from being
> included at all if building the IDE on JDK 8?


There was an agreement to require JDK-11 to build NetBeans code.


> I was under the
> impression there might be in the conversations about support of
> --release 11, but I now think I might have misinterpreted something
> that was said.
>
> Ideally all our tests would be building on JDK 11 now,


Our tests shall continue to run on JDK-8. There was no consensus to move
away from JDK-8 when running tests, as far as I can tell.

The ideal setup is shown at
https://github.com/apache/netbeans/blob/master/.github/workflows/ensure-jdk8.yml

E.g. build with JDK-11, but test on JDK-8. That's what needs to happen to
all CI jobs, before one can use `--release 11`.
-jt