<div dir="ltr">That all sounds like exactly what I had in mind, with different (pretty much better) terminology.<br><div><div class="gmail_extra"><br clear="all"><div>Carl Eastlund</div>
<br><div class="gmail_quote">On Thu, Jun 27, 2013 at 3:17 PM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The package system has a notion of "auto" packages, which are packages<br>
that were automatically installed to satisfy dependencies. Also, `raco<br>
pkg remove' supports an `--auto' flag for automatically removing auto<br>
packages that have no non-auto packages depending on them.<br>
<br>
So, instead of adding package roots, one possibility is:<br>
<br>
* Make `raco pkg show' show only non-auto packages by default.<br>
<br>
* Change the `pkg-links' Makefile target to install only links for<br>
packages needed by a particular package (which defaults to some sort<br>
of "main-distribution" package), and to install links forced by<br>
dependencies as "auto".<br>
<br>
The second bullet is along a direction that things are moving, anyway.<br>
<br>
I think there will need to be some other refinements to auto mode. For<br>
example, if you have a package in auto mode and you try to install it,<br>
I think you get an already-installed error and the package stays in<br>
auto mode. But those are small changes, I think.<br>
<br>
Does this sound enough like what you had in mind?<br>
<div><div class="h5"><br>
At Thu, 27 Jun 2013 12:53:59 -0400, Carl Eastlund wrote:<br>
> I just ran "raco pkg show" on a fresh install, and its output is huge now.<br>
> Of course, this is inevitable when we break the distribution up into many<br>
> packages, but it makes the tool unmanageable for routine use. I'd like to<br>
> propose a way around this, that would also solve some of my normal<br>
> usability gripes with package managers.<br>
><br>
> I propose we have "package roots" -- roots to the forest of package<br>
> dependencies. These are the packages the user actually wants; every other<br>
> installed package is pulled in as the dependencies to support these. Then<br>
> "raco pkg show" can show just these packages, so in a fresh install we'd<br>
> just see "racket" or "racket+gui" or whatever. We could add a flag to show<br>
> everything, when necessary.<br>
><br>
> This also gives us some room to automate removal of packages the user<br>
> doesn't need. For instance, if I install package A which depends on B, C,<br>
> and D, of course raco pkg install will install B, C, and D. If I remove<br>
> package A, currently B, C, and D are going to stay unless I explicitly<br>
> remove them, if I recall correctly. If we base our system on a set of root<br>
> packages, then B, C, and D would be removable as soon as A is removed, if A<br>
> was a root and the others were not. We could have "raco pkg remove A"<br>
> remove them immediately, or we could have some explicit "raco pkg cleanup"<br>
> to remove them. Whichever way we go, we could add a flag to "raco pkg<br>
> remove" to swap behavior. This would make cleaning up a lot easier when a<br>
> package has many dependencies. It would also mean upgrading a package<br>
> whose dependencies have changed would allow the system to automatically<br>
> clean up dependencies that aren't needed any more.<br>
><br>
> I don't know how hard it would be to implement this, but I think it would<br>
> make the package system much more usable to present 90% of the interactions<br>
> solely in terms of the top-level packages the user cares about, and do all<br>
> the cleanup of dependency packages silently in the background when possible.<br>
><br>
> Carl Eastlund<br>
</div></div>> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
<br>
</blockquote></div><br></div></div></div>