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

Compiler plugin errors should provide more context #173

Closed
cmelchior opened this issue Apr 23, 2021 · 1 comment · Fixed by #642
Closed

Compiler plugin errors should provide more context #173

cmelchior opened this issue Apr 23, 2021 · 1 comment · Fixed by #642
Assignees

Comments

@cmelchior
Copy link
Contributor

cmelchior commented Apr 23, 2021

Annotation processor errors in Realm Java made it possible to link to the syntax element that was causing the error. This was super helpful in terms of tracking down where the problem is.

I'm not sure if something similar is possible with the Kotlin Compiler, but just outputting something like:

image

Is not particularly helpful... As a minimum, we should identify the file, method, and ideally line that is causing the issue or expression so you can easily find it.

@rorbech
Copy link
Contributor

rorbech commented Nov 15, 2021

We should also provide sane error descriptions. Defining a property as val will just yield

Caused by: java.lang.ClassCastException: io.realm.entities.schema.SchemaVariations$Companion$$realm$fields$20 cannot be cast to kotlin.reflect.KMutableProperty1

instead of explaining that it must be var.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants