-
Notifications
You must be signed in to change notification settings - Fork 917
Enhance launcher #8408
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
Enhance launcher #8408
Conversation
matthiasblaesing
commented
Apr 8, 2025
- Enhance windows launcher to use PATH and JAVA_HOME environment variables as potential JDK homes
- Enhance IDE launcher to support substitution of variables in most configuration options
…les as potential JDK homes
0d68d23 to
b941014
Compare
|
Thanks for looking at this. Generally (not tested yet) looks good. Have you tested with the platform launcher? IIRC this extends the IDE launcher Need to make sure everything is still working as expected there, and that it's picking up the new basedir changes. When this is ready for merging, please add an additional commit mirroring the one at 272ebc2 to update the various versions to |
|
smoke test worked:
looking through the code: |
|
Assuming Windows platform launcher is picking up the change correctly, incidentally, this will need the platform Unix launcher altering too - https://github.com/apache/netbeans/blob/master/harness/apisupport.harness/release/launchers/app.sh#L36 That will need the same The sooner we can consolidate launchers in one place the better! (hint, hint, @mbien 😄 )
Given that the Unix launcher sources the conf as a shell script, that's likely the right behaviour. I assume we don't want to support adding |
The list of supported variables is:
everything else is undefined behavior (this wording makes me like C 😁 ) and unsupported.
The platform launcher will not pickup this. The variable substitution described above is in the IDE launcher. |
yes but you have to add "in that order" ;) |
If you mean, that one of these values holds a variable itself, then yes, we are well in "undefined behavior" territory. |
arg f*** now I understand what you mean. The chain is harness launcher -> ide launcher -> platform launcher for windows and harness launcher -> platform launcher for the rest. One of the moments where I want to have a serious talk with the original developers.... |
|
maybe I didn't describe it well enough example: this won't insert swapping the properties in the config file fixes it: |
|
@mbien try that in a shell script. Does it work there? |
|
Please stop discussion undefined behavior here. Any variable apart from four explicitly mentioned variables is undefined behavior and replacements more than one level deep are undefined behavior. Lets keep this focused on fixing a single problem. |
puts on undefined behavior list |
|
I don't have a platform application, so I only stared at the launcher code, put harness configuration and launcher configuration side by side and aligned the relevant parts. So my theory would be, that now platform also works. It would be great if a platform user could test this. The new commit will be squashed into the substitution commit (second one). |
neilcsmith-net
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks @matthiasblaesing ! 😄 Bunch of testing done.
Tested the app.sh launcher on Ubuntu with a a platform application - all seems to work well and pick up new token.
Tested the Windows launcher from https://github.com/apache/netbeans/actions/runs/14364396031 in a platform application. Working to set jdkhome with BASEDIR. Also added netbeans-javaagent.jar from build on #8361 to the platform application with config and debug option - registered and transformed the clipboard as far as I can tell (my machine has never replicated the actual bug but logging to console verified).
Slightly ugly paths in the logs, as suspected at #8361 (comment) but as Windows generally seems OK with / nothing seems to actually break.
All in all, great job on this and the agent! ❤️
If you can squash as needed, then add a separate commit with the versions as requested, I think we should get this PR in ASAP and through the necessary vote to allow integration before freeze. Give me a shout if you'd rather not handle the vote admin.
…most configuration options - Added $BASEDIR to supported list of variables (represents base of NetBeans/Application installation) - Allow usage of $DEFAULT_USERDIR_ROOT, $DEFAULT_CACHEDIR_ROOT, $HOME and $BASEDIR in configuration options: - netbeans_default_userdir / default_userdir - netbeans_default_cachedir / default_cachedir - netbeans_default_options / default_options - netbeans_jdkhome / jdkhome
3459c82 to
d30154c
Compare
|
@neilcsmith-net thank you very much for testing and review. I squashed and added the version bump commit. Would you mind having a final look? If ok, I'll merge and the prepare the vote threat. Thanks for willing to help with the vote, I'd like to do it myself, so that not there are more people here, that did "it". |
|
Looks good from a glance at diff on my phone. It looks like you found one missing from last time too. Artefacts will then be version Great that you'll run vote. More people knowing processes the better. Just aware I've been pushing for changes and pushing to get this in before we branch! |