<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Mads Kiilerich <<a href="mailto:mads@kiilerich.com">mads@kiilerich.com</a>> schrieb am So., 12. Nov. 2017 um 21:39 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11/08/2017 03:05 PM, Andrew Shadura wrote:<br>
> On 8 November 2017 at 14:42, Mads Kiilerich <<a href="mailto:mads@kiilerich.com" target="_blank">mads@kiilerich.com</a>> wrote:<br>
>> On 11/08/2017 01:44 PM, Andrew Shadura wrote:<br>
>>> Well, I did submit a proof of concept using lesscpy two years ago, and<br>
>>> that went nowhere.<br>
>> Can you find a reference to it so we can re-evaluate?<br>
> <a href="https://lists.sfconservancy.org/pipermail/kallithea-general/2015q2/000788.html" rel="noreferrer" target="_blank">https://lists.sfconservancy.org/pipermail/kallithea-general/2015q2/000788.html</a><br>
<br>
Thanks.<br>
<br>
Something like that could indeed be used to generate our current<br>
style.css, which is based on less since a couple of weeks ago.<br>
<br>
(Once conern, though: Compiling from less on runtime is great for<br>
development, but for actual installation of released versions, it should<br>
probably generate it earlier so it can be served as a static file from<br>
CDN (or heavily cached)).<br>
<br>
Could you or someone extend this proposaal to also cover the front-end<br>
build changes done in<br>
<a href="https://kallithea-scm.org/repos/kallithea/pull-request/108/_/bootstrap_in_small_bites_v7?fulldiff=1" rel="noreferrer" target="_blank">https://kallithea-scm.org/repos/kallithea/pull-request/108/_/bootstrap_in_small_bites_v7?fulldiff=1</a><br>
(and also handle jQuery and all the other front-end dependencies). (That<br>
would also require all dependency source to somehow be made available.)<br>
<br>
> I'm much less concerned about vendoring than about a huge dependency<br>
> on npm and its infrastructure.<br>
<br>
That is a good point.<br>
<br>
But without the dependency on npm and its infrastructure, *we* would<br>
have to provide an alternative huge dependency and infrastructure. That<br>
also doesn't sound appealing.<br>
<br>
If we don't depend on npm to provide source of our dependencies, then we<br>
have to provide them somehow.<br>
<br>
Then, some kind of automatic vendoring could seem appealing. It could<br>
perhaps be something that put the dependencies in release tar-balls<br>
without having to put their source in our source repository.<br>
<br>
"Vendoring" could perhaps also happen by automatically "caching" and<br>
shipping everything npm would download, thus allow npm to run entirely<br>
offline?<br>
<br>
>>> I don't understand what's so difficult about Lessing a bunch of files<br>
>>> and amalgamating them afterwards so that we absolutely have to use the<br>
>>> upstream's build system.<br>
<br>
That might be a crucial point. I think it might be prohibitively<br>
difficult to not use upstream build systems.<br>
<br>
Packages might do different things in their build system. It is not just<br>
about lessing a few files. I think it will be a significant amount of<br>
work and very fragile and make dependency version updates hard.<br>
<br>
> My concern about npm isn't only that it is a whole different<br>
> programming language, but that the infrastructure around npm is too<br>
> chaotic to be reasonable, there are too many indirect dependencies,<br>
> too many moving parts, things change a lot and too often. It's not<br>
> something I would like to base anything, to be honest.<br>
<br>
That might be true. But still, pragmatically, it pretty much works. It<br>
will allow us to move faster. Saying no to it will slow us down.<br>
<br>
> I think we definitely need to somehow vendor jQuery and other js<br>
> libraries, and — absolutely — Bootstrap. We need to be able to<br>
> reproducibly build it from the source, and npm not only doesn't make<br>
> that easier, but complicates that task and makes our build system more<br>
> fragile.<br>
<br>
<br>
Personally, I agree it could be nice if we compiled all front-end<br>
dependencies "directly from source" without using npm. But we don't<br>
"have" to do it if we don't ship compiled front-end code.<br>
<br>
<br>
Anyway, short term, what do you suggest we do so we can move forward<br>
with<br>
<a href="https://kallithea-scm.org/repos/kallithea/pull-request/108/_/bootstrap_in_small_bites_v7?fulldiff=1" rel="noreferrer" target="_blank">https://kallithea-scm.org/repos/kallithea/pull-request/108/_/bootstrap_in_small_bites_v7?fulldiff=1</a><br>
?<br>
<br>
I suggest we temporarily move forward with this "easy" solution of<br>
building front-end using "plain" npm at install time.<br>
<br>
Meanwhile, others can work on distributing all dependency source and<br>
come up with a better solution than building with npm. (And perhaps<br>
also, perhaps as an intermediate step, make sure we offer all necessary<br>
sources so we can compile front-end code "offline" with npm and<br>
distribute it.<br></blockquote><div>I don't like the npm dependency for pip installations either.</div><div>I think it'd be better to include the bootstrap source files and minified files in the manifest.</div><div>That way, one can use any less (and minification) tool (even offline) and we comply to the GPL.</div><div>This doesn't mean these source file should be in our mercurial repository.</div><div>(I strongly believe they should not.)</div><div>We (the developers) should add scripts/tools to the repository that make it easy for us</div><div>to add and update 3rd-party less, css and js libraries.</div><div>In my view npm is the easiest tool for this.</div><div><br></div><div>More generally speaking we should distinguish between the 2 jobs node/npm are doing.</div><div>1. be the run time for the less compiler</div><div>I think we should use node for this job because we should use the reference implementation of less and that runs on node.</div><div>AFAIK lesscpy is not feature complete and there have been no commits to the project in more then a year.</div><div>2. be the package manager for js/css/less libraries<br></div><div>I think for this task npm is the easiest/best solution as well.</div><div>Since (at least at the moment) we only depend on only a few libraries (and only use npm<br></div><div>for bootstrap), I don't think we should expect much (if any) problems with it.</div><div><div>And like Mads already mentioned, it is the most used tool for this and if we decide to not use it, we still need to manage our css/less/js libraries in some other way.</div><br class="inbox-inbox-Apple-interchange-newline"></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
/Mads<br>
<br>
_______________________________________________<br>
kallithea-general mailing list<br>
<a href="mailto:kallithea-general@sfconservancy.org" target="_blank">kallithea-general@sfconservancy.org</a><br>
<a href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general" rel="noreferrer" target="_blank">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a><br>
</blockquote></div></div>