diffplug / goomph

IDE as build artifact
Apache License 2.0
130 stars 30 forks source link

Support for Eclipse 2022-06 #190

Closed jmini closed 2 years ago

jmini commented 2 years ago

Some notes about supporting Eclipse release 2022-06

Addition of the new update site

Currently if you try to use 2022-06 (a.k.a 4.24.0) you get the expected error:

* What went wrong:
A problem occurred evaluating root project 'jdt-gradle-example'.
> 4.24.0 is not supported.  We only support 3.5.0 through 4.23.0

We need the same work as in: https://github.com/diffplug/goomph/pull/183

The URL of the update site is:

https://download.eclipse.org/eclipse/updates/4.24/R-4.24-202206070700/

Mapping rule for "org.osgi.service.prefs"

Introduced with https://github.com/eclipse-platform/eclipse.platform.releng/pull/48 there is a new mapping:

<mavenMappings namePattern="(org.osgi)(.*)" groupId="$1" artifactId="$1$2"/>

See line 70 of SDK4Mvn.aggr

Similar to the work done in https://github.com/diffplug/goomph/issues/157, we need to make sure that org.osgi.service.prefs is mapped to the correct coordinates in Maven Central:

org.osgi:org.osgi.service.prefs

Buggy org.eclipse.equinox.preferences pom

See https://github.com/eclipse-equinox/equinox.bundles/issues/54 for more details.

The pom for org.eclipse.platform:org.eclipse.equinox.preferences:3.10.0 (see org.eclipse.equinox.preferences-3.10.0.pom on maven central) is broken.

It lists a dependency that does not exists (wrong groupId):

<dependency>
    <groupId>org.osgi.service</groupId>
    <artifactId>org.osgi.service.prefs</artifactId>
    <version>[1.1.0,1.2.0)</version>
</dependency>

The "solution" was to publish a new version 3.10.1 where the dependency is fixed (see org.eclipse.equinox.preferences-3.10.1.pom on maven central):

<dependency>
    <groupId>org.osgi</groupId>
    <artifactId>org.osgi.service.prefs</artifactId>
    <version>[1.1.0,1.2.0)</version>
</dependency>

I am not sure about the impact for something like:

apply plugin: 'com.diffplug.eclipse.mavencentral'

eclipseMavenCentral {
    release '4.24.0', {
        implementation 'org.eclipse.equinox.preferences'
    }
}

The P2 Update site will tell to map to: org.eclipse.platform:org.eclipse.equinox.preferences:3.10.0

But since this is broken, should is map to: org.eclipse.platform:org.eclipse.equinox.preferences:3.10.1

This would means hard-coding this information somewhere…

jmini commented 2 years ago

Those are the org.osgi.* bundles in the https://download.eclipse.org/eclipse/updates/4.24/ update site:

org.osgi.service.coordinator             [1.0.2.201505202024]
org.osgi.service.log.stream              [1.0.0.202109301733]
org.osgi.service.prefs                   [1.1.2.202109301733]
org.osgi.util.function                   [1.2.0.202109301733]
org.osgi.util.measurement                [1.0.2.201802012109]
org.osgi.util.position                   [1.0.1.201505202026]
org.osgi.util.promise                    [1.2.0.202109301733]
org.osgi.util.pushstream                 [1.0.2.202109301733]
org.osgi.util.xml                        [1.0.2.202109301733]

So I think it makes sense to add the mapping described in point 2.

jmini commented 2 years ago

I started to work on this on my branch issue-190

I am wondering what the good solution is for the mapping of:

org.eclipse.equinox.preferences          [3.10.0.v20220503-1634]

Hard-code somewhere that it should be converted to 3.10.1?

@nedtwigg any opinion?

nedtwigg commented 2 years ago

I'm okay with hardcoding.

jmini commented 2 years ago

There is an other case that needs to be hard coded: https://github.com/eclipse-platform/eclipse.platform.releng/issues/52

nedtwigg commented 2 years ago

If you open a PR with whatever you have, I'll finish it and publish it today. Thanks for getting it started and collating all the hiccups!

jmini commented 2 years ago

PR is open: #191.

Sorry for the delay, it stays a side project for me

nedtwigg commented 2 years ago

No apologies for the delay, thanks very much for the PR! Shipped in 3.37.0.