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

Compile time ViewRegistry mechanism for kotlin #8

Closed
rjrjr opened this issue Jun 13, 2020 · 5 comments
Closed

Compile time ViewRegistry mechanism for kotlin #8

rjrjr opened this issue Jun 13, 2020 · 5 comments
Labels
enhancement New feature or request lint We wish for a lint check ui Related to UI integration
Milestone

Comments

@rjrjr
Copy link
Contributor

rjrjr commented Jun 13, 2020

Swift was able to drop ViewRegistry in favor of a compile time pattern. Now that compiler plugins are here, shouldn't kotlin be able to do the same?

@zach-klippenstein
Copy link
Collaborator

On a scale of "fancy lint check" to "productionize keep-87", what exactly are you proposing? Both those options are significantly more effort and maintenance commitment than what swift has.

@rjrjr
Copy link
Contributor Author

rjrjr commented Jun 14, 2020 via email

@zach-klippenstein
Copy link
Collaborator

We've collected quite a few lint check issues. It would be interesting to see if we could build a thin compiler plugin layer that would expose workflow-specific syntax elements, and then implement a lot of checks on top of that.

Or build a similar layer on top of ktlint's API for that matter. I'm not sure which one is better to work with.

@vRallev Have you lint checks? How would you compare lint or ktlint's API to the compiler plugin API for analysing expressions?

@vRallev
Copy link
Collaborator

vRallev commented Jun 15, 2020

I'm missing context what Swift is doing. Although you can, I wouldn't implement Lint checks as a compiler plugin. KtLint works with Psi elements, like compiler plugins do during the analysis phase. A compiler plugin feels like an overkill. It would run for every build whereas you should run Lint checks only manually.

@zach-klippenstein
Copy link
Collaborator

Good point. There are some other things we could do with a compiler plugin, but there's no reason we couldn't have both.

@zach-klippenstein zach-klippenstein transferred this issue from square/workflow Jun 16, 2020
@zach-klippenstein zach-klippenstein added this to the post-v1.0.0 milestone Jun 16, 2020
@rjrjr rjrjr added the ui Related to UI integration label Jul 1, 2020
@zach-klippenstein zach-klippenstein added the enhancement New feature or request label Jul 12, 2020
@rjrjr rjrjr added the lint We wish for a lint check label Oct 16, 2020
@rjrjr rjrjr closed this as completed Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lint We wish for a lint check ui Related to UI integration
Projects
None yet
Development

No branches or pull requests

3 participants