Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use default javac release option for the NetBeans build #5455

Closed
wants to merge 3 commits into from

Conversation

mbien
Copy link
Member

@mbien mbien commented Feb 9, 2023

follow up to #5122

attempt to remove project specific javac.source/target/release properties and sets them to javac.default.release in common.xml so that projects can still overwrite the default where required (example would be java/java.disco).

skipped some paths which used build-impl.xml (or other custom builds) instead of the NB infrastructure:

  • nbi/
  • webcommon/cordova/
  • java/java.j2seproject/copylibstask/
  • java/javawebstart/AntTasks/

full build is working locally and CV tests are green too (tested with JDK 19), ran only rudimentary manual tests.

this created an interesting problem I didn't anticipate:

NetBeans doesn't know anymore what javac level the projects have when they are opened. Have to find a fix for that.

but first lets see if a full test run is green / what is missing.

@jlahoda jlahoda marked this pull request as ready for review February 9, 2023 08:14
@jlahoda jlahoda marked this pull request as draft February 9, 2023 08:15
@jlahoda
Copy link
Contributor

jlahoda commented Feb 9, 2023

Sorry i misclicked and marked it as ready by accident.

@mbien
Copy link
Member Author

mbien commented Feb 9, 2023

haha. looks like most tests except those few I ran locally are red. Going to take another look.

@neilcsmith-net
Copy link
Member

neilcsmith-net commented Feb 10, 2023

Think we might have a little bit of work to do! 😄 I only searched for javac.target, so stupidly missed how many more modules just set javac.source! 🙄

Maybe it would be better for now to keep the setting pattern used in a few with -

javac.target=${default.javac.target}

Could expand that to set javac.source from a new default.javac.source property? Or set them both to a default.javac.release property?

javac.source=${default.javac.release}
javac.target=${default.javac.release}

@tbw777

This comment was marked as off-topic.

@neilcsmith-net

This comment was marked as off-topic.

@tbw777

This comment was marked as off-topic.

@neilcsmith-net

This comment was marked as off-topic.

excludes:
 - nbi/
 - webcommon/cordova/
 - java/java.j2seproject/copylibstask/
 - java/javawebstart/AntTasks/
@mbien mbien force-pushed the default-javac-release-option branch from 6c02012 to ed595e0 Compare February 11, 2023 14:20
@mbien
Copy link
Member Author

mbien commented Feb 11, 2023

Think we might have a little bit of work to do! smile I only searched for javac.target, so stupidly missed how many more modules just set javac.source! roll_eyes

the reason for that is because the custom javac ant task is mapping the properties in a non-standard way:
https://github.com/apache/netbeans/blob/master/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java#L68-L100

but we are getting there. The good thing is that all values are now basically the same.

i saw this in the log The Java platform version 8 or higher was requested but only 1.8 is running. This indicates that i clearly overlooked some usages of the target property. Because this sounds like a module system warning so the number must have made it into the manifest.

" or higher was requested but only " + Dependency.JAVA_SPEC + " is running.");

I did set source/target to 1.8 for the current test run.

going to try to get the default release property in too so that we can use it for all the other javac calls, e.g
bf8c26d

@matthiasblaesing
Copy link
Contributor

Think we might have a little bit of work to do! smile I only searched for javac.target, so stupidly missed how many more modules just set javac.source! roll_eyes

the reason for that is because the custom javac ant task is mapping the properties in a non-standard way: https://github.com/apache/netbeans/blob/master/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java#L68-L100

That is a n artifact of the NetBeans build itself, so the task is not set in stone and could be changed.

@mbien mbien mentioned this pull request Mar 12, 2023
@mbien
Copy link
Member Author

mbien commented Mar 25, 2024

lets try this first: #7188

@mbien mbien closed this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants