-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix console launcher not consulting eclipse.ini to read vmargs when there is no console window (#117) #118
Conversation
630da84
to
27ae5ac
Compare
@niraj-modi would you please review this patch? |
@nnemkin Is it possible that you review this patch ? |
I just stumbled on this same problem yesterday. |
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.
I've had a look too and it LGTM and better than existing solution all around, especially as it fixes the comment "should look for a better way to do this"
Please merge this in at the beginning of the 2023-03 dev cycle. (I'm not an equinox committer)
…here is no console window (eclipse-equinox#117) Processes on Windows can be created without a window using the CREATE_NO_WINDOW flag. When the console launcher eclipsec.exe is started as such a process, the isConsoleLauncher function wrongly returns 0 because there is no console window and hence, only eclipsec.ini is consulted for vmargs but not eclipse.ini (see also functions getConfigArgs and getIniFile). The fix is to properly propagate the launcher mode from main to the launcher DLL and removing the incomplete isConsoleLauncher function entirely.
@vogella are you planning to do more work/review on this PR or was your force-push just a rebase? |
Just a rebate. Can you check the failing tests? |
I have no idea why the test testCircularityHandling (org.eclipse.equinox.ds.tests.tbc.DSTest) would fail with this change. |
I'm pretty sure the native libraries code isn't built & tested anyway on PR's, and there are no tests for that change either. The binaries are supposed to be built manually via magic jenkins jobs, see #16 (comment) More important question is: has anyone tried to build the code and test if that change actually works? |
No, I've not built it and I don't even have enough permission to do it on the Jenkins job. |
Using the github action approach in #247, I've been able to validate the functionality using the following approach:
The java application contains the following code: public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
String path = "C:\\tmp\\eclipse";
Process proc = new ProcessBuilder(path + "\\eclipsec.exe")
.directory(new File(path))
.start();
System.out.println("Exit code: " + proc.waitFor());
try (BufferedReader is = new BufferedReader(new InputStreamReader(proc.getInputStream()))) {
String line;
while ((line = is.readLine()) != null) {
System.out.println(line);
}
}
}
} When running the application defined above with the Eclipse 2023-03 SimRel binaries, the property cannot be extracted:
When running it with the binaries produces with pr/118, then I instead get the following result:
Other than a rebase and removing some trailing whitespace, I would say that this PR is ready for a merge (keep in mind that I'm not an equinox committer). What's the next step to get this change merged? |
Merging based on Torbjorn-Svensson review. |
Thanks @jonathan-meier and @Torbjorn-Svensson for working in this and testing it. We (PMC) decided a while ago that should remove the native support for splash screen from the launcher as the assumption was that this would greatly simplify the launcher code. Maybe something you could help with, in case you also think that simplification of the launcher code might be helpful. |
In the area of the launcher the following would be also an interesting issue. |
See #117 (comment)
|
Fixes #117. The fix is to properly propagate the launcher mode from
main
to the launcher DLL and removing the incompleteisConsoleLauncher
function entirely.