[Pharo-users] Re: Pharo is unresponsive after forcing quit

2022-04-28 Thread Mark O'Donoghue
FWIW

I've seen similar issues with P9 and P10 in my simple project - which has
nothing fancy happening with threads or processes .

Typically the system would sometimes freeze for about 20 minutes and then
resolve by itself. Days of trying workarounds finally revealed the Spec2
layout calculations were very very busy.

Perhaps the geometry calculations  aren't readily converging? Changing the
initial window size seemed to magically sidestep the problem. Also slightly
changing some values for  #add:height: #add:widget: constraints in the
layouts seemed to avoid the problem too. Finicky indeed...

I also occassionally see the P9 and P10 environment freeze if left
unattended too long. No idea why.

Sometimes a presenter won't display properly unless and until I click in
another window. No idea why.

SpTablePresenters often paint with column alignment problems -  you need to
click the table -  or reset with #items: to get a neatly aligned result...

Coping with these behaviours can be incredibly time consuming...

I wonder how many people are seeing similar quirky behaviours...?

On Fri, 29 Apr 2022, 3:50 am Stewart MacLean,  wrote:

> Thanks all for your suggestions/replies.
>
> Nothing fixes it for now. I accept that due to the single threaded nature
> of the UI that there will be glitches occasionally, and when you are using
> low level interfaces.
>
> The weird thing is this happens after restarting, when everything should
> be pristine!
>
> Cheers,
>
> Stewart
>
> On Thu, Apr 28, 2022 at 9:41 PM Noury Bouraqadi 
> wrote:
>
>> I've got it too with P9 when I leave an image open for a while. I becomes
>> unresponsive and I have to kill it from the Mac OS "force quit" popup.
>> Hppened to me with the Pharo launcher too.
>>
>>
>> Noury
>> On Apr 28 2022, at 3:47 am, Yanni Chiu  wrote:
>>
>> Try switching focus to another app on your Mac (e.g. Finder or web
>> browser), then back to Pharo
>>
>> On Wed, Apr 27, 2022 at 8:44 PM Stewart MacLean 
>> wrote:
>>
>> Hi,
>>
>> [Pharo 10 on Mac Monterey]
>>
>> Due to the multi-process nature of Bonjour that I'm attempting to
>> interface to, I am crashing the system ALOT as it disappears down a black
>> hole and I try to figure out the cause.
>>
>> However, I've noticed that most of the time when I restart Pharo it is
>> unresponsive to clicks and I have to relaunch Pharo AGAIN! Argh!
>>
>> The mouse moves but no one is at home. Right click brings up menus, but
>> they don't respond.
>>
>> As I move the mouse, list items are highlighted.
>>
>> As this is a completely new OS process, I'm wondering what is causing
>> this behaviour?
>>
>> Has anyone else experienced this, or have an explanation?
>>
>> Cheers,
>>
>> Stewart
>>
>>


[Pharo-users] Re: Pharo is unresponsive after forcing quit

2022-04-28 Thread Stewart MacLean
Thanks all for your suggestions/replies.

Nothing fixes it for now. I accept that due to the single threaded nature
of the UI that there will be glitches occasionally, and when you are using
low level interfaces.

The weird thing is this happens after restarting, when everything should be
pristine!

Cheers,

Stewart

On Thu, Apr 28, 2022 at 9:41 PM Noury Bouraqadi  wrote:

