Why sprig-slim instead of just sprig? #698
Replies: 1 comment 2 replies
-
Hi @ghostsquad, Good question, by the way. Task used sprig directly for some time, and I eventually decided to fork into slim-sprig. I consider sprig to be too bloated for a template package. It imports too many packages and have too many functions, some which does not make any sense to have as a template helper. There's a good number of external dependencies. Compare slim-sprig (only test dependencies) with sprig. The crypto package was particularly problematic. The problem is not only that it imports the package, but that it uses too many methods from it. And since crypto is a heavy thing, it added a lot to the compilation time and binary size. Also, encrypting/decrypting things does not make any sense in Task anyway, so it was useless. At the time I got about 23% of the binary size reduced with the change, along with faster compilation. And well, it's not that the size matters that much, but I really like to have dependencies at a minimum when reasonable (BTW I hate the whole Apparently, at least one big project agree with me. I'll also take the opportunity to answer your 3 other issues: go-task/slim-sprig#6, go-task/slim-sprig#7 and go-task/slim-sprig#8. My usual answer to these kind of issues is that it should be done upstream at sprig, so we can pull later and the two project do not diverge too much (other than slim-sprig not having some functions). But since sprig seems a bit slow in development we can eventually decide to do one of:
|
Beta Was this translation helpful? Give feedback.
-
This is mainly a question for @andreynering - Why sprig slim and not just use upstream sprig?
Beta Was this translation helpful? Give feedback.
All reactions