Discussion: Leveraging AngleSharp
I see two general topics:
- Should we use third-party libraries in the Core?
- Should we consider AngleSharp for parsing?
Third-Part Libraries
HTML Renderer is currently very lightweight and has no dependencies. This has always been proudly presented as a feature of the library.
With .NET the "batteries included" era is changing, as certain "built-in" / .NET features are only available through NuGet packages (e.g. System.Text.Json).
Are those libraries also considered "third-party"?
If we end up having to potentially specific certain package references anyways, what's speaking against third-party dependencies?
AngleSharp
There's quite a bit of research & knowledge that went into the HTML & CSS parsers. At the time, this was certainly also quite unique.
On the other hand, the parsers are quite brittle, the implementation is not very flexible and there are still many unsupported syntax elements. Additional, the original maintainer and knowledge holder is no longer maintaining HTML Renderer and thus can't be relied upon.
Wouldn't it make sense to replace these parsers with AngleSharp?
The main thing I struggle with is, that I don't really like accidentally build monopolies, i.e. where only one implementation exists in the world.
Please provide your views and thoughts on that matter! 🙂
You might want to enable Discussions for the repository. That way you don't need to create issues as discussions. In Discussions, you can even create polls.
As for the topic: Tough call. AngleSharp seems quite polished, full HTML-5 compliant and even handles CSS.
I'd vote for letting necessity drive the decision: One man against what's missing vs. the need of end users for said missing features. Once demand surpasses your ability to provide, switch.
Thank you for the input!
I also feel like building on a solid foundation and investing more in the "rendering" side of the projects name, would be more sustainable from a maintenance perspective.
Would be interesting to hear from someone who's looked at the projects source a bit more. I just feel like the HTML & CSS parsing code isn't as valuable anymore as it used to be, but it's hard to say from the outside.