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

[WIP] use junit 5.9.2 in targets #2208

Closed
wants to merge 1 commit into from
Closed
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 @@ -56,15 +56,15 @@ Apache Commons Lang (2.4)
* License: Apache License, 2.0


Apache Log4j (1.2.17)
Apache Log4j (1.2.24)

* License: Apache License 2.0

args4j (2.33)

* License: MIT License

ASM (9.4)
ASM (9.5)

* License: BSD-3-Clause

Expand All @@ -86,15 +86,15 @@ Google Guice / Inject Core API (5.0.1)

* License: Apache License, 2.0

Gradle Wrapper (7.4)
Gradle Wrapper (8.x)

* License: Apache License, 2.0

guava gwt (30.1)

* License: Apache License, 2.0

JUnit (5.9.1)
JUnit (5.9.2)

* License: EPL-2.0

Expand Down
1 change: 0 additions & 1 deletion org.eclipse.xtext.testing/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 0 additions & 1 deletion org.eclipse.xtext.tests/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
Copy link
Member Author

Choose a reason for hiding this comment

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

with the container tycho fails to resolve
without you have to select junit4 for the junit4 tests in run as dialogs. did not find a nice solution yet
see discussion in #2197

Copy link
Contributor

Choose a reason for hiding this comment

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

We can create two launch configurations in the corresponding projects; one for JUnit4 and one for JUnit5.

Copy link
Member Author

Choose a reason for hiding this comment

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

it is also about running single tests. currently in maintainance mode this is 50% of my usecases.
maybe there is also another option to make the vintage enginge visble to jdt.

Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't the discussion mention that the JUnit5 classpath container makes the import packages superfluous? Just using the classpath container without import packages still makes the build fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

i dont know.
the problem is we mix tests and a plugin.
and we need the imports for the plugin

Copy link
Member Author

Choose a reason for hiding this comment

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

it is a plugin that is used in other plugins

Copy link
Contributor

Choose a reason for hiding this comment

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

But in the the other projects, e.g., .dsl.tests, we always have the import packages or required packages for junit or jupiter anyway. I thought we'd never rely on the imported packages of xtext.testing.

I forgot to answer your question about running single tests: it's still possible, it's just that the first time it will try to run it with JUnit5, and you have to configure the single test launch configuration for JUnit4. If that's what you asked in previous comments. If you are talking about the annoyance of doing that, I agree ;) , that's why I was suggesting trying to stay with the classpath container.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes this is what i mean. you have to selct junit 4 in the dialog.

i have doubts a plugin can have code in osgi that is not on classpath. but i am not an osgi expert.
am also not sure how to properly test this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can do some experiments on a separate branch

Copy link
Member Author

Choose a reason for hiding this comment

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

we also seem to export stuff from the test folder in manifest

<classpathentry exported="true" kind="lib" path="lib/simple.jar"/>
<classpathentry kind="src" output="target/test-classes" path="src">
<attributes>
Expand Down
17 changes: 10 additions & 7 deletions releng/org.eclipse.xtext.contributor/Xtext.setup
Original file line number Diff line number Diff line change
Expand Up @@ -711,25 +711,28 @@
name="org.junit"
versionRange="[4.13.2,4.14.0)"/>
<requirement
name="org.junit.jupiter.api"
name="junit-jupiter-api"
versionRange="[5.1.0,6.0.0)"/>
<requirement
name="org.junit.jupiter.engine"
name="junit-jupiter-engine"
versionRange="[5.1.0,6.0.0)"/>
<requirement
name="org.junit.platform.commons"
name="junit-vintage-engine"
versionRange="[5.1.0,6.0.0)"/>
<requirement
name="junit-platform-commons"
versionRange="[1.1.0,2.0.0)"/>
<requirement
name="org.junit.platform.engine"
name="junit-platform-engine"
versionRange="[1.1.0,2.0.0)"/>
<requirement
name="org.junit.platform.launcher"
name="junit-platform-launcher"
versionRange="[1.1.0,2.0.0)"/>
<requirement
name="org.junit.platform.runner"
name="junit-platform-runner"
versionRange="[1.1.0,2.0.0)"/>
<requirement
name="org.junit.platform.suite.api"
name="junit-platform-suite-api"
versionRange="[1.1.0,2.0.0)"/>
<requirement
name="org.opentest4j"
Expand Down
24 changes: 12 additions & 12 deletions xtext-latest.target
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202203.target
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202206.target
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202209.target
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202212.target
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="0.0.0"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down
24 changes: 12 additions & 12 deletions xtext-r202303.target
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,22 @@
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.aopalliance" version="1.0.0.v20220404-1927"/>
<unit id="org.opentest4j" version="0.0.0"/>
<unit id="org.apiguardian" version="0.0.0"/>
<unit id="org.apiguardian.api" version="0.0.0"/>
<unit id="org.objectweb.asm" version="9.5.0"/>
<unit id="io.github.classgraph" version="4.8.149.v20220915-0556"/>
<unit id="org.slf4j.binding.simple" version="0.0.0"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="0.0.0"/>
<unit id="org.junit.jupiter.engine" version="0.0.0"/>
<unit id="org.junit.jupiter.migrationsupport" version="0.0.0"/>
<unit id="org.junit.jupiter.params" version="0.0.0"/>
<unit id="org.junit.platform.commons" version="0.0.0"/>
<unit id="org.junit.platform.engine" version="0.0.0"/>
<unit id="org.junit.platform.launcher" version="0.0.0"/>
<unit id="org.junit.platform.runner" version="0.0.0"/>
<unit id="org.junit.platform.suite.api" version="0.0.0"/>
<unit id="org.junit.platform.suite.commons" version="0.0.0"/>
<unit id="org.junit.vintage.engine" version="0.0.0"/>
<unit id="junit-jupiter-api" version="5.9.2"/>
<unit id="junit-jupiter-engine" version="0.0.0"/>
<unit id="junit-jupiter-migrationsupport" version="0.0.0"/>
<unit id="junit-jupiter-params" version="0.0.0"/>
<unit id="junit-platform-commons" version="0.0.0"/>
<unit id="junit-platform-engine" version="0.0.0"/>
<unit id="junit-platform-launcher" version="0.0.0"/>
<unit id="junit-platform-runner" version="0.0.0"/>
<unit id="junit-platform-suite-api" version="0.0.0"/>
<unit id="junit-platform-suite-commons" version="0.0.0"/>
<unit id="junit-vintage-engine" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="2.0.2.v20181016-2210"/>
Expand Down