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

HierarchicalASTVisitorTest fails on master #1028

Closed
iloveeclipse opened this issue Dec 20, 2023 · 6 comments · Fixed by #1029
Closed

HierarchicalASTVisitorTest fails on master #1028

iloveeclipse opened this issue Dec 20, 2023 · 6 comments · Fixed by #1029
Assignees
Labels
bug Something isn't working
Milestone

Comments

@iloveeclipse
Copy link
Member

iloveeclipse commented Dec 20, 2023

Regression from eclipse-jdt/eclipse.jdt.core#1684, JDT UI update needed.

https://download.eclipse.org/eclipse/downloads/drops4/I20231220-0500/testresults/html/org.eclipse.jdt.ui.tests_ep431I-unit-cen64-gtk3-java17_linux.gtk.x86_64_17.html

java.lang.AssertionError: HierarchicalASTVisitor must be updated to reflect a change in the ASTNode hierarchy.  No method visit(StringTemplateComponent) was found in HierarchicalASTVisitor.
	at org.junit.Assert.fail(Assert.java:89)
	at org.eclipse.jdt.ui.tests.core.HierarchicalASTVisitorTest.checkHierarchicalASTVisitorMethodExistsFor(HierarchicalASTVisitorTest.java:540)
	at org.eclipse.jdt.ui.tests.core.HierarchicalASTVisitorTest.checkAllMethodsForHierarchyExist(HierarchicalASTVisitorTest.java:513)
	at org.eclipse.jdt.ui.tests.core.HierarchicalASTVisitorTest.test(HierarchicalASTVisitorTest.java:489)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
@iloveeclipse iloveeclipse added the bug Something isn't working label Dec 20, 2023
@iloveeclipse iloveeclipse added this to the 4.31 milestone Dec 20, 2023
@iloveeclipse
Copy link
Member Author

@jarthana : could you please contribute required changes to JDT UI?

@noopur2507
Copy link
Member

I downloaded I20231220-0750 and pulled the latest master code. In manifest of org.eclipse.jdt.ui.tests, I am getting the error: Neither an available bundle nor the associated JRE export package 'org.assertj.core.api'.

@iloveeclipse: any hint to fix this?

@noopur2507 noopur2507 assigned noopur2507 and unassigned jarthana Dec 21, 2023
@iloveeclipse
Copy link
Member Author

@noopur2507 : I don't know how old your SDK is and how do you setup it.

I do following:

  1. Download latest nightly SDK build (currently https://download.eclipse.org/eclipse/downloads/drops4/I20231220-0750/)
  2. Start with an empty workspace, File -> Import -> Install -> Install Software Items from File
  3. Select my local (latest) version of https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/releng/org.eclipse.ui.releng/platformUiTools.p2f
  4. Install everything
  5. Restart and use my main workspace.

With that, I'm fine & see no errors in JDT UI.

Of course you can use Oomph, but I prefer the way above as it can also work if the last IBuild was unstable and does not depend on even more software layers that can fail...

noopur2507 added a commit to noopur2507/eclipse.jdt.ui that referenced this issue Dec 21, 2023
@noopur2507
Copy link
Member

Thanks @iloveeclipse. I had the latest nightly SDK build but it didn't include assertj-core_3.24.2. I explicitly installed it using the .p2f file that you mentioned above to make the error go away.

Earlier (until 2 weeks back), it was not required to download anything explicitly in the SDK for JDT UI code setup.

I see the org.assertj.core.api dependency was added via #968.

iloveeclipse pushed a commit that referenced this issue Dec 21, 2023
@iloveeclipse
Copy link
Member Author

Earlier (until 2 weeks back), it was not required to download anything explicitly in the SDK for JDT UI code setup.

Are you using Oomph? If so, I don't see a dedicated Oomph setup for JDT UI in https://github.com/eclipse-jdt/eclipse.jdt.ui, so https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/releng/org.eclipse.ui.releng/platformUi.setup may need to be adopted.

@merks ?

@merks
Copy link
Contributor

merks commented Dec 21, 2023

There is an Oomph setup for JDT:

https://github.com/eclipse-jdt/.github/blob/main/CONTRIBUTING.md#create-an-eclipse-development-environment

I tested it from scratch just now. Everything looks fine and the test runs:

image

What is the problem?

Note the if things are added to the *.target in the aggregator, those additions are visible only if you include that project's setup in the workspace. Otherwise, additions are visible in the next I-Build repository after a successful build.

noopur2507 added a commit that referenced this issue Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants