Bug 576735 - "Type cannot be resolved. It is indirectly referenced from required .class files" error message not helpful#327
Merged
stephan-herrmann merged 1 commit intoeclipse-jdt:masterfrom Sep 10, 2022
Conversation
Contributor
Author
|
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=577019#c4 for a slightly expanded explanation of the relevance of URB creation & resolving. |
25b8865 to
b038f8a
Compare
Contributor
Author
|
I might call out that I'm upping jdt.core's version because the change adds new API in IProblem. Actually I was reluctant to introduce a new constant, but these constants control the error message shown to users, and as I am not sure additional information is always available, I didn't see how I could abandon the old (poorer) error message. |
required .class files" error message not helpful + propagate the ReferenceBinding requesting a type lookup + include that type's qualified name in the error message + test case modeled with findings from https://bugs.eclipse.org/577019 + adopt test from previous branch
b038f8a to
7b0e18f
Compare
stephan-herrmann
added a commit
to stephan-herrmann/eclipse.jdt.core
that referenced
this pull request
Sep 11, 2022
stephan-herrmann
added a commit
that referenced
this pull request
Sep 11, 2022
jarthana
pushed a commit
to jarthana/eclipse.jdt.core
that referenced
this pull request
Sep 21, 2022
…om required .class files" error message not helpful (eclipse-jdt#327) + propagate the ReferenceBinding requesting a type lookup + include that type's qualified name in the error message + test case modeled with findings from https://bugs.eclipse.org/577019 + adopt test from previous branch
jarthana
pushed a commit
to jarthana/eclipse.jdt.core
that referenced
this pull request
Sep 21, 2022
24 tasks
robstryker
pushed a commit
to robstryker/eclipse.jdt.core
that referenced
this pull request
Jul 18, 2024
…om required .class files" error message not helpful (eclipse-jdt#327) + propagate the ReferenceBinding requesting a type lookup + include that type's qualified name in the error message + test case modeled with findings from https://bugs.eclipse.org/577019 + adopt test from previous branch
robstryker
pushed a commit
to robstryker/eclipse.jdt.core
that referenced
this pull request
Jul 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From https://bugs.eclipse.org/576735
Mostly, LookupEnvironment acts as the information hub, but also UnresolvedReferenceBinding is used, to remember, which .class file caused the URB to be created. In case the URB is later referenced also from source we can still report the binary file referencing this type.
While I doubt that this will cover all cases of "indirectly referenced" problems, but I hope it improves the message for a significant number of cases.