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

fix(Scope): set closestMatch when member type not found #466

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fishautumn
Copy link

@fishautumn fishautumn commented Oct 12, 2022

What it does

fix #465. set closestMatch when member type not found

How to test

I cannot manage to compile the project. As it's pretty simple, just waiting for automatic workflows.

Author checklist

@fishautumn
Copy link
Author

with eclipse-platform/eclipse.platform.releng.aggregator I managed to compile it.

but cannot execute the test cases.

@fishautumn
Copy link
Author

Bellow CI error seems environment issue:

https://ci.eclipse.org/jdt/job/eclipse.jdt.core-Github/job/PR-466/3/console
13:59:38 [ERROR] Unresolveable build extension: Plugin org.eclipse.tycho:tycho-maven-plugin:3.1.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.tycho:tycho-maven-plugin:jar:3.1.0-SNAPSHOT @

@iloveeclipse
Copy link
Member

If you are still interested on a fix, could you please rebase your PR on master state? Note, the compiler code moved to a dedicated project.

@iloveeclipse
Copy link
Member

iloveeclipse commented Feb 14, 2023

@fishautumn : two issues:

  1. the ECA check failed. Please make sure the mail used to create commits is same you used in ECA.
  2. There is a new test fail: CompletionWithMissingTypesTests
junit.framework.ComparisonFailure: 

----------- Expected ------------

------------ but was ------------
MissingType[ANONYMOUS_CLASS_DECLARATION]{, Lmissing.MissingType;, ()V, null, null, [73, 73], 40}\n
   MissingType[TYPE_REF]{missing.MissingType, missing, Lmissing.MissingType;, null, null, [61, 72], 40}\n
MissingType[METHOD_REF<CONSTRUCTOR>]{, Lmissing.MissingType;, ()V, MissingType, null, [73, 73], 40}\n
   MissingType[TYPE_REF]{missing.MissingType, missing, Lmissing.MissingType;, null, null, [61, 72], 40}
--------- Difference is ----------
 expected:<[]> but was:<[MissingType[ANONYMOUS_CLASS_DECLARATION]{, Lmissing.MissingType;, ()V, null, null, [73, 73], 40}\n
   MissingType[TYPE_REF]{missing.MissingType, missing, Lmissing.MissingType;, null, null, [61, 72], 40}\n
MissingType[METHOD_REF<CONSTRUCTOR>]{, Lmissing.MissingType;, ()V, MissingType, null, [73, 73], 40}\n
   MissingType[TYPE_REF]{missing.MissingType, missing, Lmissing.MissingType;, null, null, [61, 72], 40}]>
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertStringEquals(TestCase.java:266)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertEquals(TestCase.java:242)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertEquals(TestCase.java:239)
	at org.eclipse.jdt.core.tests.model.AbstractJavaModelCompletionTests.assertResults(AbstractJavaModelCompletionTests.java:213)
	at org.eclipse.jdt.core.tests.model.CompletionWithMissingTypesTests.test0043(CompletionWithMissingTypesTests.java:1772)

@fishautumn
Copy link
Author

thanks @iloveeclipse for pointing out the issues. I've update the commits for correct email.

about the test case, I think it makes sense to give completions for given code. so I simply updated it.

@fishautumn
Copy link
Author

fixed string constant in test.

@iloveeclipse
Copy link
Member

I see some tests modified but I don't understand the problem we are trying to fix here.
How does it show up for the end user? Could a dedicated test be added to show the problem we are trying to fix?

@fishautumn
Copy link
Author

LambdaExpressionsTest.test045: changed code causing 1 more error message reported. It can be avoided if necessary.
CompletionWithMissingTypesTests.test0043: I cannot figure out why it affected, because I cannot run the case in local environment.

I will try to add a case for the issue in future.

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

Successfully merging this pull request may close these issues.

MethodDeclaration.reolveBinding() returns null if argument/return-value is of a missing inner class
3 participants