eclipse-sirius / sirius-desktop

Sirius Desktop: desktop-based graphical modelers for dedicated DSLs
https://eclipse.dev/sirius/
Eclipse Public License 2.0
14 stars 11 forks source link

Guava incompatibility between Xtext 2023-09 (2.32) and Sirius 2023-09 (7.2.1) in SimRel #336

Open ewillink opened 6 months ago

ewillink commented 6 months ago

For the record, since I doubt you can repair the 2023-09 SimRel content, and assuming that some counterpart of Bugzilla search can eventually find issues for users.

Since adding a Sirius dependency to Eclipse OCL, the compatibility test on the 2023-09 platform fails with a guava wiring error; both Guava 30 and 32 are loaded. It is well known that failure of all SimRel components to use the same Guava causes wiring problems. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=583034 for the wiring error.

java.lang.NoSuchMethodError: 'com.google.common.collect.ImmutableMap com.google.common.collect.ImmutableMap$Builder.buildOrThrow()'

Workaround; load Sirius 2023-12 (7.3.0) on the 2023-09 platform and so avoid a conflicting Guava 30/32 load.

ewillink commented 6 months ago

The dependency on Sirius is solely to support a declarative org.eclipse.sirius.resourceStrategy. The fix in #301 would avoid the need for the dependency. (Presumably the failure mechanism is that extension points get loaded first activating Sirius and Guava 30 and so undermining the regular and extensive subsequent Xtext usage with Guava 32.

Before 'WONTFIX'ing please ensure that this problem does not recur.

The easiest way is to remove Guava upper bounds since in practice these seem to just cause user-detected failures. (Just occasionally where deprecated functions are removed, compatibility requires that the used function is either written out or replaced by a Sirius clone.)

Else releng, particularly for maintenance releases, needs a mechanism to check against SimRel.

pcdavid commented 6 months ago

The easiest way is to remove Guava upper bound

This is already done with 7822df1e6d104a62cb42092909d957966fd35e7f (part of Sirius Desktop 7.4.0).

We have also started to reduce our dependency on Guava but it will take a long time to get there.