Hello,
I see what you are trying to do, and I agree that it should be possible. I have set up the same situation as you: trying to load a module, failing, adding it to my path, trying again, and failing again. Here's what I've figured out:
- resolve-module fails on the module, when I think it should succeed. that's because
- try-autoload-module fails on the module, when again I think it should succeed. and that's because
- autoload-done-or-in-progress? returns #t for the module, when I think it should return #f. specifically, the module is marked as done, and therefore try-module-autoload won't look for it any more.
- the module was marked as autoloaded because that's what try-module-autoload does: it *always* marks its module as autoloaded, even if it wasn't found.
As a workaround, remove your module from the list "autoloads-done". (actually, there will be a pair in that list, where the cdr of the pair is the name of the module as a string. remove that.)
In the long term, Andy and Ludo, what is the right way to fix this? Should try-module-autoload not mark unfound modules as autoloaded? Or maybe there should be a special function that says "retry this module, starting from the beginning". Maybe it could even be part of reload-module.
Best,
Noah