On Sep 17, 2019, at 03:26, René J.V. Bertin wrote:
> On Monday September 16 2019 16:26:12 Ryan Schmidt wrote:
>
>> There should be no need for you to specify anything ccache-related on the
>> command line. You can enable ccache globally in macports.conf. Individual
>> ports can disable it if they are not compatible with it.
>
> Yes, I realised that after sending my message. And then I remembered why I
> don't use it: it doesn't make sense for ports that you only build once in a
> while without any significant chance that you'll be rebuilding it again soon.
> GIven that the ccache cache is limited in size, using it pointlessly for too
> many or too big builds means you're flushing useful data from the cache.
> You'd need to use a port-specific ccache directory to prevent this issue,
> probably under control of a variable like distdir, or simply a token to store
> that cache *in* the distdir, so that related (sub)ports can share a cache.
> I'm not even certain if I build more ports with ccache than without. What I
> do know is that I when I do build a bunch of ports in a single go those are
> usually related and so will be done either with or without using ccache.
You have a point that the cache probably gets blown away before it can get used
again, if you build a lot of different ports and your cache size isn't large
enough to hold them all. You could increase the size of your cache.
Storing a separate cache for each port would quickly eat up a lot of disk space.
> One could also think of some sort of a developer's option to the port driver
> which toggles certain options for port maintainer convenience and has a scope
> like -o or -k. Ideally that option would allow for profiles, but even I
> cannot really justify that added complexity ;)
The level of fiddling that you've mentioned doing with the command line flags
exceeds what I've heard of any other developer doing. So I don't think that
writing and debugging a lot of code to change how this works would end up
benefiting very many people.