I think Oga is off the table, it uses MPL 2.0 which is a tricky license for quite a few to consume.
Nokogiri is coming from ActionText, rails-dom-testing and webdrivers.
Bottom line is that we do need some sort of HTML parser to be able to do a bunch of testing.
The bigger elephant in the room is that Nokogiri
by iteself is just a bad choice for today’s web.
It does not ship with an HTML5 parser and libxml folks move really really slowly, it is hard to get any traction on issues.
At Discourse we recently moved to https://github.com/rubys/nokogumbo
This means that when you parse stuff such as ℵ
the entity ℵ remains and that automatic tag expansion which is defined in the HTML5 spec works as expected:
Eg:
<s>
test
test
</s>
Results in:
test
test
I think we absolutely should improve the story here, but surprisingly the issue is far beyond install times. It is more that we want Rails to ship with a proper / maintained HTML5 parser.
Gumbo looks really good, BUT Google have not been committing to it for many years from what I can tell.
Maybe the best outcome is port of : https://github.com/kovidgoyal/html5-parser that implements nokogiri like methods. I don’t know.
Nokogiri+nokogumbo is the best that exists today, but I just replaced the 1 dependency complaint with 2.
I entirely agree with @avdi that install times for sassc are pretty brutal, they are even worse than nokogiri.
That said, install times are something we can all sort out by starting to push native gems. gem install libv8
installs ultra fast across multiple platforms. Perhaps we need a task force to assist in publishing pre-compiled gems?
There is a bunch of discussion on GitHub about the slowness of sassc compilation:
https://github.com/sass/sassc-ruby/issues/189
I guess there are some low hanging fruit here prior to doing native gems which can totally erase all the wait times on common platforms.