Skip to content
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

Provide an Oomph setup and update dependencies to the latest versions #96

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ org.eclipse.nebula.widgets.nattable.examples/src/examples.index
org.eclipse.nebula.widgets.nattable.examples/src/**/Issue*.java

.polyglot*

.settings
.project
target-platform/target-platform-gen.target
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>4.0.7</version>
<version>4.0.8</version>
</extension>
</extensions>
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
[Enter License Description here.]
</license>

<requires>
<import plugin="org.slf4j.api"/>
</requires>

<plugin
id="org.eclipse.nebula.widgets.nattable.examples.e4"
download-size="0"
Expand All @@ -45,15 +41,15 @@
unpack="false"/>

<plugin
id="org.slf4j.binding.simple"
id="slf4j.simple"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>

<plugin
id="org.slf4j.api"
id="slf4j.api"
download-size="0"
install-size="0"
version="0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,13 @@ version(s), and exceptions or additional permissions here}.&quot;
</features>

<configurations>
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="org.apache.aries.spifly.dynamic.bundle" autoStart="true" startLevel="2"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is spifly already available in 2020-06?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's available in Orbit. Also equinox.ds was removed quite some time ago. As long as the product works, I doesn't seem to matter...

<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4"/>
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1"/>
<plugin id="slf4j.simple" autoStart="true" startLevel="2"/>
</configurations>

<preferencesInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
</requires>

<plugin
id="javax.annotation"
id="jakarta.annotation-api"
download-size="28"
install-size="58"
version="0.0.0"
unpack="false"/>

<plugin
id="javax.inject"
id="jakarta.inject.jakarta.inject-api"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do those bundles already exist in the 2020-06 release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need to exist in a specific release? It's available in Orbit.

I think it's actually better if we remove this entirely. See comments below.

download-size="16"
install-size="28"
version="0.0.0"
Expand Down Expand Up @@ -302,13 +302,6 @@
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.equinox.ds"
download-size="192"
install-size="394"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.equinox.event"
download-size="33"
Expand Down Expand Up @@ -374,13 +367,6 @@
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.equinox.util"
download-size="75"
install-size="139"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.jface"
download-size="1061"
Expand Down Expand Up @@ -457,34 +443,6 @@
fragment="true"
unpack="false"/>

<plugin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the extended xml apis come with some other feature? Because here you only remove the single bundles but I don't see the extended xml apis added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platform has moved entirely away from including 3rd party bundles in features. It's not necessary and generally problematic because it locks in a very specific version preventing updates and causing duplicates when someone else does the same but with a different version.

See no includes of batik any any feature:

image

No inject either:

image

So my suggestion would be to prune down the includes as much as possible so that it doesn't lock in specific versions of anything except your own bundles...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I have seen that there is now an option to automatically include dependencies. But from my experience this adds much more bundles than really necessary. And the dependency to com.ibm.icu is transitively because of some org.eclipse bundle IIRC. I did quite some work to ensure the example application is minimal in size, which is now about 36MB. I will check how big it gets now. But if com.ibm.icu sneeks in, it probably gets at least 14MB bigger.
So yes, there are mechanisms to make it easier to create an application and resolve dependencies automatically, the mechanism is not really economic and adds bundles that are not really required and increases the size.
I will take that up myself. So you don't need to bother. I'll keep you updated on what happens in that area.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't mix up what the IDE does and what Tycho does. In any case, it's quick to see what's in the product:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should keep in mind that every time you include a feature a bundle that as not your own, you're feature cannot be easily installed in general when there are other versions of that bundle installed. That's especially true for singleton bundles.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. :) But as I said, that feature was never meant to be used by anyone else than the NatTable Examples Application. Interestingly your screenshot shows only half of the bundles that are really included. All the Eclipse Platform bundles are not included. If I check the folder directly there are twice as much bundles.

But again, nevermind, I will check and verify it myself. I see that the product archive files are now > 10MB bigger, but com.ibm.icu is not included anymore. So not sure where the additional size is coming from.

Anyhow your changes seem to simplify the example product setup, and maybe I am able to simplify it even more.

id="org.w3c.css.sac"
download-size="37"
install-size="65"
version="0.0.0"
unpack="false"/>

<plugin
id="org.w3c.dom.events"
download-size="17"
install-size="26"
version="0.0.0"
unpack="false"/>

<plugin
id="org.w3c.dom.smil"
download-size="19"
install-size="37"
version="0.0.0"
unpack="false"/>

<plugin
id="org.w3c.dom.svg"
download-size="95"
install-size="140"
version="0.0.0"
unpack="false"/>

<plugin
id="org.apache.felix.scr"
download-size="0"
Expand Down Expand Up @@ -521,7 +479,7 @@
unpack="false"/>

