On Mon, Jul 8, 2013 at 9:36 PM, Anton Vodonosov avodonosov@yandex.ru wrote:
If given system name "mcclim/freetype" we want ASDF to search for mcclim.asd, then the extension hook should be named *sysdef-file-search-functions* instead of *system-definition-search-functions*.
Gratuitously changing the hook variable name would only force an even more abrupt transition without obviously bringing any benefit. It's not like the old semantics is hopelessly broken and we want to force people away from it with aggravation (as was the case with the conditional semantics of :if-component-fails). It's more like we introduced a much needed new feature, and it is subtly incompatible with some previous ASDF extensions (or singular key extension, namely quicklisp).
That would allow the the strategy of fallback to the main system name to be encapsulated in the main ASDF.
It is a feature of ASDF3 (started in the last year of ASDF2) that ASDF supports systems that are not backed by files, but simply defined in the lisp image. The feature is notably used by ASDF itself, and could be used by any system that needs to be defined for dependency purpose, and may or may not be upgraded to a version from source when available.
And still have the code organization reflecting what is really going on: ASDF tries to load system "mcclim/freetype" and asks the extensions for find the "mcclim.asd" file.
What if it's not in a file? Shouldn't each extension be responsible for itself?
Of course, deploying this solution today is complicated - all clients must attach to new hook. So probably it is easier to just duplicate the fallback policy in the clients.
As far as I can tell, there is one and only one client that matters — quicklisp. And matters it does.
P.S. If it is necessary to support people who keep several system definitions in a single .asd file, then it makes sense to apply the same strategy to dash separated system names: search for "mcclim-freetype" may fallback to search in mcclim.asd
I don't know if it's necessary, but it has been common practice for a long time, except lacking any supported way to name them in such a way that ASDF would find them, unless they had been somehow found already — until ASDF3. Except as people start to use the new ASDF3 feature, something has to be done in ASDF and/or Quicklisp for Quicklisp to support it.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Any sufficiently advanced misquotation is indistinguishable from an original statement. — John McCarthy, misquoted