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

Update ComponentDetectorCheck for ksp #753

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

jhperezd
Copy link
Contributor

@jhperezd jhperezd commented Oct 3, 2023

This PR adds KSP support for ComponentDetectorCheck

  • The changes to ComponentDetectorCheck follows the same pattern already used in AnvilAnnotationDetectorCheck. No additional logic/further changes have been introduced here.
  • The corresponding test class was updated to handle for KSP and the current system by making the expected errors a bit more generic. Specifically, the error message returned during the test a Dagger component causes an error includes "Source0.kt:6" for KSP whereas it is "Source0.kt:6:11" for the current implementation. Similarly, the test a Dagger component causes an error inner class returns ":7" instead of ":7:13".

Interestingly enough, the first two tests pass even before making any changes to the target class.
Note: During testing, the message returned on failure is "Source0.kt:6" for KSP whereas it is "Source0.kt:6:11" for the current implementation (and :7 instead of :7:13). Need to look into this further before calling it done.
The message returned on failure is "Source0.kt:6" for KSP whereas it is "Source0.kt:6:11" for the current implementation (and :7 instead of :7:13 for the second test)
Following the same pattern as in other tests, I've removed the extra info that's not common for the two processes.
@CLAassistant
Copy link

CLAassistant commented Oct 3, 2023

CLA assistant check
All committers have signed the CLA.

@jhperezd jhperezd mentioned this pull request Oct 10, 2023
15 tasks
Copy link
Member

@JoelWilcox JoelWilcox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks for the contribution!

Fixed lint formatting issues.
@JoelWilcox JoelWilcox merged commit b6ffe11 into square:main Oct 24, 2023
20 checks passed
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.

4 participants