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

Export of a snapshot with method extensions only fails #24

Open
pavel-krivanek opened this issue Feb 27, 2018 · 4 comments
Open

Export of a snapshot with method extensions only fails #24

pavel-krivanek opened this issue Feb 27, 2018 · 4 comments

Comments

@pavel-krivanek
Copy link
Contributor

The package Moose-TestResources-KGB-P11FullReferee contains only the method extensions. The method TonelWriter>>#writeSnapshot: does following:

self writePackage: (snapshot definitions 
		detect: #isOrganizationDefinition
		ifFound: [ :each | each ]
		ifNone: [ self createDefaultOrganizationFrom: (snapshot definitions detect: #isClassDefinition) ]).

The snapshot does contain no organization nor class definition (it contains only 3 method definitions) so the code fails.

@pavel-krivanek pavel-krivanek changed the title Export of a snapshot with method extensions fails only Export of a snapshot with method extensions only fails Feb 27, 2018
@estebanlm estebanlm added this to the 1.0.10 milestone Sep 14, 2018
@peteruhnak
Copy link
Contributor

I've considered fixing this by looking at the extension name, however that is not good because

  • the capitalization can be different (which would result in multiple packages/directories on Linux and different behavior on Windows)
  • the extension name can be actually a compound of "packageName-protocolName"

The only place where the package name is still available (in case of all methods being extension methods), is the MCVersionInfo... so maybe

TonelWriter>>writeVersion: aVersion
	packageName := aVersion package name.
	self writeSnapshot: aVersion snapshot

but this won't work either if someone tries to use writeSnapshot: directly...

@peteruhnak
Copy link
Contributor

@pavel-krivanek btw if you've encountered this problem with Git-Migration, then it is fixed (Git-Migration now adds the necessary definition before fileout). But obviously this needs to be fixed in Tonel too.

@estebanlm
Copy link
Contributor

related to #59

@pavel-krivanek
Copy link
Contributor Author

@peteruhnak not, it was not related to Git-Migration.

@guillep guillep removed this from the 1.0.13 milestone May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants