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

Exception on code completion of instrumented selector #22

Closed
Gabriel-Darbord opened this issue Oct 19, 2024 · 1 comment
Closed

Exception on code completion of instrumented selector #22

Gabriel-Darbord opened this issue Oct 19, 2024 · 1 comment

Comments

@Gabriel-Darbord
Copy link

When writing code and HeuristicCompletion triggers a selector lookup, it can lead to an exception when a method with this selector is instrumented.
This happens because the selector is a MpHiddenSelector: Message not understood: MpHiddenSelector >> #asSymbol.

Here is the stack trace
MpHiddenSelector(Object)>>doesNotUnderstand: #asSymbol
CoAvoidRepeatedFetcher>>hasAlreadyReturned:
[ :elem |
			(self hasAlreadyReturned: elem)
				ifFalse: [
					"As the NECEntry does not know how to compare I will enter the content as symbol"
					elements add: elem contents asSymbol.
					aBlock value: elem ] ] in CoAvoidRepeatedFetcher>>entriesDo: in Block: [ :elem |...
[ :e |
		aBlock value: (NECSelectorEntry contents: e node: astNode)] in CoClassImplementedMessagesFetcher>>entriesDo: in Block: [ :e |...
MethodDictionary>>keysDo:
Behavior class(Behavior)>>selectorsDo:
CoClassImplementedMessagesFetcher>>entriesDo:
CoHierarchyFetcher>>entriesDo:
[ :completion | completion entriesDo: aBlock ] in CoFetcherSequence>>entriesDo: in Block: [ :completion | completion entriesDo: aBlock ]
OrderedCollection>>do:
OrderedCollection>>do:
CoFetcherSequence>>entriesDo:
CoAvoidRepeatedFetcher>>entriesDo:
CoNarrowHistoryFetcher>>entriesDo:
[ :g |
			self entriesDo: [ :entry |
				(self acceptsEntry: entry)
					ifTrue: [ g yield: entry ] ] ] in CoNarrowHistoryFetcher(CoFetcher)>>generator in Block: [ :g |...
Generator>>fork
CoNarrowHistoryFetcher(CoFetcher)>>next
[ (last := self next) ifNotNil: [ :each |
			stream nextPut: each.
			total := total + 1 ] ] in [ :stream | | total last |
		total := 0.
		[ (last := self next) ifNotNil: [ :each |
			stream nextPut: each.
			total := total + 1 ] ]
			doWhileTrue: [ total < anInteger and: [ last isNotNil ] ] ] in CoNarrowHistoryFetcher(CoFetcher)>>next: in Block: [ (last := self next) ifNotNil: [ :each |...
FullBlockClosure(BlockClosure)>>doWhileTrue:
[ :stream | | total last |
		total := 0.
		[ (last := self next) ifNotNil: [ :each |
			stream nextPut: each.
			total := total + 1 ] ]
			doWhileTrue: [ total < anInteger and: [ last isNotNil ] ] ] in CoNarrowHistoryFetcher(CoFetcher)>>next: in Block: [ :stream | | total last |...
Array class(SequenceableCollection class)>>new:streamContents:
CoNarrowHistoryFetcher(CoFetcher)>>next:
CoResultSet>>fetch:
CoResultSet>>ensureResults:
CoResultSet>>first:
CoCompletionContext>>entries
CoCompletionContext>>entryCount
NECMenuMorph>>itemsCount
NECMenuMorph>>selected:
NECMenuMorph>>refreshSelection
NECMenuMorph>>engine:position:
NECMenuMorph class>>engine:position:
CoCompletionEngine(CompletionEngine)>>openMenuForced:
[
				editor atCompletionPosition ifTrue: [ self openMenuForced: false ]] in [
			(Delay forMilliseconds: NECPreferences popupAutomaticDelay) wait.
			MorphicUIManager new defer:  [
				editor atCompletionPosition ifTrue: [ self openMenuForced: false ]]
		] in CoCompletionEngine(CompletionEngine)>>resetCompletionDelay in Block: [...
@jordanmontt
Copy link
Collaborator

Thanks Gabriel! I have just fixed this in the last commit

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