[racket-dev] experience using the `pkg` branch

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Jun 14 09:13:50 EDT 2013

On Fri, Jun 14, 2013 at 6:19 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> On Thu, Jun 13, 2013 at 10:56 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
>> On Thu, Jun 13, 2013 at 3:56 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
>>> * The error message when you look for a missing collection is really
>>> long if you have a lot of packages installed
>>>
>>> * Using parallel make, ie `make -j 8` doesn't work from the new
>>> top-level Makefile.
>>>
>>> * Even though unix systems don't use them, the extra libraries are
>>> downloaded and packaged up on unix platforms while building.
>>>
>>> * When installing a package with a long chain of dependencies, this
>>> message gets printed a lot:
>>>
>>> The following packages are listed as dependencies, but are not
>>> currently installed,
>>> so they will be automatically installed:
>>>     at-exp-lib syntax-color
>>> The following packages are listed as dependencies, but are not
>>> currently installed,
>>> so they will be automatically installed:
>>>     parser-tools
>>>
>>> and so on ...
>>>
>>> We should just collect all the packages to be installed and print them
>>> all at once (and perhaps prompt, the way `apt-get` does).
>>
>> Since package dependencies are in the package and not otherwise
>> available, the manager is asking for permission to do a download.
>> After doing the download, it can then look at the dependencies and see
>> if there more. 'apt-get', etc have more monolithic repository
>> structures than our package system, so they can analyze everything
>> locally and compute the transitive closure. Furthermore, 'raco pkg' is
>> prompting you, but you have it set on "auto" (the default) so it's
>> equivalent to 'yes | apt-get'
>
> Ah, that makes a lot of sense.
>
> Could we do something different in "auto" mode to just print out the
> packages that were installed at the end?

Yes, that's a good idea. I'll do that.

>>> * I think it's possible to confuse the local catalog by moving
>>> directories around in the `pkg` directory.
>>>
>>> * `make local-catalog` is not incremental -- it always re-downloads
>>> and re-packs the external libraries.
>>>
>>> * Sometimes, errors can be hard to trace to a particular package.  For
>>> example, this one was because there was a mistake in the
>>> future-visualizer package info.rkt file.  But I had to go groveling in
>>> /var/tmp/ to figure that out.
>>>
>>> /var/tmp/pkg13711534991371153499937/info.rkt::212: read: expected a closing '"'
>>>   context...:
>>>    /home/samth/tmp/pkg-racket/racket/lib/collects/syntax/module-reader.rkt:176:17:
>>> body
>>>    /home/samth/tmp/pkg-racket/racket/lib/collects/syntax/module-reader.rkt:173:2:
>>> wrap-internal
>>>    lang:read
>>>    /home/samth/tmp/pkg-racket/racket/lib/collects/setup/getinfo.rkt:50:8: temp32
>>>    /home/samth/tmp/pkg-racket/racket/lib/collects/setup/getinfo.rkt:37:0:
>>> get-info/full/ext
>>>    /home/samth/tmp/pkg-racket/racket/lib/collects/setup/getinfo.rkt:33:0
>>>    /home/samth/tmp/pkg-racket/racket/lib/collects/pkg/lib.rkt:1274:0:
>>> pkg-single-collection85
>>
>> Are there other examples? This stack trace is useful to just put a
>> with-handlers at the right spot.
>
> I got plenty of `raco setup` errors that were hard to track down in
> the same way. Those don't have a stacktrace, though.  I can't remember
> any others that were like this one.
>
> Sam



--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.