A new version of Monticello was added to project The Inbox: http://source.squeak.org/inbox/Monticello-ct.793.mcz
==================== Summary ====================
Name: Monticello-ct.793 Author: ct Time: 17 August 2023, 9:56:07.31349 am UUID: bd190a4a-830f-4347-8b3f-75fc44316702 Ancestors: Monticello-tpr.792
Fixes regression in MCFileBasedRepository>>#versionNamed: that no longer answered nil for absent versions. Adds the comment from super to document this behavior clearer.
=============== Diff against Monticello-tpr.792 ===============
Item was changed: ----- Method: MCFileBasedRepository>>versionNamed: (in category 'versions') ----- versionNamed: aMCVersionName + "Answer the MCVersion with name, aMCVersionName, or nil if it doesn't exist in this repository." - "For FileBased repositories, aMCVersionName must have the appropriate extension!! Try to handle that " | version | version := self cache at: aMCVersionName ifAbsent: [[self loadVersionFromFileNamed: aMCVersionName ] on: FileDoesNotExistException , NotFound do: [:err| "in some cases we try to load package versions where aMCVersionName does not include the filename extension. Try again with the mcz extension; we might need to be even cleverer?" + [self loadVersionFromFileNamed: aMCVersionName, '.mcz'] + on: FileDoesNotExistException , NotFound + do: [:err2 | nil]] ]. - err return: (self loadVersionFromFileNamed: aMCVersionName, '.mcz')] ]. self resizeCache: cache. (version notNil and: [ version isCacheable ]) ifTrue: [ cache at: aMCVersionName asMCVersionName put: version ]. ^ version!
On 2023-08-17, at 7:56 AM, commits@source.squeak.org wrote:
Fixes regression in MCFileBasedRepository>>#versionNamed: that no longer answered nil for absent versions. Adds the comment from super to document this behavior clearer.
That's odd. I could have sworn the prior version returned nil if no .mcz was found.
We need to be cleverer with file based mc packages. There are potentially mcz, mcm, mcd and ... ? extensions and all of them are dropped when the package info is loaded. Which is the cause of this problem.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SDLI: Shift Disk Left Immediate
squeak-dev@lists.squeakfoundation.org