<plugin
id="org.apache.commons.io"
id="org.apache.commons.commons-io"
download-size="0"
install-size="0"
version="0.0.0"
Expand All @@ -548,11 +506,4 @@
version="0.0.0"
unpack="false"/>

<plugin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added com.ibm.icu.base in the past to reduce the size of the product, because com.ibm.icu is a huge bundle from which only a very limited set is actually needed. Has this changed in the meanwhile? Is com.ibm.icu not needed anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't exist anymore. If some bundle needs something, it will be found. I don't see any direct dependencies on it. Again, like the above. The dependencies are being over-specified and in a way that's very restrictive and makes it impossible to use your feature except in very restricted installations. Hasn't anyone complained about that? Or maybe no one is using the feature because it's not so useful?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nobody ever used it, because it is not published. It is only part of the NatTable Examples Application. And it is used to keep the product size as small as possible. That was necessary in the past, as the size was almost twice as big as needed. But probably this is not the case anymore and I can drop that feature completely. The main intention back then was to get rid of com.ibm.icu and replace it with com.ibm.icu.base. If this is not needed anymore, I probably can switch to the e4.rcp.feature provided by the Platform. Will check this.

id="com.ibm.icu.base"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: NatTable Eclipse 4 Examples
Bundle-SymbolicName: org.eclipse.nebula.widgets.nattable.examples.e4;singleton:=true
Bundle-Version: 2.4.0.qualifier
Require-Bundle: javax.inject;bundle-version="0.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is javax.inject now part of one of the other bundles and the import resolves because of that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package imports will find some appropriate bundle that exports the package without need for a bundle require. There are jakarta bundles that export this package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I somehow had both Require-Bundle and Import-Package. IIRC there was an issue in the past with the one or the other. If the Import-Package statement is sufficient now, I am happy to get rid of another Require-Bundle.

Remember that I was building against a pretty old Eclipse version and needed to solve issues with ugly workarounds. If they are not needed anymore, I am more than happy.

org.eclipse.core.runtime;bundle-version="0.0.0",
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0",
org.eclipse.swt;bundle-version="0.0.0",
org.eclipse.e4.ui.model.workbench;bundle-version="0.0.0",
org.eclipse.jface;bundle-version="0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Require-Bundle: ca.odell.glazedlists,
org.eclipse.nebula.widgets.nattable.extension.poi,
org.eclipse.nebula.widgets.richtext,
org.apache.commons.math3,
org.apache.commons.collections4
org.apache.commons.commons-collections4
Bundle-Vendor: Eclipse Nebula NatTable
Export-Package: org.eclipse.nebula.widgets.nattable.examples,
org.eclipse.nebula.widgets.nattable.examples.runner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
unpack="false"/>

<plugin
id="org.apache.commons.codec"
id="org.apache.commons.commons-codec"
download-size="0"
install-size="0"
version="0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
unpack="false"/>

<plugin
id="org.apache.commons.collections4"
id="org.apache.commons.commons-collections4"
download-size="0"
install-size="0"
version="0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Bundle-SymbolicName: org.eclipse.nebula.widgets.nattable.extension.poi
Bundle-Version: 2.4.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.nebula.widgets.nattable.extension.poi;version="2.4.0"
Import-Package: org.apache.poi.hssf.usermodel;version="[4.1.1,5.0.0)",
org.apache.poi.ss.usermodel;version="[4.1.1,5.0.0)",
org.apache.poi.ss.util;version="[4.1.1,5.0.0)",
org.apache.poi.util;version="[4.1.1,5.0.0)",
Import-Package: org.apache.poi.hssf.usermodel;version="[5.0.0,6.0.0)",
org.apache.poi.ss.usermodel;version="[5.0.0,6.0.0)",
org.apache.poi.ss.util;version="[5.0.0,6.0.0)",
org.apache.poi.util;version="[5.0.0,6.0.0)",
org.eclipse.nebula.widgets.nattable.config;version="[2.4.0,3.0.0)",
org.eclipse.nebula.widgets.nattable.export;version="[2.4.0,3.0.0)",
org.eclipse.nebula.widgets.nattable.formula;version="[2.4.0,3.0.0)",
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</modules>

<properties>
<tycho-version>4.0.7</tycho-version>
<tycho-version>4.0.8</tycho-version>
<cbi-version>1.3.4</cbi-version>
<nattable-version>${project.version}</nattable-version>

Expand Down Expand Up @@ -168,7 +168,7 @@
</artifact>
</target>
<targetDefinitionIncludeSource>honor</targetDefinitionIncludeSource>
<executionEnvironment>JavaSE-11</executionEnvironment>
<executionEnvironment>JavaSE-17</executionEnvironment>
<environments>
<environment>
<os>win32</os>
Expand Down
Loading