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

Make JDK URL calculation JDK 8 compatible #5748

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

matthiasblaesing
Copy link
Contributor

No description provided.

@matthiasblaesing matthiasblaesing requested a review from mbien March 30, 2023 20:24
@matthiasblaesing
Copy link
Contributor Author

@mbien please review. The build with nbjavac revealed, that method was used, that is not compatible with JDK 8 (datesUntil was introduced with 9). I think the replacement code is similar compact, equally readable and compatible with JDK8.

The reason this was not caught earlier, that modules with requires.nb.javac set normally don't set --release, while the nbjavac build seems to be ok with that and caught it.

Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthiasblaesing thanks for fixing this, looks good.

The reason this was not caught earlier, that modules with requires.nb.javac set normally don't set --release, while the nbjavac build seems to be ok with that and caught it.

yeah as soon modules set requires.nb.javac=true they are all prone to link against the "wrong" JDK version ATM, since they can't actually use the release option. Interesting that this doesn't cause issues more often since this is actually fairly dangerous, but might indicate that nobody is trying to run anything on JDK 8.

The build would need a JDK 8 installation somewhere which it could use as boot cp for all modules which set requires.nb.javac=true (and should probably fail otherwise for release builds).

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) JavaDoc [ci] enable java/javadoc tests and build-javadoc target labels Mar 30, 2023
@apache apache locked and limited conversation to collaborators Mar 30, 2023
@apache apache unlocked this conversation Mar 30, 2023
@mbien mbien added this to the NB18 milestone Mar 30, 2023
@mbien
Copy link
Member

mbien commented Mar 31, 2023

gonna have to take a look at the html lexer test, it failed three times in a row at:

junit.framework.AssertionFailedError
    at org.netbeans.api.html.lexer.HtmlLexerPluginTest$TestPlugin.createAttributeEmbedding(HtmlLexerPluginTest.java:177)

could be wrapped into retry script as quick fix

Copy link
Contributor

@jtulach jtulach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Better than my 8018019

@jtulach
Copy link
Contributor

jtulach commented Mar 31, 2023

The build with nbjavac revealed, that method was used, that is not compatible with JDK 8

With a bit of satisfying feeling I'd say: nb-javac build (#5609) helped us make NetBeans better.

@mbien
Copy link
Member

mbien commented Mar 31, 2023

With a bit of satisfying feeling I'd say: nb-javac build (#5609) helped us make NetBeans better.

its very unlikely the issue would have made it into the release, I merged that PR a few days ago and didn't update my dev build yet. One day nb-javac dependent modules will hopefully link against the right JDK which would fix this issue which we knew about for a while, its somewhere down on my todo-fix list even though I rather want to work on features/bug fixes instead of nb-javac issues.

@matthiasblaesing
Copy link
Contributor Author

Thank you both for review, will get this in know.

@mbien thank you for the headsup regarding the failing test. It seems to be an artifact from my work on the html lexer and needs some insane code. For the case that fails here this is the text:

u >z//<=>=>
= 
>>>/>>//w>
 yl>be<<=k<uA>  F > Y <<<
 >Jj/>k >>  ==a <z<=z  ><=r>>> =N///>>>/><< 
EN>/>r> >p<<<L = > =<g=<C /=/   
 q=R>  >B >=>z= />> J o  </>/>zn/><<>   z/>/>G=>nm< 

I'll look into this later, as this is not a fallout of this change.

@matthiasblaesing matthiasblaesing merged commit 3414856 into apache:master Mar 31, 2023
@mbien
Copy link
Member

mbien commented Mar 31, 2023

u >z//<=>=>
= 
>>>/>>//w>
 yl>be<<=k<uA>  F > Y <<<
 >Jj/>k >>  ==a <z<=z  ><=r>>> =N///>>>/><< 
EN>/>r> >p<<<L = > =<g=<C /=/   
 q=R>  >B >=>z= />> J o  </>/>zn/><<>   z/>/>G=>nm< 

I'll look into this later, as this is not a fallout of this change.

oh boy, haha! The lexer made up its own language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) JavaDoc [ci] enable java/javadoc tests and build-javadoc target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants