hpi-swa / smalltalkCI

Framework for testing Smalltalk projects with GitHub Actions, GitLab CI, Travis CI, AppVeyor, and others.
MIT License
94 stars 68 forks source link

SmalltalkCI class>>saveAndQuitImage currently broken in Pharo-11.0.0+build.725 #631

Closed sebastianconcept closed 6 months ago

sebastianconcept commented 6 months ago

self platformClass saveImage is not returning a boolean so this method fails:

saveAndQuitImage
    self platformClass saveImage
        "Close image only if it is not resuming."
        ifFalse: [ self platformClass quitImage ] 

Pharo-11.0.0+build.725

Screen Shot 2024-02-15 at 11 37 53

I had a lot of succesful builds in Pharo 11 for several projects so I wonder why it broke now if it was previously working. What moved? Aren't versions used for this pinned?

Bajger commented 6 months ago

Confirming this: Both P11, P12 are affected. https://github.com/exercism/pharo-smalltalk/actions/runs/7906008750?pr=609

fniephaus commented 6 months ago

What kind of object is it returning? For Pharo, smalltalkCI simply calls: https://github.com/hpi-swa/smalltalkCI/blob/f163c906638fc4be54e340ae801833137ff14394/repository/SmalltalkCI-Pharo-Core.package/SmalltalkCIPharo.class/class/saveImage.st#L3

Bajger commented 6 months ago

aSnapshotOperation instance is being returned now... obrazek

fniephaus commented 6 months ago

Cool, so P11 and P12 again broke public API used by smalltalkCI. We need need a new saveImage impl for them in a compatibility package. Anyone wants to open a PR for this?

sebastianconcept commented 6 months ago

@fniephaus sounds good like this? https://github.com/hpi-swa/smalltalkCI/issues/632

fniephaus commented 6 months ago

@sebastianconcept smalltalkCI always has compatibility packages for Pharo, see SmalltalkCI-Pharo-Core.package which, for example, includes SmalltalkCIPharo11. They inherit from each other, so adding an override via SmalltalkCIPharo11>>#saveImage might do the trick.

Bajger commented 6 months ago

Do you know, SmalltalkCIPharo>>#saveImage return boolean originally stands for (meaning)?

labordep commented 6 months ago

Hi, I have errors since last night in all of my projects (on Windows, Linux and Mac) during CI:

image

Do you think this is related to this issue?

sebastianconcept commented 6 months ago

@labordep yes, I can confirm you that's the same I've saw in mine. I've removed Pharo 11 from my CI until this issue is resolved.

labordep commented 6 months ago

Thanks @sebastianconcept, I have this error on Pharo12 CI too ><

labordep commented 6 months ago

For Pharo 12:

NonBooleanReceiver: proceed for truth.
SnapshotOperation(ProtoObject)>>mustBeBooleanIn:
SnapshotOperation(ProtoObject)>>mustBeBoolean
SmalltalkCI class>>saveAndQuitImage
UndefinedObject>>DoIt
OCReceiverDoItSemanticScope(OCDoItSemanticScope)>>evaluateDoIt:
OpalCompiler>>evaluate
OpalCompiler>>evaluate:
[
    result := Smalltalk compiler evaluate: aStream.
    self hasSessionChanged
        ifFalse: [
            self stdout
                print: result;
                lf ] ] in EvaluateCommandLineHandler>>evaluate: in Block: [...
FullBlockClosure(BlockClosure)>>on:do:
EvaluateCommandLineHandler>>evaluate:
EvaluateCommandLineHandler>>evaluateArguments
EvaluateCommandLineHandler>>activate
EvaluateCommandLineHandler class(CommandLineHandler class)>>activateWith:
[ aCommandLinehandler activateWith: commandLine ] in PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]
FullBlockClosure(BlockClosure)>>on:do:
PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
[ self handleArgument: self firstArgument ] in [ [ self handleArgument: self firstArgument ]
        on: Exit
        do: [ :exit |
            "If the command line is protected by password, we just exit the image because in non-headless mode the handleExit will let the image open. If the password protection is enabled, it is to avoid to let the access to the image."
            self class commandLinePasswordManager hasPasswordSet
                ifTrue: [ Smalltalk snapshot: false andQuit: true ].
            self handleExit: exit ] ] in PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self handleArgument: self firstArgument ]
FullBlockClosure(BlockClosure)>>on:do:
[ [ self handleArgument: self firstArgument ]
        on: Exit
        do: [ :exit |
            "If the command line is protected by password, we just exit the image because in non-headless mode the handleExit will let the image open. If the password protection is enabled, it is to avoid to let the access to the image."
            self class commandLinePasswordManager hasPasswordSet
                ifTrue: [ Smalltalk snapshot: false andQuit: true ].
            self handleExit: exit ] ] in PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ [ self handleArgument: self firstArgument ]...
[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....
Error with status code 1:
692 run_script /home/runner/.smalltalkCI/helpers.sh

Error: Process completed with exit code 1.
sebastianconcept commented 6 months ago

@fniephaus sounds good, thanks for elaborating. Do we have a PR for it, should I try to help with one?

fniephaus commented 6 months ago

@noha has created #634. I'll merge it if all goes well.