eclipse-equinox / equinox.bundles

Eclipse Public License 2.0
8 stars 16 forks source link

-Dosgi.dataAreaRequiresExplicitInit=true doesn't work anymore #21

Closed iloveeclipse closed 2 years ago

iloveeclipse commented 2 years ago

While reviewing https://github.com/eclipse-platform/eclipse.platform.resources/pull/71 I've found, that I'm able to silently init a workspace (with default value) without specifying workspace location explicitly via prompt or -data argument, even if -Dosgi.dataAreaRequiresExplicitInit=true is set in eclipse.ini.

This is a regression, so bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=514333 is back.

I'm investigating where it was broken... 4.19 is OK, 4.20 is broken...

OK, regression is coming from

Ironically, commit message was The start code for the plugin can be migrated to run inside Workspace without changing existing behaviour....

tjwatson commented 2 years ago

It seems we don't have tests for this?

iloveeclipse commented 2 years ago

Yes, we don't have tests. If you have a pointer how a test could be added that tests Eclipse startup with some custom launch arguments and checks something from inside that Eclipse, I could add one.

tjwatson commented 2 years ago

Yes, we don't have tests. If you have a pointer how a test could be added that tests Eclipse startup with some custom launch arguments and checks something from inside that Eclipse, I could add one.

There is something called session tests that can be run. It is not the most elegant way of testing but it can be done. Here is one of the more "simple" testcases I found that uses it where the testcase is setting some specific values in a config.ini: org.eclipse.osgi.tests.configuration.EclipseStarterConfigIniTest

iloveeclipse commented 2 years ago

OK, I have a fix but that is in resources, so I will close this issue and reopen one in platform resources.

iloveeclipse commented 2 years ago

Proposed fix: https://github.com/eclipse-platform/eclipse.platform.runtime/pull/36