pharo-spec / NewTools

All development tools for Pharo, developed with Spec
21 stars 53 forks source link

[Debug] Jump to carret problem - Instance of InstructionStream did not understand #willJumpIfFalse #538

Closed labordep closed 6 months ago

labordep commented 1 year ago

During a debug, I want to move the cursor using "Jump to caret" image

But I have an error : image

I'm debuging this method : image

And I want to jump here : image

labordep commented 1 year ago

Same problem with image

labordep commented 1 year ago

My config :

Ducasse commented 1 year ago

Thanks pierre! Tests are missing.

StevenCostiou commented 1 year ago

@jecisc @adri09070 This is the method that you removed from Sindarin?

jecisc commented 1 year ago

We removed it in the Pharo 12 branch. I don't think the Pharo-11 branch got touched

StevenCostiou commented 1 year ago

this is odd I just tested on a fresh image and it works. The method is there in Sindarin.

Capture d’écran 2023-05-31 à 15 27 36

@labordep Did you reload Sindarin, or another project?

StevenCostiou commented 1 year ago

Does it mean the method was later added to Pharo and not deleted from Sindarin?

jecisc commented 1 year ago

IIRC: This method was present as an extension provided by Debugger-Model and also as an extension provided by Sindarin. This made Sindaring remove some code that was present in Pharo.

I removed in Pharo12 branch the method of Sindarin so that Sindarin use the version from Pharo of this method.

StevenCostiou commented 1 year ago

It was Debugging-Core, and it is present in P12 and P11, and last time this code was touched is 5 years ago so it was there.

See https://github.com/pharo-project/pharo/blame/Pharo11/src/Debugging-Core/InstructionStream.extension.st

But there in Pharo12 and 11 when I create a new image, it is already there. An hypothesis could be that @labordep you load something that messes it up. Did you load any of our debugging projects maybe that could have a dependency?

adri09070 commented 1 year ago

@labordep I would say this is normal it doesn't work if you loaded Sindarin and if you use the master branch Sindarin on Pharo-11.

Is it the case?

If this is the case, you should use the Pharo-11 branch of Sindarin

adri09070 commented 1 year ago

Still, it's weird that it doesn't work because the method exists in Debugging-Core. I wonder if the problem happens in Pharo12.

But at least, you are sure that the method exists on the Pharo-11 branch

labordep commented 1 year ago

@adri09070 @StevenCostiou, Yes I have Sindarin.

To be complete I have that :

"Chest"
Metacello new
    baseline: 'Chest';
    repository: 'github://pharo-spec/Chest';
    load.

"Sindarin"
Metacello new
    baseline: 'Sindarin';
    repository: 'github://pharo-spec/ScriptableDebugger';
    load.

"AST"
Metacello new
    baseline: 'DebuggableASTInterpreter';
    repository: 'github://adri09070/DebuggableASTInterpreter';
    load.

"Seeker"
Metacello new
    baseline: 'Seeker';
    repository: 'github://maxwills/SeekerDebugger:main';
    load.
adri09070 commented 1 year ago

On Pharo 11, you should use

"Sindarin"
Metacello new
    baseline: 'Sindarin';
    repository: 'github://pharo-spec/ScriptableDebugger:Pharo-11';
    load.

instead of

"Sindarin"
Metacello new
    baseline: 'Sindarin';
    repository: 'github://pharo-spec/ScriptableDebugger';
    load.

Still, it doesn't "feel normal" that you cannot use the master branch on Pharo-11, I will try to find a solution

labordep commented 1 year ago

Thanks @adri09070, I will test. But normally the baselineOf should select the correct branch for my image version ?

adri09070 commented 1 year ago

I just tried, and when I select the branch Pharo-11, I have... nothing...

image

Thanks Iceberg...

adri09070 commented 1 year ago

But all looks good with a Metacello script...

Anyway, I think I found a solution to be able to use the master branch in Pharo11