-
Notifications
You must be signed in to change notification settings - Fork 96
Update to Guice 5.0.1+ #393
Comments
would need a new com.google.inject on orbit |
I am facing a similar issue after migrating to Xtext 2.12. PS error below.
|
@spoenemann - Do you mind sharing the exception trace after you updated to Guice 4.1.0. |
N4JS says: meToo Finding problems that are caused by Guice is difficult, especially when getting these kinds of stacktraces as shown above. I myself get this a lot when working on the Xtext project 'N4JS' and it is just time-killing to identify the true Guice error. The related Guice ticket was: google/guice#757 It would be appreciated if you put Guice 4+ into orbit and align the project dependencies. Thank you. |
Problems/Tasks to consider.
=> would be a post photon task (x)
|
I was hit by the same issue yesterday, and I have found that there is a workaround while remaining with Guice 3.0: instead of relying on the normal jar, the no-aop jar should work as expected (basically, it does not contain the old ASM version that is incompatible with. Orbit contains this jar, so Eclipse plug-ins should not be included; for Maven/Gradle you should define the In the long term, migrating to Guice 4 seems fine, but in the meantime this gives back the detailed error information of Guice. |
see also eclipse/xtext-eclipse#1048 |
we already use guice 4 in xtext gradle plugin for memory leak reasons |
cc @szarnekow |
Lately, I'm getting a new variant of this extremely annoying problem. Whenever I change something with the Guice bindings that doesn't quite jive, I get something like this:
Only when I set a breakpoint in
|
there are 3 arguments against an update right now
|
I also encountered this problem recently. The problem is really annoying in case something is misconfigured in Guice not to get a readable error message. @cdietrich Maybe we can schedule this update to Xtext 2.23? |
Since other people gave positive feedback:
we should also test that beta version with the Xtext code base. |
WrappingInjectorProvider has more problems with guice 4
which can be fixed with |
See #1479 |
IndentationAwarePartialParsingTests sometimes hangs with Guice 4.x (beta) |
the guice 4 fix for Java 11 is now on Guice master, but there is no release yet |
fix is still not released. so: move to 2.24 |
Should I test it in other projects of mine? They are not toy examples anyway ;) |
There were race conditions in parallel injection we bypassed with some additional singletons but I am not sure I we catched all. |
That would be extremely helpful. The more feedback we can gather, the better. |
looks like we should also package |
aop is now packaged to the Xtext update site too https://ci.eclipse.org/xtext/job/xtext-umbrella/job/cd_guice501/lastSuccessfulBuild/artifact/build/p2-repository/ in case orbit is not configured in the eclipse xtext is installed to or in the tp. |
Since it might not be trivial to test with Guice 5 with the Xtext, MWE2 p2 repositories and especially with the Maven repositories (at least, it wasn't for me at the beginning), there are the steps I used:
<xtextVersion>2.26.0-SNAPSHOT</xtextVersion>
<mwe2Version>2.12.2-SNAPSHOT</mwe2Version>
<repositories>
<repository>
<id>xtext-lib-repository</id>
<name>xtext-lib-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-lib/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
</repository>
<repository>
<id>xtext-core-repository</id>
<name>xtext-core-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-core/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
</repository>
<repository>
<id>xtext-extras-repository</id>
<name>xtext-extras-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-extras/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
</repository>
<repository>
<id>xtext-maven-repository</id>
<name>xtext-maven-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-maven/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
</repository>
<repository>
<id>xtext-xtend-repository</id>
<name>xtext-xtend-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-xtend/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
</repository>
<repository>
<id>xtext-web-repository</id>
<name>xtext-web-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-web/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
</repository>
<repository>
<id>xtext-mwe-repository</id>
<name>xtext-mwe-repository</name>
<url>https://ci.eclipse.org/mwe/job/mwe2/job/cd_mweGuice5Experimentb/lastSuccessfulBuild/artifact/git-repo/my-local-snapshots-dir/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>xtext-lib-plugin-repository</id>
<name>xtext-lib-plugin-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-lib/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>xtext-core-plugin-repository</id>
<name>xtext-core-plugin-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-core/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>xtext-extras-plugin-repository</id>
<name>xtext-extras-plugin-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-extras/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<name>xtext-maven-plugin-repository</name>
<id>xtext-maven-plugin-repository</id>
<url>https://ci.eclipse.org/xtext/job/xtext-maven/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<name>xtext-xtend-plugin-repository</name>
<id>xtext-xtend-plugin-repository</id>
<url>https://ci.eclipse.org/xtext/job/xtext-xtend/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>xtext-web-plugin-repository</id>
<name>xtext-web-plugin-repository</name>
<url>https://ci.eclipse.org/xtext/job/xtext-web/job/cd_guice501/lastSuccessfulBuild/artifact/build/maven-repository/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>xtext-mwe-plugin-repository</id>
<name>xtext-mwe-plugin-repository</name>
<url>https://ci.eclipse.org/mwe/job/mwe2/job/cd_mweGuice5Experimentb/lastSuccessfulBuild/artifact/git-repo/my-local-snapshots-dir/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<repository location="https://ci.eclipse.org/mwe/job/mwe2/job/cd_mweGuice5Experimentb/lastSuccessfulBuild/artifact/git-repo/maven/org.eclipse.emf.mwe2.repository/target/repository/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="https://ci.eclipse.org/xtext/job/xtext-umbrella/job/cd_guice501/lastSuccessfulBuild/artifact/build/p2-repository/"/>
</location> and then happy testing! ;) |
Also Jbase works with Guice 5 (and MWE2 2.12.2), all tests are green: LorenzoBettini/jbase#112 |
unfortunately we still see ooms with the new guice. we dont know yet what is causing this. |
|
startingpoint for injection chain is xtextresource.serializer |
reproducer
|
see also google/guice#1510 |
|
binary compatibility really is pita here |
seems to work for my test as well as IndentationAwarePartialParsingTests, wonder why ruled this out before (comment says did not work from gradle) |
here is a reproducer for the terminals problem
org.eclipse.xtext.testing.smoketest.internal.AbstractParallelScenarioRunner.childrenInvoker(RunNotifier) correction: it is but it looks like too late the two WrappingInjectorProvider |
maybe we also can remove all the singletons to |
🎉 Fixed in Xtext 2.26 🎉 |
Excellent work @cdietrich! |
Indeed! Can't wait to :) |
Hi all, I am pleased to announce the availability of Xtext 2.26.0.M2. Release Notes (WIP) are at https://github.com/eclipse/xtext/blob/website-master/xtext-website/_posts/releasenotes/2022-01-31-version-2-26-0.md For both we strongly encourage you to test and give feedback. You can find the milestone at https://download.eclipse.org/modeling/tmf/xtext/updates/milestones/S202110010541/ (suitable mwe verison is 2.12.2.M1 / https://download.eclipse.org/modeling/emft/mwe/updates/milestones/S202108160852/) Happy Xtexting Thanks and Regards |
This is done by inforcing Guice 5.0.1 (instead of Guice 3.x) whereever possible. A proper solution will pe possible with Xtext 2.26 (see eclipse/xtext-core#393)
From the Guice 4 release notes:
When working on Java 8 projects with the current Xtext version (and thus Guice 3), I often get exceptions like this when Guice tries to create proper error messages for invalid configurations:
When I run the same code with Guice 4.1.0, I get a proper
com.google.inject.ConfigurationException
instead.Here is the CQ https://dev.eclipse.org/ipzilla/show_bug.cgi?id=23134
The text was updated successfully, but these errors were encountered: