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
Temple migration #860
Temple migration #860
Conversation
lib/haml/temple_engine.rb
Outdated
module Haml | ||
class TempleEngine < Temple::Engine | ||
define_options( | ||
:attr_wrapper => "'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use 1.9 hash syntax since Haml requires ruby 1.9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in k0kubun@57c6b43
On first glance, this looks great to me. 👏 👏 👏 |
Thanks ! FYI, without it, I had terrible performance issues with Jruby 9.1.2.0. |
Very excited to see this happening. Thanks @k0kubun for your fantastic work over the last few years on everything related to Haml! |
I changed Haml to use Temple. haml/haml#860 haml/haml#893 haml/haml#904 Hamlit is still faster than Haml for C extension and absence of Haml::Buffer, which is required for Haml helpers.
I changed Haml to use Temple. haml/haml#860 haml/haml#893 haml/haml#904 Hamlit is still faster than Haml for C extension and absence of Haml::Buffer, which is required for Haml helpers.
ref: #851
I migrated Haml's engine backend to Temple.
In this PR, I didn't change compiler process to temple-AST-based one and make breaking changes. But now
Haml::Parser
andHaml::Compiler
are on Temple Engine's pipeline.There is no feature addition or performance improvement but refactoring for future maintainability.
Since I implemented Hamlit v2 with original
Haml::Parser
in k0kubun/hamlit#43, I know we can compileHaml::Parser::ParseNode
into Temple AST (but not completely compatible aboutHaml::Helpers
, though). This is just a first step for a whole migration.