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

Refactor compiler for clarity #2091

Merged
merged 155 commits into from
Sep 11, 2024
Merged

Refactor compiler for clarity #2091

merged 155 commits into from
Sep 11, 2024

Conversation

joelhawksley
Copy link
Member

@joelhawksley joelhawksley commented Sep 6, 2024

Per @BlakeWilliams's suggestion, I've refactored the compiler to make it easier to read and understand. I'm sure we could take this even further, but I stopped once I had a clean Template class extracted. Any and all feedback welcome ❤️

Copy link
Contributor

1 file(s) had their final line ending fixed:

  • lib/view_component/template.rb

Copy link
Contributor

1 file(s) had their final line ending fixed:

  • lib/view_component/template.rb

@joelhawksley
Copy link
Member Author

@BlakeWilliams thanks for the thorough review! It was fun to look at ways of incorporating your feedback.

I can't help but feel like there is a whole 'nother pass to be done on the compiler. We have a lot of similar logic around finding conflicting render paths that remains awkward as a whole. I wonder if we should land this PR in more or less its current shape and then do a second pass in a follow up?

@joelhawksley joelhawksley merged commit ec0434c into main Sep 11, 2024
18 of 19 checks passed
@joelhawksley joelhawksley deleted the refactor branch September 11, 2024 20:44
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.

2 participants