stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.34k stars 224 forks source link

Windows Support #343

Open compnerd opened 1 year ago

compnerd commented 1 year ago

In order to support Windows, PathKit must be removed. Porting PathKit turned out to be more difficult than anticipated and it was easier to remove that in favour of Foundation.

compnerd commented 1 year ago

I'm not completely against dropping PathKit, it hasn't been updated in quite a while, and pulls in Spectre as a test dependency. Thing to note though: most tools/libraries I know that import Stencil also use PathKit for typed paths.

I noticed there's a PR in PathKit to add Windows support. Does such a PR supersede this one?

No, it does not. That change does allow compilation, but pretty quickly falls apart. Fixing that would require a pretty invasive rewrite that I don't think is valuable (at least not sufficiently that I would be willing to do that work).

kylef commented 1 year ago

Porting PathKit turned out to be more difficult than anticipated and it was easier to remove that in favour of Foundation.

Wondering what makes it so difficult, is it a subset of APIs are hard to port like glob or something more fundamental?

Edit: feel free to answer that in the PathKit PR if that makes more sense as its not all that related to Stencil :)