Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when snapshot does not contain class definition #9

Open
stlutz opened this issue Jun 9, 2021 · 1 comment
Open

Error when snapshot does not contain class definition #9

stlutz opened this issue Jun 9, 2021 · 1 comment

Comments

@stlutz
Copy link

stlutz commented Jun 9, 2021

When saving a package consisting of nothing but extension methods, a NotFound: Object is not in the collection. error is thrown in TonelWriter >> writeSnapshot:.

writeSnapshot: aSnapshot
snapshot := aSnapshot.
"ensure package dirs exists.
It has to be just one but well..."
self writePackage: (snapshot definitions
detect: #isOrganizationDefinition
ifFound: [ :each | each ]
ifNone: [ self createDefaultOrganizationFrom: (snapshot definitions detect: #isClassDefinition) ]).
"now export classes"
(snapshot definitions
select: #isClassDefinition)
do: [ :each | self writeClass: each ].
"... and method extensions"
self writeMethodExtensions

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: pharo-vcs@d6ea569

@j4yk
Copy link
Collaborator

j4yk commented Oct 31, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants