Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Guice 7 and Guava 32 #2707

Merged
merged 3 commits into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion org.eclipse.emf.mwe2.language.sdk.dummy/feature.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.eclipse.emf.mwe2.language.sdk"
version="2.14.0.v20221117-1134"
version="2.15.0.v20230620-0840"
label="Dummy Feature"
provider-name="Eclipse Xtext">

Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.emf.mwe2.language.sdk.dummy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<packaging>eclipse-feature</packaging>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.mwe2.language.sdk</artifactId>
<version>2.14.0.v20221117-1134</version>
<version>2.15.0.v20230620-0840</version>

<properties>
<xtext-dev-bom-version>${project.parent.version}</xtext-dev-bom-version>
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" />
szarnekow marked this conversation as resolved.
Show resolved Hide resolved
<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">
<!--
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to keep this for future use?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it at least helped me debugging

<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
10 changes: 5 additions & 5 deletions org.eclipse.xtend.performance.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ 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",
org.eclipse.emf.mwe2.lib;bundle-version="2.15.0",
org.eclipse.emf.mwe2.runtime;bundle-version="2.15.0",
org.eclipse.xtend.lib,
org.eclipse.jdt.core;bundle-version="3.29.0",
org.eclipse.core.resources;bundle-version="3.16.100",
org.eclipse.core.runtime;bundle-version="3.24.100",
org.eclipse.xtend.ide.tests,
org.junit,
org.eclipse.emf.mwe.utils;bundle-version="1.8.0",
org.eclipse.emf.mwe.utils;bundle-version="1.9.0",
org.eclipse.ui.editors;bundle-version="3.14.300",
org.eclipse.xtext.builder,
org.eclipse.xtext.util,
org.eclipse.emf.mwe2.launch;bundle-version="2.14.0";resolution:=optional,
org.eclipse.emf.mwe2.launch;bundle-version="2.15.0";resolution:=optional,
org.eclipse.xtext.ui.testing
Automatic-Module-Name: org.eclipse.xtend.performance.tests
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);
szarnekow marked this conversation as resolved.
Show resolved Hide resolved
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
Loading