> I've got it too with P9 when I leave an image open for a while. I becomes
> unresponsive and I have to kill it from the Mac OS "force quit" popup.
> Hppened to me with the Pharo launcher too.
>
>
> Noury
> On Apr 28 2022, at 3:47 am, Yanni Chiu  wrote:
>
> Try switching focus to another app on your Mac (e.g. Finder or web
> browser), then back to Pharo
>
> On Wed, Apr 27, 2022 at 8:44 PM Stewart MacLean 
> wrote:
>
> Hi,
>
> [Pharo 10 on Mac Monterey]
>
> Due to the multi-process nature of Bonjour that I'm attempting to
> interface to, I am crashing the system ALOT as it disappears down a black
> hole and I try to figure out the cause.
>
> However, I've noticed that most of the time when I restart Pharo it is
> unresponsive to clicks and I have to relaunch Pharo AGAIN! Argh!
>
> The mouse moves but no one is at home. Right click brings up menus, but
> they don't respond.
>
> As I move the mouse, list items are highlighted.
>
> As this is a completely new OS process, I'm wondering what is causing this
> behaviour?
>
> Has anyone else experienced this, or have an explanation?
>
> Cheers,
>
> Stewart
>
>


[Pharo-users] Re: Loading from a git repository with Metacello on a running seaside image

2022-04-28 Thread Dale Henrichs
Emilio,

I wasn't quite sure whether or not you were concerned about having the
BaselineOf refreshed or a reload of the packages managed by the BaselineOf
and as Gabriel mentions, the missing #projectClass method is the most
common problem ...

By default Metacello does not refresh a BaselieOf in your image if it is
already present, however, you can force a refresh of a BaselineOf by using
the the Metcello #get command:

> Metacello new baseline:'MyProject';
>   repository: 'github://myUser/MyProject:main/myProject';
>   get;
>   load.

This would be a good pattern to follow when reloading projects after
updating from github ... and I am a bit surprised that this question is not
asked more often :)

Dale

On Mon, Apr 25, 2022 at 6:06 PM Emilio Oca  wrote:

