-
Notifications
You must be signed in to change notification settings - Fork 821
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
Do not suggest to install nb-javac on JDK 14+ #2108
Conversation
@jlahoda : This way it needs changing every half year after new JDK release? |
We’re working specifically on 12.0 right now. And 12.0 will always only support up to JDK 14 and not beyond. But this covers 14 or beyond. |
It may need changes when we add a new nb-javac (which will support e.g. 14). But until we add a new nb-javac, there shouldn't be a need to change. Note SourceVersion.RELEASE_14 will not cease to exist in JDK 15 - there still exists SourceVersion.RELEASE_2. |
But if for example JDK15 gets released you have to add RELEASE_15 as well. So you have to add a new version every half year until nb-javac gets finally removed? |
If nb-javac is not upgraded, and JDK 15 is released, I don't think we need to do anything special here. SourceVersion.RELEASE_14 will still exist, the method will still return true, and the pop-up still will not be shown. Do I miss something? |
Your right, this way it should work. :-) |
Should this logic also control the dialog at netbeans/java/java.source/src/org/netbeans/modules/java/source/JBrowseModule.java Line 81 in 74728a1
In fact, should we drop the latter notification completely? Or have a preference / property to stop any of this being shown? I may have a bias in wanting that! 😉 |
Sorry, ignore previous comment - misread as calling same method on +1 |
Starting NetBeans 11.3 with a clean user directory, and declining to install nbjavac, I see that the "Compile on Save" checkbox is simply disabled in the "Project Properties" dialog of a newly created maven java project. The "Learn More about Compile On Save" link that does show up in said dialog points to information that does not mention nb-javac at all. Desired behavior: The "Compile on Save" checkbox should be enabled even if nb-javac is not installed. If it is checked, the user should be prompted to install nb-javac. I think this needs to be fixed before we stop recommending nb-javac by default. |
Also note that nb-javac is still recommended/installed by the "Additional modules are recommended to run Java SE support" dialog that shows up if you try to create a Java project in a NetBeans distribution that does not have Java SE initially installed (as when you compile netbeans sources and invoke "ant tryme"). |
@eirikbakke that conversation is probably better having on dev@. This is currently about a very specific issue with NB 12.0 and lack of nb-javac for JDK 14 before release date. |
The specific issue with this patch is that it makes an existing feature (Compile-on-Save) appear broken from the user's point of view (even though it can still be used by installing nb-javac). Proposed trivial fix: Change CustomizerCompile.CompileOnSave to "Compile on &Save (requires nb-javac plugin)" in each of the following files: java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/ui/customizer/Bundle.properties This UI detail is my only concern here. |
Hmm, hold on, the "Compile on Save" checkbox string that shows up in Project Properties is somewhere else. Trying to locate it in and building netbeans to verify that it changes in the UI... |
Here's the proposed change in UI wording:
This would show up as follows: |
@jlahoda do you think @eirikbakke UI changes can be done ? |
Surely @eirikbakke can just put a PR in with that UI change? Seems a good thing to have in 12.0, but not sure why it needs to be in this change. (aside - disabled compile-on-save is one of the good sides of leaving nb-javac uninstalled!) |
The PR as it stands breaks existing functionality (CoS)--the proposed UI change was a way to mitigate that so that the PR can be safely merged.
Not sure I follow? |
@eirikbakke the PR fixes a big issue with existing functionality, at least and unless we are able to ship an update for nb-javac supporting JDK 14 in a 12.0 update. nb-javac is meant to be optional, therefore CoS has always been optional in Apache. This doesn't change that, and needs to go in. Your UI change would also be a good improvement, just wouldn't want to see this held up on it. The joke aside was just because multiple people, including me, have a tendency to disable CoS anyway - has its own caveats. |
I assumed the UI change would be uncontroversial. But having stated my concerns, I'll leave it to you.
Ah. In my case, I'm really dependent on CoS--disabling it makes my Edit/Compile/Run cycle go from 15 seconds to 96 seconds. And it also causes problems with "Apply Changes" in the debugger, which I use to make instant changes without restarting my application. (I have a multi-module maven-based NetBeans Platform project.) |
I've added the UI changes (a separate PR might be better, but hopefully this is not that huge problem - just if we squash, we should mention that @eirikbakke contributed to the change). |
@jlahoda 👍 Should we have a matching UI addition in the NBM description inside the third-party UC? Warning people that nb-javac only supports editing up to Java 13? If people go to the plugin centre to install it still, they may need a warning until there is an update available? |
how to merge that to get @eirikbakke in ? |
My "contribution" was meant as a trivial change... no need to mention me specifically. Or if for provenance purposes, just mention it in the commit message. |
@ebarboni - I assume this will be squashed, so I think it would be enough to edit the comment to mention Eirik. I can do the merge, if you want and approve. |
@jlahoda description looks good, thanks! |
@jlahoda do the merge. it's ok |
No description provided.