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

Bug 574363 - Move jdt.junit* bundles to Java 11 #3

Merged
merged 1 commit into from Jun 9, 2022

Conversation

iloveeclipse
Copy link
Member

@iloveeclipse
Copy link
Member Author

???

SNAPSHOT:compile (default-compile) on project org.eclipse.jdt.junit.runtime: Compilation failure: Compilation failure: 
11:48:22  [ERROR] /home/jenkins/agent/workspace/eclipse.jdt.ui-github_PR-3/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/ITestReference.java: 
11:48:22  [ERROR] 	/*******************************************************************************
11:48:22  [ERROR] 	^
11:48:22  [ERROR] Type java.lang.Object is indirectly referenced from required .class files but cannot be resolved since the declaring package java.lang exported from module java.base conflicts with a package accessible from module <unnamed>
11:48:22  [ERROR] 1 problem (1 error)

@@ -18,3 +18,4 @@ bin.includes = about.html,\
plugin.properties,\
.,\
META-INF/
jre.compilation.profile = JavaSE-1.8
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change BREE but add a 1.8 compilation profile? If that is intended, please document via commit message.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why change BREE but add a 1.8 compilation profile? If that is intended, please document via commit message.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=574363

Copy link
Contributor

Choose a reason for hiding this comment

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

Please document via the commit message.

@ktatavarthi ktatavarthi moved this from Done to To do in JDTProject Jun 9, 2022
@ktatavarthi
Copy link
Member

@iloveeclipse I donot have much idea regarding jre.compilation.profile = JavaSE-1.8 , but as there is no pom change and bree changes to Java 11, will Maven-Tycho build use the above attribute to use --release option?

@iloveeclipse
Copy link
Member Author

will Maven-Tycho build use the above attribute to use --release option?

I have no idea what Tycho/Maven will do.
If no one knows if compiling on java 11 with target 8 is possible, we can either drop this idea entirely and keep the bundle on 8 or move to 11 but that would mean 8 will be not supported for test.

@ktatavarthi
Copy link
Member

will Maven-Tycho build use the above attribute to use --release option?

I have no idea what Tycho/Maven will do. If no one knows if compiling on java 11 with target 8 is possible, we can either drop this idea entirely and keep the bundle on 8 or move to 11 but that would mean 8 will be not supported for test.

I have experimented locally and the below code added to the pom files of the three junit runtime plugins makes sure that the tycho maven build uses the --release option

  <build>
	<plugins>
		<plugin>
		 	<groupId>org.eclipse.tycho</groupId>
			<artifactId>tycho-compiler-plugin</artifactId>
			<configuration>
				<release>8</release>
			</configuration>
		</plugin>
	</plugins>
  </build>

@ktatavarthi
Copy link
Member

will Maven-Tycho build use the above attribute to use --release option?

I have no idea what Tycho/Maven will do. If no one knows if compiling on java 11 with target 8 is possible, we can either drop this idea entirely and keep the bundle on 8 or move to 11 but that would mean 8 will be not supported for test.

I have experimented locally and the below code added to the pom files of the three junit runtime plugins makes sure that the tycho maven build uses the --release option

  <build>
	<plugins>
		<plugin>
		 	<groupId>org.eclipse.tycho</groupId>
			<artifactId>tycho-compiler-plugin</artifactId>
			<configuration>
				<release>8</release>
			</configuration>
		</plugin>
	</plugins>
  </build>

The above change would be in addition to all the changes that are already done in this PR.

Originally created as
https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/182392 for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=574363

The bundles are using Java 11 now but compiled with release 8 flag to
allow tests run with Java 8 JVM.
@iloveeclipse
Copy link
Member Author

The above change would be in addition to all the changes that are already done in this PR.

Cool, thanks, I've rebased now.

@iloveeclipse
Copy link
Member Author

Whoever from jdt UI is interested in this change, please review, the code finally compiles thanks to @ktatavarthi.
I've quickly tested if one still can run JUnit 3/4/5 tests with that change on java 8, it seem to work.

Copy link
Contributor

@jjohnstn jjohnstn left a comment

Choose a reason for hiding this comment

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

LGTM

@jjohnstn jjohnstn merged commit 8fc47ee into eclipse-jdt:master Jun 9, 2022
3 checks passed
JDTProject automation moved this from To do to Done Jun 9, 2022
@iloveeclipse iloveeclipse deleted the Bug_574363 branch June 9, 2022 18:46
@iloveeclipse
Copy link
Member Author

Thanks Jeff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants