Thank you! This is very helpful. I'm still trying to figure out what the good balance between Makefiles and render -p. Some experimenting is in order.
On Fri, Jun 28, 2019 at 12:47 PM Joel Dueck <[email protected]> wrote: > Take a look at one of my recent Pollen makefiles: > https://thelocalyarn.com/cgi-bin/yarncode/artifact/7a3d32d6264f1bcb > > I define my dependencies such that if one of the core files (like > pollen.rkt) has changed, it triggers a re-render of all documents with > `raco pollen setup` and then `raco pollen render -p ...`. > > The later dependencies check to see if individual Pollen articles (. > poly.pm) have changed since their .html file was last rendered. If a > render-of-everything has already been triggered above, then these will > already be up to date at this point. But if not, any changed articles will > be re-rendered singly, without parallel processing. (I don't use the -j > switch when running make.) > > So the basic idea is that I give make a very specific dependency tree, and > rely on it to check those dependencies in a specific order, bringing in the > new parallel setup and render when it's clear a complete rebuild is needed. > > You also have to make sure that the makefile and the Pollen setup cache > watchlist agree precisely on which are the "core" files that would trigger > a complete rebuild. > > Because I have some Pollen articles that depend on others, I also use > tricks like "touching" the dependent articles during the evaluation of the > `root` tag. > See > https://thelocalyarn.com/cgi-bin/yarncode/artifact?udc=1&ln=91-92&name=d9318d9822c88d35&udc=1 > and > https://thelocalyarn.com/cgi-bin/yarncode/artifact?udc=1&ln=101-111&name=30ceaf46d62ff4c0 > > > > On Thursday, June 27, 2019 at 3:23:37 PM UTC-5, Shrutarshi Basu wrote: >> >> >> This is great. I'm wondering how this should affect Makefile-driven >> setups? Currently I have a project with a bunch of directories, and a >> Makefile that runs `raco pollen render` for all the directories, and then >> publish at the toplevel directory. I've been running it `make -j 4` (since >> that's how many cores I have), but maybe there's a better way to do it? >> Should I just use `raco pollen render --recursive` at the toplevel and let >> pollen figure everything out? >> >> Here's a gist of my current Makefile, if it helps: >> https://gist.github.com/basus/e524fed3a305fe4235ba03eab68c634d >> >> -- >> Shrutarshi Basu >> Basus.me >> The ByteBaker <http://bytebaker.com> -- computer science is not about >> computers >> @basus <http://twitter.com/basus> >> > -- > You received this message because you are subscribed to the Google Groups > "Pollen" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pollenpub/d52ce987-16bf-4df1-be52-0b67450c8d22%40googlegroups.com > <https://groups.google.com/d/msgid/pollenpub/d52ce987-16bf-4df1-be52-0b67450c8d22%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Shrutarshi Basu Basus.me The ByteBaker <http://bytebaker.com> -- computer science is not about computers @basus <http://twitter.com/basus> -- You received this message because you are subscribed to the Google Groups "Pollen" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pollenpub/CA%2BYT8Wip70pTRvr0KV0YL_hGPETRQAUEvEXJ2aKmZiNC01V%3Dbg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
