Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 549806

Summary: GEF DOT - Ensure compatibility with Xtext 2.19 (Guava 27.1.0)
Product: [Tools] GEF Reporter: Tamas Miklossy <miklossy>
Component: GEF DOTAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.dietrich.opensource
Version: unspecified   
Target Milestone: 5.2.0 (2019-09)   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
screencast reproducing the problem none

Description Tamas Miklossy CLA 2019-08-05 11:20:03 EDT
Created attachment 279498 [details]
screencast reproducing the problem

Currently the GEF DOT component cannot be loaded if Xtext 2.19 (and Guava 27.1.0) is installed, because the other GEF components (e.g GEF Common) restricts the Guava Dependency to com.google.common.base;version="[12.0.0, 22.0.0)" 

https://github.com/eclipse/gef/blob/master/org.eclipse.gef.common/META-INF/MANIFEST.MF#L18

See also Xtext discussion: https://github.com/eclipse/xtext/issues/1529#issuecomment-518243114

The version range of the Guava Dependency should be adapted so that the version 27.1.0 will be accepted.
Comment 1 Christian Dietrich CLA 2019-08-06 02:56:48 EDT
similar problem if you try to start the eierlegende wollmilchsau oomph app

!ENTRY org.eclipse.gef.dot.ui 4 0 2019-08-06 08:54:29.219
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.gef.dot.ui [1259]
  Unresolved requirement: Require-Bundle: org.eclipse.gef.dot; bundle-version="[5.0.0,6.0.0)"
    -> Bundle-SymbolicName: org.eclipse.gef.dot; bundle-version="5.0.300.201905091638"; singleton:="true"
       org.eclipse.gef.dot [1256]
         Unresolved requirement: Require-Bundle: org.eclipse.gef.dot.generator; bundle-version="[5.0.0,6.0.0)"; resolution:="optional"
  Bundle was not resolved because of a uses constraint violation.
  org.apache.felix.resolver.reason.ReasonException: Uses constraint violation. Unable to resolve resource org.eclipse.gef.dot.ui [osgi.identity; osgi.identity="org.eclipse.gef.dot.ui"; type="osgi.bundle"; version:Version="5.0.400.201905091638"; singleton:="true"] because it is exposed to package 'com.google.common.base' from resources com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="27.1.0.v20190517-1946"] and com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="21.0.0.v20170206-1425"] via two dependency chains.

Chain 1:
  org.eclipse.gef.dot.ui [osgi.identity; osgi.identity="org.eclipse.gef.dot.ui"; type="osgi.bundle"; version:Version="5.0.400.201905091638"; singleton:="true"]
    require: (&(osgi.wiring.bundle=org.eclipse.xtext.builder)(&(bundle-version>=2.7.3)(!(bundle-version>=3.0.0))))
     |
    provide: osgi.wiring.bundle: org.eclipse.xtext.builder
  com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="27.1.0.v20190517-1946"]

Chain 2:
  org.eclipse.gef.dot.ui [osgi.identity; osgi.identity="org.eclipse.gef.dot.ui"; type="osgi.bundle"; version:Version="5.0.400.201905091638"; singleton:="true"]
    require: (&(osgi.wiring.bundle=org.eclipse.gef.common)(&(bundle-version>=5.0.0)(!(bundle-version>=6.0.0))))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="5.0.0.201905091638"; osgi.wiring.bundle="org.eclipse.gef.common"
  org.eclipse.gef.common [osgi.identity; osgi.identity="org.eclipse.gef.common"; type="osgi.bundle"; version:Version="5.0.0.201905091638"]
    import: (&(osgi.wiring.package=com.google.common.reflect)(&(version>=12.0.0)(!(version>=22.0.0))))
     |
    export: osgi.wiring.package: com.google.common.reflect; uses:=com.google.common.base
    export: osgi.wiring.package=com.google.common.base
  com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="21.0.0.v20170206-1425"]
	at org.eclipse.osgi.container.Module.start(Module.java:462)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1844)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1837)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1778)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1742)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1664)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
Comment 2 Christian Dietrich CLA 2019-08-30 05:48:59 EDT
also

  org.eclipse.viatra.query.tooling.ui.retevis [osgi.identity; osgi.identity="org.eclipse.viatra.query.tooling.ui.retevis"; type="osgi.bundle"; version:Version="0.22.0.201906120939"; singleton:="true"]
    require: (&(osgi.wiring.bundle=org.eclipse.gef.zest.fx)(bundle-version>=5.0.0))
     |
    provide: osgi.wiring.bundle; bundle-version:Version="5.1.0.201905091638"; osgi.wiring.bundle="org.eclipse.gef.zest.fx"
  org.eclipse.gef.zest.fx [osgi.identity; osgi.identity="org.eclipse.gef.zest.fx"; type="osgi.bundle"; version:Version="5.1.0.201905091638"]
    import: (&(osgi.wiring.package=com.google.common.collect)(&(version>=12.0.0)(!(version>=22.0.0))))
Comment 3 Tamas Miklossy CLA 2019-09-02 05:18:32 EDT
I created a PR https://github.com/eclipse/gef/pull/79 with the fix, that has been merged into the master branch.

Resolving as fixed in 5.2.0 (2019-09).