-
Notifications
You must be signed in to change notification settings - Fork 67
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
Restarting workspace should take into account changes to eclipse.ini #401
Restarting workspace should take into account changes to eclipse.ini #401
Conversation
4518b64
to
dd141e2
Compare
dd141e2
to
e5c3581
Compare
@jonahgraham can you please add reviewers? |
@jonahgraham a kind reminder.. |
@tjwatson can you CC in someone well suited to review this? |
@umairsair this change seem to contain different aspects beside the restarting itself, do you think you can split up some parts in a preliminary PR, this would make this a bit easier to review, e.g. it seem to modify the way how things are build and adds some test as well such things can be maybe reviewed/merged already independent from this. |
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.
This also seem to contain a lot of whitespace changes, also the using of pure maven module seem at least unusual for eclipse projects and might be worth to be explained somewhere in a readme how to develop / test such embedded projects (its currently part of the feature).
In the past that has been @sravanlakkimsetti . Sravan, are you aware of someone else ramping up on the launcher? Perhaps @elsazac |
@gireeshpunathil and @mpalat Can you please take a look? |
will do. relatively huge change set, so pls expect some time to complete the review; but we will get there. thanks! |
@laeubi , thanks for reviewing the PR..
everything is related here.. there was no testing framework for launcher testing, so I had to develop it from scratch for testing the changeset done for fixing the restart issue.. and there is no change in current build workflow, the only change is that tests are integrated using new target in the makefile.. we can split the PR but I think it'll simply add overhead because there are only 3 files (one consts file, one small dummy application and one file which actually contains tests) related to testing framework and most tests are related to changeset of this PR..
Yes, there is one place in
yeah! I am not sure if we have any testing framework available for any native eclipse stuff? I used this approach to test eclipse IDE and launcher integration using the test java application which mocks eclipse application.. so this is probably very specific case.. I kept it in feature because of two reasons;
|
b4d88b8
to
c190b13
Compare
Hello Reviewers, kindly provide your feedback.. |
@umairsair Sorry for the delay. I will be reviewing this by end of this week |
a kind reminder! |
started reviewing the native code |
@umairsair I have some queries here. You can test this flow by pointing -vm to jvm.dll in bin/server folder |
Yes, currently windows tests are using dlls and linux tests are using java executable (default behavior of launcher when vm arg is not mentioned), hence both are being tested. |
In that case lets take this in.
|
I'll rebase but this version is updated by jenkins job. |
c190b13
to
e01ea10
Compare
I have updated the version as well and IIUC it has something to do with compatibility.. but kindly explain why are we updating it? Also, have you reviewed this PR? |
e01ea10
to
62924b5
Compare
In the version number last two parts are updated by jenkins job. First two digits are manually updated. We do update first two digits for a major change. For this reason I asked you to update the version. |
Background: =========== There are 3 return codes supported by Eclipse - 0 - Normal exit - 23 - Restart the eclipse with previous launcher arguments - 24 - Restart the eclipse with the arguments provided by Eclipse application itself The above mentioned problem is not with the exit code 23. The reason is that the eclipse launcher restarts itself in this case, hence eclipse.ini is also reloaded. However eclipse launcher does not restart itself in case of code 24 and parses the arguments provided by Eclipse application in shared memory and simply relaunches java, which means that eclipse.ini will not be reloaded. For restarts, eclipse should be using code 23 but we had to switch to code 24 to fix following issue. [[WorkbenchLauncher] Restart asks for the workspace to run](https://bugs.eclipse.org/bugs/show_bug.cgi?id=264072) And then the fix of following built up on it. [[Workspace chooser] "Older Workspace Version" dialog: "Cancel" button shouldn't close Eclipse but go back to workspace chooser](https://bugs.eclipse.org/bugs/show_bug.cgi?id=538830) Fix: ==== For code 24, the arguments in shared memory are for launcher, so instead of launcher just parsing the args and relaunching java, it should restart the launcher with appropriate arguments. With relaunching the launcher, eclipse.ini will be reloaded like its done for code 23. Eclipse launcher is updated to relaunch for code 24 as well. Moreover, there are 3 new launcher arguments introduced, 2 are internal to launcher and one is external to launcher and can be set by eclipse application as a relaunch argument. - `--launcher.oldUserArgsStart` and `--launcher.oldUserArgsEnd`: The user arguments passed to eclipse launcher for first start are tracked between these arguments during relaunches. E.g., if eclipse was started as `eclipse A B C` where A B C are some arguments to launcher and for relaunch, Eclipse application mentioned `X Y Z` arguments then relaunch command will be `eclipse --launcher.oldUserArgsStart A B C --launcher.oldUserArgsEnd A B C X Y Z`. Moreover, launcher relaunch will ignore all arguments between and including `--launcher.oldUserArgsStart` and `--launcher.oldUserArgsEnd`. - `--launcher.skipOldUserArgs`: If eclipse application wants to relaunch with provided arguments only and ignore the older user args then it can mention this argument. So for the case where eclipse was started as `eclipse A B C` and Eclipse application mentioned `X Y Z` as relaunch arguments along with `--launcher.skipOldUserArgs` then relaunch command will be `eclipse --launcher.oldUserArgsStart A B C --launcher.oldUserArgsEnd X Y Z` where launcher relaunch will ignore all arguments between and including `--launcher.oldUserArgsStart` and `--launcher.oldUserArgsEnd`. For restarts, Eclipse application just mentions the `-data` argument now as relaunch arguments instead of mentioning complete java args. However, user can still mention more arguments for relaunch and Eclipse restart will respect them as well and append the `-data` argument at the end of user arguments.
62924b5
to
6e105e3
Compare
@sravanlakkimsetti anything pending before we can merge it? |
ea55286
into
eclipse-equinox:master
@sravanlakkimsetti : do we need to trigger a rebuild of native launchers, update aggregator or something like this? |
Thats correct. I triggered launcher build. But there is an issue in mac launcher build @umairsair I got this error Can you please let me know what needs to be done here
|
for your reference the build job for launcher https://ci.eclipse.org/releng/view/Launcher/job/Build-eclipse-launcher/93/ |
I'll take a look. |
New libraries have been built eclipse-equinox/equinox.binaries@a768faa |
@sravanlakkimsetti following PR also needs to be merged eclipse-platform/eclipse.platform.ui#1307 Moreover, do we need to add N&N entry somewhere or we are good without it? |
Although it's kind of a hidden feature, I personally think it's still worth writing an N & N description of this very nice cool improvement! FYI @jonahgraham |
@umairsair Please verify this feature in next build. |
We are just about to have the 2024-06 / 4.32 release. This is the first time that the this code will be heavily exercised, especially since we have a new Java version in 2024-06. I am delighted to see it seems to be working very well. Also, while it is a small thing - it is really nice that when users update to 2024-06 the splash screen shows the new version you just updated to instead of the old splash screen. Thanks again @umairsair for this work. |
Yes I too have experienced the benefits many times because oomph has eclipse ini tasks that now take effect with a simple restart. Many 🙏 |
Background:
There are 3 return codes supported by Eclipse
The above mentioned problem is not with the exit code 23. The reason is that the eclipse launcher restarts itself in this case, hence eclipse.ini is also reloaded. However eclipse launcher does not restart itself in case of code 24 and parses the arguments provided by Eclipse application in shared memory and simply relaunches java, which means that eclipse.ini will not be reloaded.
For restarts, eclipse should be using code 23 but we had to switch to code 24 to fix following issue.
[WorkbenchLauncher] Restart asks for the workspace to run
And then the fix of following built up on it.
[Workspace chooser] "Older Workspace Version" dialog: "Cancel" button shouldn't close Eclipse but go back to workspace chooser
Fix:
For code 24, the arguments in shared memory are for launcher, so instead of launcher just parsing the args and relaunching java, it should restart the launcher with appropriate arguments. With relaunching the launcher, eclipse.ini will be reloaded like its done for code 23.
Eclipse launcher is updated to relaunch for code 24 as well. Moreover, there are 3 new launcher arguments introduced, 2 are internal to launcher and one is external to launcher and can be set by eclipse application as a relaunch argument.
--launcher.oldUserArgsStart
and--launcher.oldUserArgsEnd
: The user arguments passed to eclipse launcher for first start are tracked between these arguments during relaunches. E.g., if eclipse was started aseclipse A B C
where A B C are some arguments to launcher and for relaunch, Eclipse application mentionedX Y Z
arguments then relaunch command will beeclipse --launcher.oldUserArgsStart A B C --launcher.oldUserArgsEnd A B C X Y Z
. Moreover, launcher relaunch will ignore all arguments between and including--launcher.oldUserArgsStart
and--launcher.oldUserArgsEnd
.--launcher.skipOldUserArgs
: If eclipse application wants to relaunch with provided arguments only and ignore the older user args then it can mention this argument. So for the case where eclipse was started aseclipse A B C
and Eclipse application mentionedX Y Z
as relaunch arguments along with--launcher.skipOldUserArgs
then relaunch command will beeclipse --launcher.oldUserArgsStart A B C --launcher.oldUserArgsEnd X Y Z
where launcher relaunch will ignore all arguments between and including--launcher.oldUserArgsStart
and--launcher.oldUserArgsEnd
.For restarts, Eclipse application just mentions the
-data
argument now as relaunch arguments instead of mentioning complete java args. However, user can still mention more arguments for relaunch and Eclipse restart will respect them as well and append the-data
argument at the end of user arguments.See also eclipse-platform/eclipse.platform.ui#1307
Fixes eclipse-equinox/p2#166