-
Notifications
You must be signed in to change notification settings - Fork 292
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
Expose simple names on a missing types's synthetic declaration #1232
Labels
enhancement
New feature or request
Milestone
Comments
Closed
3 tasks
EDIT: Just found that it's already mentioned above. Please ignore this.
|
Jeffset
added a commit
to Jeffset/ksp
that referenced
this issue
Apr 18, 2024
This CL makes `KSErrorType` a class with a string "hint", that by convention should be a "simpleName" of an unresolved type. `KSErrorTypeClassDeclaration` is also no longer a singleton and references a corresponding `KSErrorType`. The implementation consists of extracting the available info on the unresolved type on the best effort basis.
Jeffset
added a commit
to Jeffset/ksp
that referenced
this issue
Jun 1, 2024
This CL makes `KSErrorType` a class with a string "hint", that by convention should be a "simpleName" of an unresolved type. `KSErrorTypeClassDeclaration` is also no longer a singleton and references a corresponding `KSErrorType`. The implementation consists of extracting the available info on the unresolved type on the best effort basis.
neetopia
pushed a commit
that referenced
this issue
Jun 3, 2024
This CL makes `KSErrorType` a class with a string "hint", that by convention should be a "simpleName" of an unresolved type. `KSErrorTypeClassDeclaration` is also no longer a singleton and references a corresponding `KSErrorType`. The implementation consists of extracting the available info on the unresolved type on the best effort basis.
github-actions bot
pushed a commit
that referenced
this issue
Jun 3, 2024
This CL makes `KSErrorType` a class with a string "hint", that by convention should be a "simpleName" of an unresolved type. `KSErrorTypeClassDeclaration` is also no longer a singleton and references a corresponding `KSErrorType`. The implementation consists of extracting the available info on the unresolved type on the best effort basis. (cherry picked from commit 1e8486e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In javac, an
ErrorType
is aDeclaredType
and one can get anElement
out of it. ItssimpleName
will be the name as it was defined in the sources.But in KSP, the
KSDeclaration
of a an errorKSType
is a synthetic declaration (specifically thatKSErrorTypeClassDeclaration
singleton) and its simple name is always<Error>
.This would be very helpful for reporting to the user nice traces to the missing type:
Note that if the type is qualified in the source, it will be similarly be reported as its 'simple name' in javac:
The text was updated successfully, but these errors were encountered: