One way to achieve this is with a syntax for module/libraries that includes an
(optional) version number, combined with the ability to create aliases. So if
B says
(import (C))
you could
(define-module-alias (C) (C @v1.0.1))
in a global configuration file to force the import in B to use v1.0.1 of C.
Good idea.
Are you interesting in standardizing the format of such a configuration
file? I think we should, and been thinking about it on and off for about
a year. The snow-fort.org package.scm files are a reasonable starting
point. Chicken egg files contain somewhat similar information.
The library name (C @v1.0.1) is almost equivalent to the R6RS-style
library name (C (1 0 1)) or (C (v1.0.1)).
IMHO the optimum solution would be to:
- extend the R7RS rules to permit a list as the last library name part
to give the version number
- extend the R6RS rules to permit non-negative exact integers as library
name parts; and to permit symbols in addition to integers in the version
number part