metacello
metacello copied to clipboard
Interesting behavior for Metacello load using cacheRepository
I don't think this is a bug, since the cacheRepository is really intended for use when doing pure fetches and not for doing loads ... with that said, there is nothing to prevent one from attempting to do a load when you've set the cacheRepository ... however as the tests associated with this bug prove, the results will not be what one wants ...
This discovery came while setting up tests for Issue #399 ... and one of the test MetacelloCypressIssue399PackageCacheTestCase>>testIssue400A showed unexpected behavior in that the package was not loaded ... there may be other odd behavior worth exploring some day involving the following:
- MetacelloFetchingMCSpecLoader>>scheduleFetchFor:nearestReference:
- MetacelloFetchingMCSpecLoader>>scheduleFetchFor:cachedReference:
neither of these methods schedule a fetch and thus nothing gets added to the directives and nothing is loaded ...
I think the ultimate resolution here will be to disallow a load when a cacheRepository is specified ...
I just ran into this for the past weekend. Didn't know about the distinction between fetch and load. Can we add a warning if cacheRepository: is set when doing a load? Proceeding unsets the cacheRepository or something.