Skip to content

Commit abe684e

Browse files
Merge pull request #30 from Julesboul/feat/DSMetalinks
Add DSMetalink to Debugging Spy
2 parents 298c92c + a5530d0 commit abe684e

56 files changed

Lines changed: 832 additions & 744 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/dsspy.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@ on: [push, pull_request]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
env:
9-
PROJECT_NAME: ${{ matrix.smalltalk }}-DebuggingSpy
10-
strategy:
11-
matrix:
12-
smalltalk: [ Pharo64-12 ]
13-
name: ${{ matrix.smalltalk }}
148
steps:
15-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v5
1610
- uses: hpi-swa/setup-smalltalkCI@v1
1711
with:
18-
smalltalk-version: ${{ matrix.smalltalk }}
19-
- run: smalltalkci -s ${{ matrix.smalltalk }}
12+
smalltalk-version: Pharo64-14
13+
- run: smalltalkci -s Pharo64-14
2014
shell: bash
2115
timeout-minutes: 15
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
Class {
2-
#name : #BaselineOfDebuggingSpy,
3-
#superclass : #BaselineOf,
4-
#category : #BaselineOfDebuggingSpy
2+
#name : 'BaselineOfDebuggingSpy',
3+
#superclass : 'BaselineOf',
4+
#category : 'BaselineOfDebuggingSpy',
5+
#package : 'BaselineOfDebuggingSpy'
56
}
67

