Le 16 juin 2020 08:41:58 GMT-04:00, zimoun <zimon.touto...@gmail.com> a écrit : >Bonjour Julien, > >On Sat, 13 Jun 2020 at 07:38, Julien Lepiller <jul...@lepiller.eu> >wrote: > >> Exactly, no. You cannot separate inputs from outputs, because they >are >> part of the same derivation. When you build an output, you actually >> build the complete derivation and there's no way to separate that in >> "this part builds out" and "this part builds doc", etc. > >So it means that I need to build all the outputs even if I am >interested >in only one, right?
Absolutely, but you shouldn't thenk of it as building multiple outputs, because you are really just building one thing: there is only one package object, one derivation. It happens to create multiple directories in the store, but there's only one thing you build. > >If I run "guix install foo:out --no-substitutes" then I potentially >build any other "outputs"" of foo, e.g., "doc" i.e., potentially >download a lot of TeX stuff, or in the case of Git, all the Subversion >stuff. Right? Yes, because building foo:out doesn't make sense. You build foo and guix is nice enough to understand that's wgat you mean :) > >Even if at the end, only the references used by "foo:out" will be >tracked and all the others potentially garbage collected. Right? > > >> It would make sense to only propagate for some outputs: suppose at >> runtime only foo:bin requires the propagation of bar. Since foo and >> bar are already built, it should be possible to restrict the >> propagation behaviour to that output. Foo:out would not bring in bar >> anymore, reducing the closure size. > >Yes, it seems making sense to only propagated if the output needs it. >Well, if it is not implemented yet maybe it is because it is not really >necessary. :-) That cannot be automated because usually we use propagation when there is no direct reference. It wouldn't be useful otherwise. > > >Thank you for explaining. It is clearer for me now. > >Cheers, >simon