> Hi Gabriel, Dale!
>
> My BaselineOf had only #baseline:
> Added #projectClass
> But is still not working.
> It seems to be doing the load, but not the pull before the load.
>
> I had implemented no more than #baseLine: and now projectClass.
>
> If I go through the UI and do the pull it works perfectly.
> Can I replicate that with a script?
>
> Best
>
> Emilio
>
> On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs <
> dale.henri...@gemtalksystems.com> wrote:
>
>> Emilio,
>>
>> Are you using a repository without Monticello meta data? If so, then you
>> need to change the #projectClass of you your baseline to:
>>
>>> projectClass
>>>   Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^
>>> cl ].
>>>   ^ super projectClass
>>
>>
>> unless the #projectClass is MetacelloCypressBaselineProject, Metacello
>> will think that your package versions are 'cypress.1' and Metacello will
>> not load packages with the same version  when the #projectClass is
>> MetacelloCypressBaselineProject, Metacello will always load the package and
>> let Monticello filter out the changes ...
>>
>> Dale
>>
>> On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano 
>> wrote:
>>
>>> mmm, you may be having another problem elsewhere, because what I typed
>>> should be working (is how we enforce the load of new versions to run the
>>> tests, for example).
>>>
>>> Esteban
>>>
>>> On Apr 25 2022, at 11:30 pm, Emilio Oca  wrote:
>>>
>>> Hi Esteban
>>>
>>> Thanks for the hint.
>>> It is still not working.
>>> Even if I remove BaselineOfMyProject and MyProject.
>>> When it reloads, it doesn't loads the last version of head at github but
>>> the one that was already at the image.
>>>
>>> I just want to update up to what is at gibhub head. Is there another way?
>>>
>>> Best
>>>
>>> Emilio
>>>
>>> On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano 
>>> wrote:
>>>
>>> Hi Emilio,
>>>
>>> You need something like this:
>>>
>>>   Metacello new
>>> repository: 'github://pharo-spec/Spec:Pharo10';
>>> baseline: 'Spec2';
>>> onConflict: [ :e | e useIncoming ];
>>> onUpgrade: [ :e | e useIncoming ];
>>> ignoreImage;
>>> load
>>>
>>> ignoreImage, onConflict, onUpgrade.
>>>
>>> BUT if your image already has a baseline for your project then Metacello
>>> will not reload it (hence your project may not be loaded correctly, since
>>> baseline may have changed).
>>>
>>> In that case, I always execute before something like:
>>>
>>> #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
>>> (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
>>> ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]
>>>
>>>
>>> I ack this is hacky, but it works :)
>>>
>>> Esteban
>>>
>>> On Apr 23 2022, at 3:21 am, Emilio Oca  wrote:
>>>
>>> Hi List
>>>
>>> I need some help with Metacello, and may be git too
>>>
>>> I would like to be able to, in a running headless image, load the last
>>> commit of a git repo
>>>
>>> Something like
>>> Metacello new baseline:'MyProject';
>>> repository: 'github://myUser/MyProject:main/myProject';
>>> load.
>>> works just once and may open some dialogs
>>>
>>> Something like this
>>> [
>>> [
>>> Metacello new baseline:'MyProject';
>>> repository: 'github://myUser/MyProject:main/myProject';
>>> onConflictUseIncoming;
>>> load.
>>> ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
>>> ] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
>>> Avoids the dialogs and alerts but the code is still not updated.
>>>
>>> My intention is to be able to 'refresh' a running seaside image with its
>>> latest development version from a git repo (avoiding to personally reach
>>> the server and rebuild the docker image)
>>> What am I missing?
>>>
>>> Best
>>>
>>> Emilio
>>>
>>>


[Pharo-users] [ANN] docker-pharo-runtime v10.0.0-1.0.1 [v10.0.0 + 1.0.1] released!

2022-04-28 Thread Buenos Aires Smalltalk
docker-pharo-runtime, docker image for Pharo reached it's v10.0.0-1.0.1 version.
What's Changed

Update bash script to use exec by @gcotelli in https://github.com/ba-st/docker-pharo-runtime/pull/2
Add docker image for loading pharo code by @gcotelli in https://github.com/ba-st/docker-pharo-runtime/pull/4

The pharo-loader docker image can be used for multi-stage docker builds:

It disables Epicea so code loading is faster
It configures Iceberg to use HTTPS to avoid failing on SSH and later retrying with HTTPS for each repo

FROM ghcr.io/ba-st/pharo-loader:v10.0.0 AS loader
RUN pharo metacello install github://owner/repo:branch BaselineOfProject

FROM ghcr.io/ba-st/pharo:v10.0.0
COPY --from=loader /opt/pharo/Pharo.image ./
COPY --from=loader /opt/pharo/Pharo.changes ./
COPY --from=loader /opt/pharo/Pharo*.sources ./
...

Full Changelog: https://github.com/ba-st/docker-pharo-runtime/compare/v10.0.0-1.0.0…v10.0.0-1.0.1
Regards,
The Buenos Aires Smalltalk team


[Pharo-users] [ANN] docker-pharo-vm v9.0.14-1.0.1 [v9.0.14 + 1.0.1] released!

2022-04-28 Thread Buenos Aires Smalltalk
docker-pharo-vm, docker image for Pharo VM reached it's v9.0.14-1.0.1 version.
What's Changed

Update pharo-vm bash script to use exec by @gcotelli in https://github.com/ba-st/docker-pharo-vm/pull/4

Full Changelog: https://github.com/ba-st/docker-pharo-vm/compare/v9.0.14-1.0.0…v9.0.14-1.0.1
Regards,
The Buenos Aires Smalltalk team


[Pharo-users] Re: A question about #beginsWith: and #endsWith:

2022-04-28 Thread Kasper Osterbye
> Kasper Osterbye schrieb am Dienstag, 26. April 2022 14:50:51 (+02:00):
> 
> I have now raised it as an issue on the issue tracker
> 
> Issue #11165  in 
> https://github.com/pharo-project/pharo/issues/11165 
> 
If I may suggest a solution it will be to:
add two new methods - prefixedBy:  and suffixedBy: to handle the empty 
prefix/suffix correctly
add comments to beginsWith:  and endsWith:  referring to the two new methods

The problem is that there is client code which depend on the (wrong) 
implementation of the beginsWith and endsWith methods.