7-
{ #category : #baselines }
8+
{ #category : 'baselines' }
89
BaselineOfDebuggingSpy >> baseline: spec [
910

1011
<baseline>
12+
13+
spec baseline: 'ExperimentModel' with: [
14+
spec repository:
15+
'github://Pharo-XP-Tools/ExperimentModel:main' ].
16+
1117
spec for: #common do: [
1218
spec postLoadDoIt: #postloadAction.
1319
spec package: 'DebuggingSpy'.
1420
spec package: 'DebuggingSpy-Tests' ]
1521
]
1622

17-
{ #category : #baselines }
23+
{ #category : 'baselines' }
1824
BaselineOfDebuggingSpy >> postloadAction [
1925
DSSpy handlingError: false
2026
]

BaselineOfDebuggingSpy/package.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Package { #name : #BaselineOfDebuggingSpy }
1+
Package { #name : 'BaselineOfDebuggingSpy' }

DebuggingSpy-Tests/DSSpyBrowserTest.class.st

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ Class {
66
#tag : 'Tests - Scenarios'
77
}
88

9-
{ #category : 'running' }
10-
DSSpyBrowserTest >> setUp [
11-
super setUp.
12-
13-
14-
]
15-
169
{ #category : 'tests - browser' }
1710
DSSpyBrowserTest >> testBrowserRUN1 [
11+
"
1812
|log history openedPlaygrounds playgroundsAction openedBrowser browserEntering|
1913
log := DSTestingScenariosFileLocator browserScenario001.
2014
history := DSRecordHistory fromSTON: log.
@@ -26,7 +20,9 @@ DSSpyBrowserTest >> testBrowserRUN1 [
2620
self assert: openedPlaygrounds size equals: 1.
2721
self assert: playgroundsAction notEmpty.
2822
self assert: history mergedWindowJumps first type equals: 'Playground'.
29-
self assert: history mergedWindowJumps last type equals: 'Browser'.
23+
self assert: history mergedWindowJumps last type equals: 'Browser'. "
24+
25+
self flag: #TODO
3026

3127

3228
]

DebuggingSpy-Tests/DSSpyInstrumenterTest.class.st

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ DSSpyInstrumenterTest >> assertInstrumentSindarinDebuggerCommandNamed: debuggerC
7979
"Commands from toolbar"
8080
cmds := debugger rootCommandsGroup
8181
/ StDebuggerToolbarCommandTreeBuilder groupName
82-
/ 'Advanced Step'.
82+
/ 'Advanced'.
8383
cmd := StDebugger
8484
specCommandNamed: debuggerCommandName
8585
inGroup: cmds entries.
@@ -383,7 +383,7 @@ DSSpyInstrumenterTest >> stObjectContextModelMock [
383383
| model context |
384384
model := StInspectorModel on: StInspectorMockObject new.
385385
context := StInspectionContext fromPragma:
386-
(StInspectorMockObject >> #inspectionMock1) pragmas first.
386+
(StInspectorMockObject >> #inspectionMock1:) pragmas first.
387387
context inspectedObject: model inspectedObject.
388388
^ StObjectContextModel new
389389
inspection: model;
@@ -635,7 +635,7 @@ DSSpyInstrumenterTest >> testInstrumentExpandAttribute [
635635
DSSpyInstrumenterTest >> testInstrumentHaltHits [
636636

637637
instrumenter instrumentHaltHits.
638-
methodsToRemove := {
638+
methodsToRemove := {
639639
(Halt class >> #signal:).
640640
(Halt class >> #signalIn:).
641641
(Halt class >> #signal) }.
@@ -645,40 +645,55 @@ DSSpyInstrumenterTest >> testInstrumentHaltHits [
645645
self assert: self registry size equals: 1.
646646
record := self registry first.
647647
self assert: record selector equals: #halt.
648-
self assertHaltHitRecordingMethod: (self class >> #executeHalt) conditional: false once: false.
649-
648+
self
649+
assertHaltHitRecordingMethod: self class >> #executeHalt
650+
conditional: false
651+
once: false.
652+
650653
[ self executeHaltIf ]
651654
on: Halt
652655
do: [ ].
653656
self assert: self registry size equals: 2.
654657
record := self registry second.
655658
self assert: record selector equals: #haltIf:.
656-
self assertHaltHitRecordingMethod: (self class >> #executeHaltIf) conditional: true once: false.
657-
659+
self
660+
assertHaltHitRecordingMethod: self class >> #executeHaltIf
661+
conditional: true
662+
once: false.
663+
658664
self recompileExecuteHaltOnce.
659665
[ self executeHaltOnce ]
660666
on: Halt
661-
do: [ ].
667+
do: [ ].
662668
self assert: self registry size equals: 3.
663669
record := self registry third.
664-
self assert: record selector equals: #once.
665-
self assertHaltHitRecordingMethod: (self class >> #executeHaltOnce) conditional: false once: true.
666-
667-
[ self executeHaltWithMessage ]
670+
self assert: record selector equals: #once:.
671+
self
672+
assertHaltHitRecordingMethod: self class >> #executeHaltOnce
673+
conditional: false
674+
once: true.
675+
676+
[ self executeHaltWithMessage ]
668677
on: Halt
669-
do: [ ].
678+
do: [ ].
670679
self assert: self registry size equals: 4.
671680
record := self registry fourth.
672681
self assert: record selector equals: #now:.
673-
self assertHaltHitRecordingMethod: (self class >> #executeHaltWithMessage) conditional: false once: false.
674-
675-
[ self execute1Halt ]
682+
self
683+
assertHaltHitRecordingMethod: self class >> #executeHaltWithMessage
684+
conditional: false
685+
once: false.
686+
687+
[ self execute1Halt ]
676688
on: Halt
677-
do: [ ].
689+
do: [ ].
678690
self assert: self registry size equals: 5.
679691
record := self registry fifth.
680692
self assert: record selector equals: #halt.
681-
self assertHaltHitRecordingMethod: (self class >> #execute1Halt) conditional: false once: false.
693+
self
694+
assertHaltHitRecordingMethod: self class >> #execute1Halt
695+
conditional: false
696+
once: false
682697
]
683698

684699
{ #category : 'tests - halts' }
@@ -950,7 +965,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorCopySelection [
950965

951966
| rubEditor registerClipboardText |
952967
modifiedClass := RubSmalltalkEditor.
953-
modifiedMethodSource := (RubSmalltalkEditor >> #doIt) sourceCode.
968+
modifiedMethodSource := (RubSmalltalkEditor >> #copySelection) sourceCode.
954969
instrumenter instrumentRubSmalltalkEditorCopySelection.
955970

956971
registerClipboardText := DSSpy recordClipboardContent.
@@ -1017,7 +1032,7 @@ DSSpyInstrumenterTest >> testInstrumentRubEditorPaste [
10171032

10181033
| rubEditor registerClipboardText |
10191034
modifiedClass := RubSmalltalkEditor.
1020-
modifiedMethodSource := (RubSmalltalkEditor >> #doIt) sourceCode.
1035+
modifiedMethodSource := (RubSmalltalkEditor >> #paste) sourceCode.
10211036
instrumenter instrumentRubSmalltalkEditorPaste.
10221037
registerClipboardText := DSSpy recordClipboardContent.
10231038
DSSpy recordClipboardContent: true.
@@ -1269,17 +1284,20 @@ DSSpyInstrumenterTest >> testInstrumentSpCodePrintIt [
12691284

12701285
{ #category : 'tests - playground' }
12711286
DSSpyInstrumenterTest >> testInstrumentStPlayground [
1272-
|playground|
1287+
1288+
| playground |
12731289
modifiedClass := StPlaygroundPresenter class.
1274-
modifiedMethodSource := (StPlaygroundPresenter class >> #open) sourceCode.
1290+
modifiedMethodSource := (StPlaygroundPresenter class >> #open)
1291+
sourceCode.
12751292
instrumenter instrumentPlaygroundCode.
12761293
playground := StPlaygroundPresenter open.
1277-
1294+
12781295
"On opening, the playground generates an opening record"
12791296
self assert: self registry size equals: 1.
1280-
record := self registry first.
1297+
record := self registry first.
12811298
self assert: record class identicalTo: DSPlaygroundOpenedRecord.
1282-
self assert: record windowId equals: playground window window hash
1299+
self assert: record windowId equals: playground window window hash.
1300+
playground close.
12831301
]
12841302

12851303
{ #category : 'tests - debugger' }
@@ -1309,13 +1327,13 @@ DSSpyInstrumenterTest >> testInstrumentStepToMethodEntry [
13091327
{ #category : 'tests - debugger' }
13101328
DSSpyInstrumenterTest >> testInstrumentStepToNextCallInClass [
13111329

1312-
self assertInstrumentSindarinDebuggerCommandNamed: 'Next call in class'
1330+
self assertInstrumentSindarinDebuggerCommandNamed: 'To next execution in class'
13131331
]
13141332

13151333
{ #category : 'tests - debugger' }
13161334
DSSpyInstrumenterTest >> testInstrumentStepToNextCallInObject [
13171335

1318-
self assertInstrumentSindarinDebuggerCommandNamed: 'Next call in receiver'
1336+
self assertInstrumentSindarinDebuggerCommandNamed: 'To next execution in receiver'
13191337
]
13201338

13211339
{ #category : 'tests - debugger' }

0 commit comments

Comments
 (0)