chibi-scheme icon indicating copy to clipboard operation
chibi-scheme copied to clipboard

Handle cyclic dependencies in snow

Open pclouds opened this issue 4 years ago • 4 comments

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.

pclouds avatar Aug 28 '20 12:08 pclouds

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.

ashinn avatar Aug 29 '20 13:08 ashinn

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

pclouds avatar Aug 30 '20 01:08 pclouds

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).

pclouds avatar Aug 30 '20 01:08 pclouds

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.

ashinn avatar Aug 31 '20 12:08 ashinn