pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Deprecation is breaking Browse class

Open Ducasse opened this issue 1 year ago • 1 comments

Pay attention this bug happens only the first time we try. How to reproduce

  • select a class
  • remove the class
  • when prompted use browse class reference
Capture 2024-05-31 at 09 29 27
RBSequenceNode(Object)>>doesNotUnderstand: #sourceNodeForPC:
CompiledBlock>>sourceNodeForPC:
Context>>sourceNodeExecuted
Deprecation>>transform
Deprecation>>defaultAction
UndefinedObject>>handleSignal:
Context>>handleSignal:
Deprecation(Exception)>>pass
Deprecation(Exception)>>notifyUserOfCommand:
ClyFullBrowserClassContext(CmdToolContext)>>processFailure:of:
CmdCommandActivator>>processCommandFailure:
[ :exc | self processCommandFailure: exc ] in CmdCommandActivator>>executeCommand in Block: [ :exc | self processCommandFailure: exc ]
FullBlockClosure(BlockClosure)>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
Deprecation(Exception)>>signal
Deprecation>>signal
RBMethod(Object)>>deprecated:transformWith:
RBMethod>>method
StMessageBrowser
			browse: (references collect: [ :ref | ref method ])
			asSendersOf: violator realClass in [ :violator :references |
		"we should pass the application! "
		StMessageBrowser
			browse: (references collect: [ :ref | ref method ])
			asSendersOf: violator realClass ] in ReRemoveClassDriver>>browseReferences in Block: StMessageBrowser...
[:each | each ifNotNil: [newSet add: (aBlock value: each enclosedElement)]] in Set>>collect: in Block: [:each | each ifNotNil: [newSet add: (aBlock v[..]
Array(SequenceableCollection)>>do:
Set>>collect:
[ :violator :references |
		"we should pass the application! "
		StMessageBrowser
			browse: (references collect: [ :ref | ref method ])
			asSendersOf: violator realClass ] in ReRemoveClassDriver>>browseReferences in Block: [ :violator :references |...
[ :assoc |
		  aBlock value: assoc key value: assoc value ] in Dictionary>>keysAndValuesDo: in Block: [ :assoc |...
[ :each | each ifNotNil: [ aBlock value: each ] ] in Dictionary>>associationsDo: in Block: [ :each | each ifNotNil: [ aBlock value: each ] ]
Array(SequenceableCollection)>>do:
Dictionary>>associationsDo:
Dictionary>>keysAndValuesDo:
ReRemoveClassDriver>>browseReferences
ReBrowseClassReferencesChoice>>action
ReRemoveClassDriver>>handleBreakingChanges
ReRemoveClassDriver>>runRefactoring
SycRemoveClassCommand>>execute
ClyFullBrowserClassContext(ClySystemBrowserContext)>>executeCommand:by:
[self prepareCommandForExecution.
	context executeCommand: command by: self.
	self applyCommandResult] in CmdCommandActivator>>executeCommand in Block: [self prepareCommandForExecution....
FullBlockClosure(BlockClosure)>>on:do:
CmdCommandActivator>>executeCommand
[ | selArgCount |  "show cursor in case item opens a new MVC window"
		(selArgCount := selector numArgs) = 0
			ifTrue:
				[target perform: selector]
			ifFalse:
				[selArgCount = arguments size
					ifTrue: [target perform: selector withArguments: arguments]
					ifFalse: [target perform: selector withArguments: (arguments copyWith: evt)]].
		self showShortcut.
		self changed] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in Block: [ | selArgCount |  "show cursor in case item o[..]
FullBlockClosure(BlockClosure)>>ensure:
CursorWithMask(Cursor)>>showWhile:
ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
ToggleMenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseUp:
MouseButtonEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in Block: [ ^ anEvent sentTo: self ]
FullBlockClosure(BlockClosure)>>ensure:
MorphicEventDispatcher>>dispatchEvent:with:
ToggleMenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseUp:
MouseButtonEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in Block: [ ^ anEvent sentTo: self ]
FullBlockClosure(BlockClosure)>>ensure:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
MenuMorph(Morph)>>processEvent:
MenuMorph>>handleFocusEvent:
[
		result := focusHolder handleFocusEvent: transformedEvent.
	] in HandMorph>>sendFocusEvent:to:clear: in Block: [...
FullBlockClosure(BlockClosure)>>on:do:
WorldMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendMouseEvent:
HandMorph>>handleEvent:
[
		(morphicWorld activeHand isNotNil and: [ anEvent hand isNotNil ]) ifTrue: [
			morphicWorld activeHand handleEvent: anEvent
		]
	] in OSWindowMorphicEventHandler>>dispatchMorphicEvent: in Block: [...
WorldState>>runStepMethodsIn:
WorldMorph>>runStepMethods
WorldState>>doOneCycleFor:
WorldMorph>>doOneCycleNow
WorldMorph>>doOneCycle
[
		| extraWorldsToDraw |
		extraWorldsToDraw := ExtraWorldListMutex critical: [
			                     self extraWorldList ].
		extraWorldsToDraw do: [ :world | world doOneCycle ].

		(self currentWorld isNotNil and: [
			 (extraWorldsToDraw includes: self currentWorld) not ]) ifTrue: [
			self currentWorld doOneCycle ] ] in WorldMorph class>>doOneCycle in Block: [...
FullBlockClosure(BlockClosure)>>ensure:
WorldState class>>doDrawCycleWith:
WorldMorph class>>doOneCycle
MorphicRenderLoop>>doOneCycle
MorphicRenderLoop>>doOneCycleWhile:
[ MorphicRenderLoop new doOneCycleWhile: [ true ] ] in MorphicUIManager>>spawnNewProcess in Block: [ MorphicRenderLoop new doOneCycleWhile: [ tru[..]
[self value.
			"IMPORTANT: Do not step over next line of code. See method comments for details"
			Processor terminateRealActive] in FullBlockClosure(BlockClosure)>>newProcess in Block: [self value....

Ducasse avatar May 31 '24 07:05 Ducasse

I'm on Pharo-13.0.0+SNAPSHOT.build.110.sha.c13ef42faa8e1568ccc21044dd61ce6b3a2e11fb and cannot reproduce this issue. It is working as intended.

matburnx avatar Jun 28 '24 13:06 matburnx

Hmm probably deprecations were removed in P13 already. Maybe this is reproducible in P12?

guillep avatar Jul 01 '24 14:07 guillep