Skip to content
  • Francois-Rene Rideau's avatar
    2.015.2: fix defsystem to avoid infinite loop in some cases. · ff4057b6
    Francois-Rene Rideau authored
    Nikodemus reported on the list an infortunate interaction with quicklisp.
    such if when you had a system installed both in quicklisp and outside
    quicklisp, say flexi-streams, and the .asd defsystem'ed an auxiliary system,
    say flexi-streams-test, and you tried to load the version outside quicklisp,
    e.g. by putting it first in the *central-registry*, then ASDF would
    start loading the non-quicklisp .asd; during parse-component-form for the
    auxiliary system, find-system would be called and then locate the quicklisp
    version, since it can't be found by file name, but quicklisp includes it
    in its database; ASDF would then load the quicklisp .asd; during the
    parse-component-form for the main system, it would call find-system,
    and the non-quicklisp .asd would be found, and so on in an infinite loop.
    
    This patch refactors defsystem to put all the work in a function
    will a trivial macro-expansion. The function pushes the system being
    currently defined into a list of such systems that is specially consulted
    first by search-for-system-definition, hopefully avoiding any loop.
    ff4057b6