pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Monticello still uses the old class definition

Open guillep opened this issue 1 year ago • 1 comments

Bug description

see MCClassDefinition >> fullDefinitionString

imagen

guillep avatar Jan 17 '24 16:01 guillep

I'm sharing this here for reference. I started to work on this, but many MC tests began to fail once these changes were made. What is strange is that Monticello Mock classes (all classes in `MonticelloMocks) were deleted while running the Monticello tests with the following changes:

MCClassDefinition>>printDefinitionOn: stream
	stream nextPutAll: (
		self actualClass
			ifNotNil: [ : c | (ClassDefinitionPrinter for: c) definitionString ]
			ifNil: [ 'Class definition not found' ])
MCClassDefinition>>printClassDefinitionOn: stream
	"Print a class-side definition of the receiver on the given stream.
	Class instance variables and class traits."

	stream nextPutAll: (ClassDefinitionPrinter for: self actualClass class) definitionString.
MCClassDefinitionTest>>testDefinitionString
	| d |
	d := self mockClassA asClassDefinition.
	self assert: d definitionString equals: self mockClassA definitionString.

Remove MCTraitDefinition>>printDefinitionOn: stream Remove MCTraitDefinition>>printClassDefinitionOn: stream

hernanmd avatar Jun 06 '24 20:06 hernanmd