ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.21k stars 141 forks source link

Handle cyclic dependencies in snow #693

Open pclouds opened 4 years ago

pclouds commented 4 years ago

I don't think I can fix it by myself, so it's an issue instead.

Let's say I want to install (chibi test) on Gauche, snow will attempt to install these in order

(installing packages: ((chibi optional) (chibi diff) (chibi test)) for gauche)

The actual library dependency is (chibi test) -> (chibi diff) -> (chibi optional) so that looks about right. But, in order to run tests for (chibi optional) we need (chibi test) again. So installation fails.

I suppose snow needs to inspect test programs for dependencies as well (not sure if it does now) and perhaps unpack all of them in the same pkg temp dir? That'll make it possible to test them all if needed, and install all in one go.

ashinn commented 4 years ago

Good point. As you note, in actuality there is no library cycle, but there may be additional test dependencies. I believe currently the tests just fail and you can install anyway? If we get a common ground testing SRFI it could resolve most of these issues. In the long run, a proper test-dependency field (handling necessary bootstrapping) would be nice.

pclouds commented 4 years ago

Yeah. There are lots of scary messages, but if you know what's going on and install anyway, it will work.

pclouds commented 4 years ago

A workaround (since there are lots of useful chibi libraries and they all use (chibi test)) is perhaps package all dependencies in (chibi test) package. That could hint snow to process all those libraries at the same time (I'm guessing, not really understanding that code yet).

ashinn commented 4 years ago

I just pushed a workaround for this, similar to what is done for (chibi term ansi), which is to make the test suite conditionally use (srfi 64) if not chibi.

This should make the snow install work on other impls w/o error.