Skip to content

Commit

Permalink
[#2056][#2101] Update to Guice 7 and Guava 32
Browse files Browse the repository at this point in the history
Signed-off-by: ChUpdate to Guice 7 and Guava 32
  • Loading branch information
cdietrich committed Jun 25, 2023
1 parent 94dfca6 commit 4954311
Show file tree
Hide file tree
Showing 55 changed files with 151 additions and 100 deletions.
8 changes: 4 additions & 4 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ Google Gson (2.9.x)

* License: Apache License, 2.0

Google Guava (30.1)
Google Guava (32.0.1)

* License: Apache License 2.0

Google Guice / Inject Core API (5.0.1)
Google Guice / Inject Core API (7.0.0)

* License: Apache License, 2.0

Gradle Wrapper (7.4)
Gradle Wrapper (8)

* License: Apache License, 2.0

guava gwt (30.1)
guava gwt (32.0.1)

* License: Apache License, 2.0

Expand Down
5 changes: 3 additions & 2 deletions org.eclipse.xtend.core.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Require-Bundle: org.eclipse.xtend.core,
org.eclipse.core.runtime;bundle-version="3.24.100",
org.eclipse.equinox.common;bundle-version="3.16.0",
org.eclipse.emf.codegen.ecore;bundle-version="2.29.0",
com.google.guava;bundle-version="[30.1.0,31.0.0)",
com.google.inject;bundle-version="5.0.1",
com.google.guava;bundle-version="[32.0.1,33.0.0)",
com.google.inject;bundle-version="7.0.0",
org.eclipse.core.resources;bundle-version="3.16.100",
org.eclipse.emf.ecore,
org.eclipse.xtext.builder,
Expand All @@ -27,6 +27,7 @@ Require-Bundle: org.eclipse.xtend.core,
org.eclipse.xtext.builder.standalone,
org.eclipse.xtext.java
Import-Package: javax.inject;version="1.0.0",
jakarta.inject;version="2.0.1",
org.apache.log4j;version="1.2.24",
org.apache.log4j.spi;version="1.2.24",
org.junit;version="4.13.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bundle-SymbolicName: xtend-annotation-examples-client
Bundle-Version: 2.32.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.xtend.lib,
com.google.guava;bundle-version="[30.1.0,31.0.0)",
com.google.guava;bundle-version="[32.0.1,33.0.0)",
org.eclipse.xtext.xbase.lib;bundle-version="2.32.0",
xtend-annotation-examples;bundle-version="2.4.3"
Bundle-Vendor: Eclipse Xtext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bundle-SymbolicName: xtend-annotation-examples
Bundle-Version: 2.32.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.xtend.lib,
com.google.guava;bundle-version="[30.1.0,31.0.0)",
com.google.guava;bundle-version="[32.0.1,33.0.0)",
org.eclipse.xtext.xbase.lib;bundle-version="2.32.0",
org.junit;bundle-version="4.13.2",
org.eclipse.xtend.core,
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtend.ide.swtbot.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Require-Bundle: org.eclipse.swtbot.eclipse.core;bundle-version="2.6.0",
org.eclipse.xtend.ide,
org.eclipse.ui;bundle-version="3.201.0",
org.eclipse.jdt.ui;bundle-version="3.26.0",
com.google.inject;bundle-version="5.0.1",
com.google.inject;bundle-version="7.0.0",
org.eclipse.xtext.ui,
org.hamcrest.library;bundle-version="1.3.0",
org.eclipse.xtend.core,
Expand Down
9 changes: 9 additions & 0 deletions org.eclipse.xtend.ide.tests/batch-compiler-data/ant/test.ant
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@
<include name="org.eclipse.emf.common*.jar" />
<include name="org.eclipse.emf.codegen*.jar" />
<include name="com.google.guava*.jar" />
<include name="*guava*32*.jar" />
<include name="com.google.inject*.jar" />
<include name="guice*.jar" />
<include name="*failureaccess*jar" />
<include name="javax.injec*.jar" />
<include name="jakarta.inject-api*jar" />
<include name="org.eclipse.equinox.common*.jar" />
<include name="org.eclipse.jdt.core*.jar" />
<include name="org.antlr*.jar" />
Expand All @@ -59,6 +63,11 @@


<target name="compiler.init" depends="clean">
<!--
<pathconvert property="classpathProp" refid="xtend.deps"/>
<echo>Classpath is ${classpathProp}</echo>
-->
<taskdef name="xtendc" classname="org.eclipse.xtend.core.compiler.batch.XtendCompilerAntTask">
<classpath>
<path refid="xtend.deps" />
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtend.lib.gwt.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<description>A test that ensures our GWT compatibility.</description>

<properties>
<gwt.version>2.8.2</gwt.version>
<gwt.version>2.10.0</gwt.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1-jre</version>
<version>32.0.1-jre</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtend.performance.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bundle-Version: 2.32.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: Eclipse Xtext
Bundle-ClassPath: .
Require-Bundle: com.google.inject;bundle-version="5.0.1",
Require-Bundle: com.google.inject;bundle-version="7.0.0",
org.eclipse.emf.ecore;bundle-version="2.26.0",
org.eclipse.emf.mwe2.lib;bundle-version="2.14.0",
org.eclipse.emf.mwe2.runtime;bundle-version="2.14.0",
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtend.sdk.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SPDX-License-Identifier: EPL-2.0
<requires>
<import feature="org.eclipse.xtext.ui" version="2.32.0" match="equivalent"/>
<import feature="org.eclipse.xtext.xbase.lib" version="2.32.0" match="equivalent"/>
<import plugin="com.google.guava" version="30.1.0" match="compatible"/>
<import plugin="com.google.guava" version="32.0.1" match="compatible"/>
<import plugin="io.github.classgraph" version="4.8.149" match="compatible"/>
<import plugin="org.apache.log4j" version="1.2.24" match="equivalent"/>
</requires>
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtend.standalone/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: Eclipse Xtext
Bundle-Version: 2.32.0.qualifier
Require-Bundle: org.eclipse.xtend.core;visibility:=reexport,
com.google.inject;bundle-version="5.0.1";visibility:=reexport,
com.google.inject;bundle-version="7.0.0";visibility:=reexport,
org.eclipse.jdt.core;bundle-version="3.29.0";visibility:=reexport,
org.eclipse.emf.codegen;bundle-version="2.22.0";visibility:=reexport
Import-Package: org.apache.log4j;version="1.2.24"
4 changes: 2 additions & 2 deletions org.eclipse.xtext.builder/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Export-Package: org.eclipse.xtext.builder,
Require-Bundle: org.eclipse.xtext,
org.eclipse.xtext.util,
org.eclipse.emf.ecore;bundle-version="2.26.0";visibility:=reexport,
com.google.guava;bundle-version="[30.1.0,31.0.0)",
com.google.inject;bundle-version="5.0.1",
com.google.guava;bundle-version="[32.0.1,33.0.0)",
com.google.inject;bundle-version="7.0.0",
org.eclipse.core.resources;bundle-version="3.16.100";resolution:=optional;x-installation:=greedy,
org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
org.eclipse.core.runtime;bundle-version="3.24.100";resolution:=optional;x-installation:=greedy,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2017 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2009, 2023 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
*******************************************************************************/
package org.eclipse.xtext.common.types.access.xtext.ui;

import static org.junit.Assume.*;

import java.util.AbstractList;
import java.util.ArrayList;
import java.util.List;

import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory;
import org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider;
import org.eclipse.xtext.common.types.access.xtext.AbstractConstructorScopeTest;
Expand All @@ -24,6 +27,7 @@
import org.eclipse.xtext.scoping.IScope;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Version;

import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
Expand All @@ -50,6 +54,7 @@ public void setUp() throws Exception {
}

@Test public void testGetContents_01() {
assumeTrue(JavaCore.getPlugin().getBundle().getVersion().compareTo(new Version(3,31,0)) >= 0);
Iterable<IEObjectDescription> contents = constructorScope.getAllElements();
assertFalse(Iterables.any(contents, new Predicate<IEObjectDescription>() {
@Override
Expand All @@ -60,6 +65,7 @@ public boolean apply(IEObjectDescription input) {
}

@Test public void testGetContents_02() {
assumeTrue(JavaCore.getPlugin().getBundle().getVersion().compareTo(new Version(3,31,0)) >= 0);
Iterable<IEObjectDescription> contents = constructorScope.getAllElements();
assertFalse(Iterables.any(contents, new Predicate<IEObjectDescription>() {
@Override
Expand All @@ -70,6 +76,7 @@ public boolean apply(IEObjectDescription input) {
}

@Test public void testGetContents_03() {
assumeTrue(JavaCore.getPlugin().getBundle().getVersion().compareTo(new Version(3,31,0)) >= 0);
Iterable<IEObjectDescription> contents = constructorScope.getAllElements();
assertTrue(Iterables.any(contents, new Predicate<IEObjectDescription>() {
@Override
Expand All @@ -80,6 +87,7 @@ public boolean apply(IEObjectDescription input) {
}

@Test public void testGetContents_04() {
assumeTrue(JavaCore.getPlugin().getBundle().getVersion().compareTo(new Version(3,31,0)) >= 0);
Iterable<IEObjectDescription> contents = constructorScope.getAllElements();
assertTrue(Iterables.any(contents, new Predicate<IEObjectDescription>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2022 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2009, 2023 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand Down Expand Up @@ -3573,7 +3573,10 @@ public void testFindTypeByName_AbstractMultimap_02() {
.getOnlyElement(type.findAllFeaturesByName("containsValue"));
assertNotNull(containsValue);
JvmFormalParameter firstParam = containsValue.getParameters().get(0);
assertEquals(0, firstParam.getAnnotations().size());
assertEquals(1, firstParam.getAnnotations().size());
JvmAnnotationReference annotationReference = firstParam.getAnnotations().get(0);
JvmAnnotationType annotationType = annotationReference.getAnnotation();
assertEquals("java:/Objects/javax.annotation.CheckForNull", EcoreUtil.getURI(annotationType).trimFragment().toString());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2017 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2009, 2023 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -17,9 +17,7 @@
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.xtext.common.types.JvmArrayType;
import org.eclipse.xtext.common.types.JvmDeclaredType;
import org.eclipse.xtext.common.types.JvmFormalParameter;
import org.eclipse.xtext.common.types.JvmGenericType;
import org.eclipse.xtext.common.types.JvmOperation;
import org.eclipse.xtext.common.types.JvmType;
import org.eclipse.xtext.common.types.TypesFactory;
import org.eclipse.xtext.common.types.access.IMirror;
Expand All @@ -35,7 +33,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import com.google.common.collect.Iterables;
import com.google.inject.Inject;

/**
Expand Down Expand Up @@ -281,17 +278,6 @@ public ClasspathTypeProvider getTypeProvider() {
protected String getCollectionParamName() {
return "arg0";
}

@Override
@Test
public void testFindTypeByName_AbstractMultimap_02() {
String typeName = "com.google.common.collect.AbstractMultimap";
JvmGenericType type = (JvmGenericType) getTypeProvider().findTypeByName(typeName);
JvmOperation containsValue = (JvmOperation) Iterables.getOnlyElement(type.findAllFeaturesByName("containsValue"));
assertNotNull(containsValue);
JvmFormalParameter firstParam = containsValue.getParameters().get(0);
assertEquals(0, firstParam.getAnnotations().size());
}

@Override
@Test
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.xtext.common.types.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.xtext.common.types;visibility:=reexport,
org.eclipse.ui;bundle-version="3.201.0",
org.eclipse.emf.ecore;bundle-version="2.26.0",
org.eclipse.jdt.core;bundle-version="3.29.0",
com.google.inject;bundle-version="5.0.1",
com.google.inject;bundle-version="7.0.0",
org.eclipse.xtext,
org.eclipse.core.runtime;bundle-version="3.24.100",
org.eclipse.core.resources;bundle-version="3.16.100",
Expand All @@ -19,7 +19,7 @@ Require-Bundle: org.eclipse.xtext.common.types;visibility:=reexport,
org.eclipse.jdt.core.manipulation;bundle-version="1.16.0",
org.eclipse.xtext.smap;resolution:=optional;x-installation:=greedy,
org.eclipse.xtext.common.types.edit;resolution:=optional;visibility:=reexport;x-installation:=greedy,
com.google.guava;bundle-version="[30.1.0,31.0.0)",
com.google.guava;bundle-version="[32.0.1,33.0.0)",
org.eclipse.ui.ide;bundle-version="3.13.1";resolution:=optional
Import-Package: org.apache.log4j;version="1.2.24"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.xtext.common.types/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ Bundle-ActivationPolicy: lazy
Require-Bundle:
org.eclipse.emf.ecore;bundle-version="2.26.0",
org.eclipse.emf.common;bundle-version="2.24.0",
com.google.inject;bundle-version="5.0.1",
com.google.inject;bundle-version="7.0.0",
org.eclipse.xtext,
org.objectweb.asm;bundle-version="[9.5.0,9.6.0)",
org.eclipse.xtend.lib,
com.google.guava;bundle-version="[30.1.0,31.0.0)",
com.google.guava;bundle-version="[32.0.1,33.0.0)",
io.github.classgraph;bundle-version="4.8.149"
Import-Package: org.apache.commons.logging;version="1.0.4";resolution:=optional,
org.apache.log4j;version="1.2.24"
Expand Down
15 changes: 10 additions & 5 deletions org.eclipse.xtext.dev-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,27 +147,32 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.3.4</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-gwt</artifactId>
<version>30.1-jre</version>
<version>32.0.1-jre</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<version>30.1-jre</version>
<version>32.0.1-jre</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1-jre</version>
<version>32.0.1-jre</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.0.1</version>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>io.github.classgraph</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2022 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2009, 2023 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015, 2020 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2015, 2023 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -16,10 +16,13 @@
import java.util.List;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.xtext.build.BuildRequest;
import org.eclipse.xtext.build.IncrementalBuilder;
import org.eclipse.xtext.build.IndexState;
import org.eclipse.xtext.build.Source2GeneratedMapping;
import org.eclipse.xtext.common.types.JvmAnnotationReference;
import org.eclipse.xtext.common.types.JvmAnnotationType;
import org.eclipse.xtext.common.types.JvmFormalParameter;
import org.eclipse.xtext.common.types.JvmGenericType;
import org.eclipse.xtext.common.types.JvmOperation;
Expand Down Expand Up @@ -125,7 +128,10 @@ public void testFindTypeByName_AbstractMultimap_02() {
.getOnlyElement(type.findAllFeaturesByName("containsValue"));
Assert.assertNotNull(containsValue);
JvmFormalParameter firstParam = containsValue.getParameters().get(0);
Assert.assertEquals(0, firstParam.getAnnotations().size());
assertEquals(1, firstParam.getAnnotations().size());
JvmAnnotationReference annotationReference = firstParam.getAnnotations().get(0);
JvmAnnotationType annotationType = annotationReference.getAnnotation();
assertEquals("java:/Objects/javax.annotation.CheckForNull", EcoreUtil.getURI(annotationType).trimFragment().toString());
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtext.junit4.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bundle-Vendor: Eclipse Xtext
Bundle-Version: 2.32.0.qualifier
Require-Bundle: org.junit,
org.eclipse.xtext.junit4,
com.google.inject;bundle-version="5.0.1",
com.google.inject;bundle-version="7.0.0",
org.eclipse.xtext
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.xtext.junit4.tests
Expand Down
Loading

0 comments on commit 4954311

Please sign in to comment.