Open LorenzoBettini opened 11 hours ago
This seems inconsistent version of core runtime and equinox common
Is this on the old tp or latest
latest TP.
The PR built fine, but main doesn't. Something has changed in the eclipse repos.
Maybe they changed the cersts but not consistent for both?
Unfortunately inspection of jar files does not work on phone so I cannot check
xtext.web is a Maven project, not PDE, so maybe there's a mismatch with Maven deps and Tycho deps. Maybe I can check that tomorrow
This could be the culprit:
The commit message says, "explicitely consume core.runtime to prefer maven deps over p2," but if we add such a dep in the POM to be sure it takes a specific version, we should also pin the other eclipse deps like equinox common, to avoid conflicts with the PDE TP. At least, that could be the cause.
Maybe we need to add equinox common there too But why would the p2 one win now
I did a few experiments locally, where I reproduced the problem:
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<scope>test</scope>
</dependency>
shows a compilation error in Eclipse
"The import org.eclipse.core cannot be resolved"
without osgi
"The type org.eclipse.core.runtime.IProgressMonitor cannot be resolved. It is indirectly referenced from required type org.eclipse.xtext.findReferences.IReferenceFinder"
indeed, equinox common is a compile dependency of xtext. core.runtime depends on equinox.common so making core.runtime a test dependency somehow breaks the compilation in Eclipse, which makes sense.
At least, instead of running the Maven build, the problem can be reproduced also from Eclipse, running /org.eclipse.xtext.web/xtext.web.tests.launch
This seems to do the trick: https://github.com/LorenzoBettini/xtext/commit/2df1f08df7e76707fac9be7a6c82f9e9f082c1a6
IMPORTANT: the order is important and note the scope compile.
I'll check whether we can go back to test scope
No need to pin all those deps: it's enough to pin core.runtime as test dependency but BEFORE the other dependencies.
On a side note, in the TP I see org.eclipse.core.runtime_3.32.0.v20241003-0436.jar
so it has indeed been released after the PR, which was built fine, was merged.
This started to happen after merging https://github.com/eclipse/xtext/pull/3214 but the PR was building successfully so something must have changed in the meantime in platform?