squeak-smalltalk / squeak-tonel

Fork of the Tonel project for Squeak/Smalltalk
1 stars 2 forks source link

Error when snapshot does not contain class definition #9

Open stlutz opened 3 years ago

stlutz commented 3 years ago

When saving a package consisting of nothing but extension methods, a NotFound: Object is not in the collection. error is thrown in TonelWriter >> writeSnapshot:. https://github.com/squeak-smalltalk/squeak-tonel/blob/010a3d75ad25bbf839e7d97e4e307cd9088e5744/MonticelloTonel-Core.package/TonelWriter.class/instance/writeSnapshot..st#L2-L16

More specifically, the expression snapshot definitions detect: #isClassDefinition (line 10) fails to find a class definition, since the snapshot only contains method definitions for the extension methods.

It looks like a fix for this problem was already introduced for the upstream repository: https://github.com/pharo-vcs/tonel/commit/d6ea569

j4yk commented 2 years ago

I have merged the upstream repository. Please check whether the issue is resolved.