Comment 4 for bug 1631771

Faré (fahree) wrote :

OK, my understanding of the issue is as follows:

1- The output through apply-output-translations, by being universal, applies to asdf as well as everything. This means asdf can't see its fasl where it now expects it, and decides that it needs to recompile itself.

2- As part of reloading itself, asdf resets all its generic. That's one of the reasons it loads itself before anything else.

3- But ASDF, when it reloads itself, doesn't reload previously registered system definitions unless its schema has changed (which it hasn't since 2.32.13), because it believes all the data will be preserved. The data is preserved indeed, but as we saw above, the methods are not.

Therefore:

A- For jason, the workaround is either (a) to (progn (asdf:upgrade-asdf) (asdf:clear-defined-systems)) right after you define your output-translations function, (you can skip the clear-defined-systems if you promise you upgrade-asdf *BEFORE* you load any .asd file or reference them in any way).

B- For us, we should probably clear-defined-systems always upon upgrade, for the reasons above, even if there was no schema upgrade of the data, because otherwise we will be missing methods. Thus I'm thinking that either cleanup-upgraded-asdf must always run the hooks, or the defun* and friends from uiop/utility must somehow be restricted to only undefine the target function it the version being upgraded from is too old...