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

Let Kotlin plugin disable 'build' button if there is any insolvable problem. #1193

Closed
ShawxingKwok opened this issue Nov 15, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ShawxingKwok
Copy link

ShawxingKwok commented Nov 15, 2022

For example,

public class A : SuperA()

In some other file

public class SueprA

If 'SuperA' is suddenly not public, 'A' is still valid in Ksp and there may generate some unexpected wrong declarations which would be also hinted at the console, making it hard to find the root cause. There are also many other examples like 'annotation arguments of wrong types' and 'unknown and not imported references'.

I don't suggest improving KSP checking because they are complicated and time-consuming. Since Kotlin plugin checks problems before 'building', why not let it disable 'build' button directly if there are some unsolvable problems? (Solvable problems are those caused by unknown but imported references)

@ShawxingKwok ShawxingKwok changed the title Let Kotlin plugin disable 'build' button if there are some insolvable problems. Let Kotlin plugin disable 'build' button if there are any insolvable problem. Nov 16, 2022
@ShawxingKwok ShawxingKwok changed the title Let Kotlin plugin disable 'build' button if there are any insolvable problem. Let Kotlin plugin disable 'build' button if there is any insolvable problem. Nov 16, 2022
@ting-yuan ting-yuan added the enhancement New feature or request label Feb 7, 2023
@ting-yuan
Copy link
Collaborator

Now that IDE not indexing generated source #37 is fixed, is this still an issue?

OTOH, sources are inherently incomplete / not build-able in projects that rely on code generation. In general, KSP won't be able to know whether a reference is valid or not before processors run.

@ting-yuan ting-yuan closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2023
@ShawxingKwok
Copy link
Author

ShawxingKwok commented Feb 12, 2023

I mean calling help from IDE and Kotlin plugin to realize this feature. Besides, they could also tell ksp the specfic invalid files, or invalid symbols further before processing, making the validation process much less.

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

No branches or pull requests

2 participants