Re: [Pharo-users] Multiple NeoJSON mappings for the same domain object

2019-02-12 Thread Norbert Hartl
Forgot to add the links

https://github.com/zweidenker/JSONSchema

https://github.com/zweidenker/OpenAPI

Norbert

> Am 13.02.2019 um 08:44 schrieb Norbert Hartl :
> 
> If you are not in a hurry you can use JSON schema. That is also an external 
> mapper which can validate. And the spec is serializable. You might miss some 
> functionality but I could try to add that if you don‘t do. I would be happy 
> to have more users of the library.
> 
> If you use it for REST you could also use OpenAPI which I did. It uses the 
> JSON schema stuff for doing it.
> 
> Norbert
> 
>> Am 13.02.2019 um 02:58 schrieb Esteban Maringolo :
>> 
>> Meanwhile I found another approach to solve this in the context of a
>> JSON/REST API.
>> 
>> E.g. see #addRuleToEncode:to:using: in.
>> https://github.com/ba-st/Stargate/blob/release-candidate/source/Stargate-Examples/PetsRESTfulControllerSpecification.class.st
>> 
>> Has a separate mapper for encoding and decoding, depending on the endpoint:
>> 
>> Regards,
>> 
>> Esteban A. Maringolo
>> 
>> El mar., 12 feb. 2019 a las 19:34, Esteban Maringolo
>> () escribió:
>>> 
>>> Hi all, Sven, :)
>>> 
>>> I'm working on a domain model that will have different JSON
>>> representations for the same domain objects, so depending on the
>>> context it will return one representation or another.
>>> 
>>> In the past to solve the multiple representations, what I did was to
>>> build "helper" methods that added the mappings to the mapper.
>>> 
>>> So the process was like:
>>> 1. instantiate the mapper
>>> 2. call a #neoJsonSimple: mapper
>>> 3. configure the mapper by calling other mapping defining methods
>>> 4. convert the object to a JSON string.
>>> 
>>> If I wanted an "extended" representation, in the step 2 I would call
>>> #neoJsonExtended: instead.
>>> 
>>> But I find this "too manual" to scale.
>>> 
>>> So... is there a better, ¿canonical?, way to achieve this?
>>> 
>>> 
>>> Thanks!
>>> 
>>> 
>>> ps: By now it will be only object -> JSON (so NeoJSONWriter), but in
>>> the future I might need to instantiate objects back from JSON, so the
>>> mappings should be for both mappers.
>>> 
>>> Esteban A. Maringolo
>> 
> 
> 


Re: [Pharo-users] Multiple NeoJSON mappings for the same domain object

2019-02-12 Thread Norbert Hartl
If you are not in a hurry you can use JSON schema. That is also an external 
mapper which can validate. And the spec is serializable. You might miss some 
functionality but I could try to add that if you don‘t do. I would be happy to 
have more users of the library.

If you use it for REST you could also use OpenAPI which I did. It uses the JSON 
schema stuff for doing it.

Norbert

> Am 13.02.2019 um 02:58 schrieb Esteban Maringolo :
> 
> Meanwhile I found another approach to solve this in the context of a
> JSON/REST API.
> 
> E.g. see #addRuleToEncode:to:using: in.
> https://github.com/ba-st/Stargate/blob/release-candidate/source/Stargate-Examples/PetsRESTfulControllerSpecification.class.st
> 
> Has a separate mapper for encoding and decoding, depending on the endpoint:
> 
> Regards,
> 
> Esteban A. Maringolo
> 
> El mar., 12 feb. 2019 a las 19:34, Esteban Maringolo
> () escribió:
>> 
>> Hi all, Sven, :)
>> 
>> I'm working on a domain model that will have different JSON
>> representations for the same domain objects, so depending on the
>> context it will return one representation or another.
>> 
>> In the past to solve the multiple representations, what I did was to
>> build "helper" methods that added the mappings to the mapper.
>> 
>> So the process was like:
>> 1. instantiate the mapper
>> 2. call a #neoJsonSimple: mapper
>> 3. configure the mapper by calling other mapping defining methods
>> 4. convert the object to a JSON string.
>> 
>> If I wanted an "extended" representation, in the step 2 I would call
>> #neoJsonExtended: instead.
>> 
>> But I find this "too manual" to scale.
>> 
>> So... is there a better, ¿canonical?, way to achieve this?
>> 
>> 
>> Thanks!
>> 
>> 
>> ps: By now it will be only object -> JSON (so NeoJSONWriter), but in
>> the future I might need to instantiate objects back from JSON, so the
>> mappings should be for both mappers.
>> 
>> Esteban A. Maringolo
> 




Re: [Pharo-users] Running test

2019-02-12 Thread Sean P. DeNigris
HilaireFernandes wrote
> I could try to fetch one from PharoLuncher on Mac OSX

I just dl-ed the new Launcher on Mojave and it seems that I had to
temporarily disable Gatekeeper via command line to get around a similar
error.



-
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Re: [Pharo-users] Multiple NeoJSON mappings for the same domain object

2019-02-12 Thread Esteban Maringolo
Meanwhile I found another approach to solve this in the context of a
JSON/REST API.

E.g. see #addRuleToEncode:to:using: in.
https://github.com/ba-st/Stargate/blob/release-candidate/source/Stargate-Examples/PetsRESTfulControllerSpecification.class.st

Has a separate mapper for encoding and decoding, depending on the endpoint:

Regards,

Esteban A. Maringolo

El mar., 12 feb. 2019 a las 19:34, Esteban Maringolo
() escribió:
>
> Hi all, Sven, :)
>
> I'm working on a domain model that will have different JSON
> representations for the same domain objects, so depending on the
> context it will return one representation or another.
>
> In the past to solve the multiple representations, what I did was to
> build "helper" methods that added the mappings to the mapper.
>
> So the process was like:
> 1. instantiate the mapper
> 2. call a #neoJsonSimple: mapper
> 3. configure the mapper by calling other mapping defining methods
> 4. convert the object to a JSON string.
>
> If I wanted an "extended" representation, in the step 2 I would call
> #neoJsonExtended: instead.
>
> But I find this "too manual" to scale.
>
> So... is there a better, ¿canonical?, way to achieve this?
>
>
> Thanks!
>
>
> ps: By now it will be only object -> JSON (so NeoJSONWriter), but in
> the future I might need to instantiate objects back from JSON, so the
> mappings should be for both mappers.
>
> Esteban A. Maringolo



Re: [Pharo-users] Calypso documentation? Or understanding menu building

2019-02-12 Thread Tim Mackinnon
Thanks Denis - lots for me to look through there. I’ll also add a PR to add 
those documentation links to the Calypso readme.

Tim

> On 12 Feb 2019, at 19:32, Denis Kudriashov  wrote:
> 
> Hi Tim
> 
> вт, 12 февр. 2019 г. в 13:42, Tim Mackinnon :
> Is there any documentation on Calypso   application contexts? I am trying to 
> add a menu item to a package tag (the bit underneath a package - which I 
> often call a sub-package).
> 
> Only class comments are available for Calypso. Also there are a Commander 
> booklet  
> which 
> describes contexts and ClassAnnotation github readme 
>  (together with class comments).
>  
> 
> I’ve specified: 
> 
> ^CmdContextMenuActivation 
> byItemOf: ClyQueryMenuGroup for: RPackage 
> asCalypsoItemContext 
> 
> 
> The #for: argument of command activations is a context where command should 
> be available. Context describes condition where given command (its activation 
> strategy) should be visible for users.
> In your example "RPackage asCalypsoItemContext" is an instance of 
> ClyBrowserItemContext which matches any selected package in the browser (when 
> a kind of RPackage is selected).
> And that's why you do not see it on selected tag because the tag is not a 
> package.
> 
> But that puts my menu on the package and not the tag 
> - and if I use the inspect extra menu in calypso, I get what looks to be 
> something that could help me determine what I want but I’m struggling to 
> understand what ClyTaggedClassGroup does, and what a context is all about.
> 
> Inspect command opens inspector of actually selected object which is an 
> instance of ClyTaggedClassGroup in that case (try inspect selected method and 
> you will get a CompiledMethod).
> Children of package in browser are instances of ClyClassGroup and subclasses. 
> So they are not raw tags. If you need a command for a tag you should add a 
> command for ClyTaggedClassGroup items:
> 
> ^CmdContextMenuActivation 
> byItemOf: ClyQueryMenuGroup for: ClyTaggedClassGroup 
> asCalypsoItemContext 
> 
> Look for example at SycPromotePackageFromTagCommand 
> class>>#fullBrowserMenuActivation which is defined this way.
> 
> There are other kind of contexts which can be used in command annotations. 
> For example if you want a command for selected method only in full browser 
> then you should use ClyMethodContextOfFullBrowser:
> 
> ^CmdContextMenuActivation byItemOf: ClyQueryMenuGroup for: 
> ClyMethodContextOfFullBrowser 
> 
> it can be confusing that simple class is used in this case. But underhood it 
> is converted to the instance of context where command should be available.
>  
> 
> Has anyone else played around with this at all?
> 
> Ideally I want to have a menu appear on all the tags underneath a particular 
> package - and possibly including that package (or maybe not - I haven’t 
> decided as I want to try it in the wild).
> 
> While I’m at it - I have quite understood how to create submenu’s either - as 
> I’d like to have several commands all as sub items of a menu item “Exercism”.
> 
> Look at commander booklet. It includes example.
>  
> 
> Tim
> 
> 
> 



[Pharo-users] Multiple NeoJSON mappings for the same domain object

2019-02-12 Thread Esteban Maringolo
Hi all, Sven, :)

I'm working on a domain model that will have different JSON
representations for the same domain objects, so depending on the
context it will return one representation or another.

In the past to solve the multiple representations, what I did was to
build "helper" methods that added the mappings to the mapper.

So the process was like:
1. instantiate the mapper
2. call a #neoJsonSimple: mapper
3. configure the mapper by calling other mapping defining methods
4. convert the object to a JSON string.

If I wanted an "extended" representation, in the step 2 I would call
#neoJsonExtended: instead.

But I find this "too manual" to scale.

So... is there a better, ¿canonical?, way to achieve this?


Thanks!


ps: By now it will be only object -> JSON (so NeoJSONWriter), but in
the future I might need to instantiate objects back from JSON, so the
mappings should be for both mappers.

Esteban A. Maringolo



[Pharo-users] Its odd you can't have our own git project called MyProject/Pharo!

2019-02-12 Thread Tim Mackinnon
I’m really quite stunned that having worked happily 6 months ago on a project 
called github://exercism/pharo  (a name given to us by 
the exercism project) - that you can’t load that code into Pharo7 anymore 
either via iceberg or via metacello.

It looks like iceberg ignores any paths leading up to a project name and just 
assumes anything ending in pharo is the actual pharo project. It would be good 
to get confirmation of this - and also understand what would happen if any 
other projects happen to collide with each other - e.g. macta/StateSpecs vs 
google/StateSpecs? Its innocently done - and given we don’t currently use 
prefixes on our project names - we could get a nasty surprise (if I’ve 
understood the implications correctly). It seems weird that we would do this 
though, so I’m wondering if I’ve misunderstood this - hopefully?

Can anyone more in the know comment?

If it is true, its going to be embarrassing to have to go back to the exercism 
project (which just recently got funding from the Mozilla foundation) and ask 
them to change the name of our project to pharo-st because we can’t handle the 
name...

Tim

Re: [Pharo-users] [TelePharo] Error in remote playground..

2019-02-12 Thread Denis Kudriashov
I think it would be enough to do on client side

12 февр. 2019 г. 21:23 пользователь "Denis Kudriashov" 
написал:

Checkout dev branch using iceberg

12 февр. 2019 г. 21:10 пользователь "sergio ruiz" 
написал:

I am not sure I follow..

Do you mean grab the source from github using Iceberg?

Thanks!

On February 12, 2019 at 4:03:25 PM, Denis Kudriashov (dionisi...@gmail.com)
wrote:

Ah, it needs new release.
Try load dev versions of telepharo and seamless from Iceberg



peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


Re: [Pharo-users] [TelePharo] Error in remote playground..

2019-02-12 Thread Denis Kudriashov
Checkout dev branch using iceberg

12 февр. 2019 г. 21:10 пользователь "sergio ruiz" 
написал:

I am not sure I follow..

Do you mean grab the source from github using Iceberg?

Thanks!

On February 12, 2019 at 4:03:25 PM, Denis Kudriashov (dionisi...@gmail.com)
wrote:

Ah, it needs new release.
Try load dev versions of telepharo and seamless from Iceberg



peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


Re: [Pharo-users] [TelePharo] Error in remote playground..

2019-02-12 Thread sergio ruiz
I am not sure I follow..

Do you mean grab the source from github using Iceberg?

Thanks!

On February 12, 2019 at 4:03:25 PM, Denis Kudriashov (dionisi...@gmail.com)
wrote:

Ah, it needs new release.
Try load dev versions of telepharo and seamless from Iceberg


peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


Re: [Pharo-users] [TelePharo] Error in remote playground..

2019-02-12 Thread Denis Kudriashov
Ah, it needs new release.
Try load dev versions of telepharo and seamless from Iceberg

12 февр. 2019 г. 20:45 пользователь "sergio ruiz" 
написал:

Hey, all..

I am now able to connect to my remote image, but I am having one more issue.

When opening a remote playground and trying to manipulate objects, i am
getting:


ideas?

Thanks!

peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


[Pharo-users] [TelePharo] Error in remote playground..

2019-02-12 Thread sergio ruiz
Hey, all..

I am now able to connect to my remote image, but I am having one more issue.

When opening a remote playground and trying to manipulate objects, i am
getting:


ideas?

Thanks!

peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


Re: [Pharo-users] [ANN] P3 version 1.2

2019-02-12 Thread Tudor Girba
Thanks a lot for doing this!

It is of great help to know that we can reliably work with Postgres.

Cheers,
Doru


> On Feb 12, 2019, at 3:22 PM, Sven Van Caekenberghe  wrote:
> 
> Hi,
> 
> There is a new release of P3, the modern, lean and mean PostgreSQL client for 
> Pharo.
> 
> https://github.com/svenvc/P3
> 
> Version 1.2 contains the following changes:
> 
> - P3PreparedStatement is now joined by a polymorphic P3FormattedStatement 
> working client side on text strings
> - P3PreparedStatement & P3FormattedStatement now share the same double 
> dispatch mechanism to process argument binding
> - Added convenience methods #listDatabases #listSchemas & 
> #listTablesInSchema: to P3Client
> - Added convenience methods #firstColumnData & #firstFieldOfFirstRecord to 
> P3Result
> - Added dynamic ENUM support via #loadEnums in P3Client
> - Add support for the 7 geometric types POINT, CIRCLE, LINE, LSEG, POLYGON & 
> PATH with corresponding objects P3Point, P3Circle, P3Line, P3LineSegment, 
> P3Polygon & P3Path
> - Add support for the INTERVAL type with P3Interval object
> - Added P3Client>>#serverVersion accessor
> - Add support for BIT & VARBIT types with P3FixedBitString & P3BitString 
> objects
> - Add TIMETZ support
> - Organised P3 package with tags
> - More & better documentation & unit tests
> 
> https://github.com/svenvc/P3/releases/tag/v1.2
> 
> The quality of open source software is determined by it being alive, 
> supported and maintained.
> 
> The first way to help is to simply use P3 in your projects and report back 
> about your successes and the issues that you encounter. You can ask questions 
> on the Pharo mailing lists.
> 
> Enjoy,
> 
> Sven
> 
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
> 
> 
> 
> 
> 

--
www.feenk.com

"What is more important: To be happy, or to make happy?"




Re: [Pharo-users] Loading TelePharo on Pharo 7

2019-02-12 Thread sergio ruiz
Yes! correct..

i just built a new work image from scratch, and it works fine.

Connecting to my remote now..

Thanks!

On February 12, 2019 at 12:20:50 PM, Denis Kudriashov (dionisi...@gmail.com)
wrote:

Try it with closed browsers because it loads different version and it will
break live instances of browser components.

Better to do it from scratch image to avoid cached instances


peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101


Re: [Pharo-users] Traits for class methods?

2019-02-12 Thread Hilaire
Thanks for the update. Took a look at the doc bellow. To my taste, this
traits design really add complexity in the code, particularly in
responsibility and now the state. While it could be useful in some
situation.

Le 11/02/2019 à 20:37, Cyril Ferlicot a écrit :
> Hi,
>
> Since Pharo 7, Traits are statefuls. 
>
> See documentation at: 
> https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/Traits.md
>
-- 
Dr. Geo
http://drgeo.eu





Re: [Pharo-users] Running test

2019-02-12 Thread Hilaire
I have been able to test the VM referenced bellow with drgeo image:
drgeo starts but the VM suffers this libgit plugin error, as it is the
case for the Linux VM.

Is there another working VM to look at?

I could try to fetch one from PharoLuncher on Mac OSX, but I only have
intermittent access to mac computer.

Hilaire

Le 09/02/2019 à 17:58, Hilaire a écrit :
> Guys, I am voiceless but thanks for your feedback!
>
> Regarding some of your feedbacks (plugin error with libgit), I have
> doubt about this Mac OS VM[1]. Will you be kind enough to confirm this
> VM works on your system? So I can stand on a solid ground to find a
> solution for the DrGeo bundle.
>
> Thanks
>
> Hilaire
>
> [1] https://files.pharo.org/get-files/70/pharo-mac-stable.zip
>
> PS: I have no Mac or Windows so I am proceeding blindly, as I always did
> by the way.

-- 
Dr. Geo
http://drgeo.eu





Re: [Pharo-users] Calypso documentation? Or understanding menu building

2019-02-12 Thread Denis Kudriashov
Hi Tim

вт, 12 февр. 2019 г. в 13:42, Tim Mackinnon :

> Is there any documentation on Calypso   application contexts? I am trying
> to add a menu item to a package tag (the bit underneath a package - which I
> often call a sub-package).
>

Only class comments are available for Calypso. Also there are a Commander
booklet which
describes contexts and ClassAnnotation github readme
 (together with class
comments).


>
> I’ve specified:
>
> ^CmdContextMenuActivation
> byItemOf: ClyQueryMenuGroup for: RPackage
> asCalypsoItemContext
>
>
The #for: argument of command activations is a context where command should
be available. Context describes condition where given command (its
activation strategy) should be visible for users.
In your example "RPackage asCalypsoItemContext" is an instance of
ClyBrowserItemContext which matches any selected package in the browser
(when a kind of RPackage is selected).
And that's why you do not see it on selected tag because the tag is not a
package.

But that puts my menu on the package and not the tag

- and if I use the inspect extra menu in calypso, I get what looks to be
> something that could help me determine what I want but I’m struggling to
> understand what ClyTaggedClassGroup does, and what a context is all about.
>

Inspect command opens inspector of actually selected object which is an
instance of ClyTaggedClassGroup in that case (try inspect selected method
and you will get a CompiledMethod).
Children of package in browser are instances of ClyClassGroup and
subclasses. So they are not raw tags. If you need a command for a tag you
should add a command for ClyTaggedClassGroup items:

^CmdContextMenuActivation
byItemOf: ClyQueryMenuGroup for: ClyTaggedClassGroup
asCalypsoItemContext

Look for example at SycPromotePackageFromTagCommand
class>>#fullBrowserMenuActivation which is defined this way.

There are other kind of contexts which can be used in command annotations.
For example if you want a command for selected method only in full browser
then you should use ClyMethodContextOfFullBrowser:

^CmdContextMenuActivation byItemOf: ClyQueryMenuGroup for:
ClyMethodContextOfFullBrowser


it can be confusing that simple class is used in this case. But underhood
it is converted to the instance of context where command should be
available.


>
> Has anyone else played around with this at all?
>
> Ideally I want to have a menu appear on all the tags underneath a
> particular package - and possibly including that package (or maybe not - I
> haven’t decided as I want to try it in the wild).
>
> While I’m at it - I have quite understood how to create submenu’s either -
> as I’d like to have several commands all as sub items of a menu item
> “Exercism”.
>

Look at commander booklet. It includes example.


>
> Tim
>
>
>
>


Re: [Pharo-users] Boostrap for seaside : incorrect JQuery version

2019-02-12 Thread Esteban Maringolo
Maybe it's just a matter of importing the latest Bootstrap files (v3.3.7)
into the the corresponding FileLibrary.

Regards,




El lun., 11 feb. 2019 a las 18:51, Tomaž Turk ()
escribió:

> I'm sorry, I should be more clear - I copy the Bootstrap 3.3.7 code
> from here ,
> since 3.3.7 solved the issue I mentioned. The result is that mouse clicks
> behave as they should, and there is no error on browser's console anymore.
>
> Tomaz
>
>
>
> -- Original Message --
>
> From: "sergio ruiz" 
> To: "Any question about pharo is welcome" 
> Sent: 8. 02. 2019 21:22:39
> Subject: Re: [Pharo-users] Boostrap for seaside : incorrect JQuery version
>
> Just for the record, I am having the same problem..
>
>
> On February 8, 2019 at 3:20:18 PM, Dominique Dartois (d...@dartois.org)
> wrote:
>
> Hi all
> I installed seaside + Bootstrap from the « Catalog Browser », following
> the tips at http://smalltalkhub.com/#!/~TorstenBergmann/
> I run Pharo 7 64bits on MacOS.
> The demo doesn’t react to the mouse clicks. In fact Firefox debugger
> showed an incompatibility between Bootstrap and JQuery versions :
>
>


Re: [Pharo-users] [ANN] P3 version 1.2

2019-02-12 Thread Norbert Hartl
Cool. Makes me wanna use postgres 

Norbert

> Am 12.02.2019 um 15:22 schrieb Sven Van Caekenberghe :
> 
> Hi,
> 
> There is a new release of P3, the modern, lean and mean PostgreSQL client for 
> Pharo.
> 
> https://github.com/svenvc/P3
> 
> Version 1.2 contains the following changes:
> 
> - P3PreparedStatement is now joined by a polymorphic P3FormattedStatement 
> working client side on text strings
> - P3PreparedStatement & P3FormattedStatement now share the same double 
> dispatch mechanism to process argument binding
> - Added convenience methods #listDatabases #listSchemas & 
> #listTablesInSchema: to P3Client
> - Added convenience methods #firstColumnData & #firstFieldOfFirstRecord to 
> P3Result
> - Added dynamic ENUM support via #loadEnums in P3Client
> - Add support for the 7 geometric types POINT, CIRCLE, LINE, LSEG, POLYGON & 
> PATH with corresponding objects P3Point, P3Circle, P3Line, P3LineSegment, 
> P3Polygon & P3Path
> - Add support for the INTERVAL type with P3Interval object
> - Added P3Client>>#serverVersion accessor
> - Add support for BIT & VARBIT types with P3FixedBitString & P3BitString 
> objects
> - Add TIMETZ support
> - Organised P3 package with tags
> - More & better documentation & unit tests
> 
> https://github.com/svenvc/P3/releases/tag/v1.2
> 
> The quality of open source software is determined by it being alive, 
> supported and maintained.
> 
> The first way to help is to simply use P3 in your projects and report back 
> about your successes and the issues that you encounter. You can ask questions 
> on the Pharo mailing lists.
> 
> Enjoy,
> 
> Sven
> 
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
> 
> 
> 
> 
> 




Re: [Pharo-users] Pharo 7 crashes on OSX when unsuspending laptop?

2019-02-12 Thread Tim Mackinnon
It’s really bad for me - its just crashed again in an image that I loaded up 
when I reported this, this morning. Again it had been suspended over lunch but 
my laptop was running another program when it crashed in the background…

This is from a zero conf image downloaded on Friday - so its pretty fresh.

As I’m not working on anything crucial its not killing me - but I’d be pretty 
peeved off if I was using the new release for real and it was dying like this 
all of the time.

Tim

> On 12 Feb 2019, at 13:12, Cyril Ferlicot  wrote:
> 
> On Tue, Feb 12, 2019 at 1:53 PM Tim Mackinnon  wrote:
>> 
>> Ok- I’ve attached my crash.dmp file to that issue - for others that got it, 
>> was it launched from the terminal? That’s been my use case 2 days in a row, 
>> on a very minimal image - fresh with a small amount of code loaded into it, 
>> and a tiny bit of playing around before leaving it.
>> 
> 
> I launch my Pharo Launcher via the app icon and the other images via
> the PharoLauncher.
> 
>> Tim
>> 
>> 
> 
> 
> -- 
> Cyril Ferlicot
> https://ferlicot.fr
> 




Re: [Pharo-users] Loading TelePharo on Pharo 7

2019-02-12 Thread sergio ruiz
Thanks, Denis..

Will try this in a minute..

On February 12, 2019 at 3:42:06 AM, Denis Kudriashov (dionisi...@gmail.com)
wrote:

Following script will load TelePharo without error:

Metacello new
  baseline: 'TelePharo';
  repository: 'github://pharo-ide/TelePharo';
  onUpgrade: [:ex | ex useIncoming];
  onConflictUseIncoming;
  load.



пн, 11 февр. 2019 г. в 09:11, Denis Kudriashov :

> Hi Serge.
>
> You need to add option to metacello script onConflict: or onUpgrade: with
> block [:warn | warn useIncoming].
> I do not have computer now to give you exact code.
>
> Problem that telepharo depends on old version of Calypso but image
> includes the latest one. It needs to be fixed. I will look at it.
>
> And we should fix install scripts in readme page. It still references my
> repo but it was moved to pharo-ide org
>
> 9 февр. 2019 г. 8:05 PM пользователь "sergio ruiz" 
> написал:
>
> Hi, all..
>
> I am looking to install TelePharo on my 7.01 image using the setup found
> at :
>
> https://github.com/pharo-ide/TelePharo
>
> like
>
> Metacello new
>   baseline: 'TelePharo';
>   repository: 'github://dionisiydk/TelePharo';
>   load: 'Server’.
>
> and running into the following error. Any ideas?
>
> Thanks!
>
> MetacelloAllowConflictingProjectUpgrade>>defaultAction
> UndefinedObject>>handleSignal:
> Context>>handleSignal:
> Context>>handleSignal:
> MetacelloAllowConflictingProjectUpgrade(Exception)>>pass
> [ ^ exception pass ] in MetacelloScriptEngine>>handleConflict: in Block: [ ^ 
> exception pass ]
> Dictionary>>at:ifAbsent:
> MetacelloScriptEngine>>handleConflict:
> MetacelloAllowConflictingProjectUpgrade>>handleResolutionFor:
> [ :ex | "option handlers need to be outermost set of handlers ... last line 
> of defense before users are involved" ex handleResolutionFor: self ] in [ [ 
> actionBlock
> on:
> MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
> , MetacelloProjectSpecLoadedNotification
> , MetacelloScriptEnsureProjectLoadedForDevelopment
> , MetacelloLookupBaselineSpecForEnsureLoad
> do:
> [ :ex | "lookup and registration handlers need to be innermost set of 
> handlers ...they may throw option notifications" ex handleResolutionFor: self 
> ] ]
> on:
> MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
> , MetacelloAllowConflictingProjectUpgrade
> do:
> [ :ex | "option handlers need to be outermost set of handlers ... 
> last line of defense before users are involved" ex handleResolutionFor: self 
> ] ] in [ [ [ actionBlock
> on:
> MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
> , MetacelloProjectSpecLoadedNotification
> , MetacelloScriptEnsureProjectLoadedForDevelopment
> , MetacelloLookupBaselineSpecForEnsureLoad
> do:
> [ :ex | "lookup and registration handlers need to be innermost set of 
> handlers ...they may throw option notifications" ex handleResolutionFor: self 
> ] ]
> on:
> MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
> , MetacelloAllowConflictingProjectUpgrade
> do:
> [ :ex | "option handlers need to be outermost set of handlers ... 
> last line of defense before users are involved" ex handleResolutionFor: self 
> ] ]
> on: MetacelloAllowLockedProjectChange
> do:
> [ :ex | "MetacelloAllowLockedProjectChange need to be outermost 
> handler ... since it is signaled from second line of handlers" ex 
> handleResolutionFor: self ] ] in 
> MetacelloScriptEngine>>handleNotificationsForAction: in Block: [ :ex | 
> "option handlers need to be outermost set ...etc...
> BlockClosure>>cull:
> Context>>evaluateSignal:
> Context>>handleSignal:
> MetacelloAllowConflictingProjectUpgrade(Exception)>>signal
> [ :existing :new |
> (existing hasLoadConflicts: new)
> ifTrue: [ ((existing canUpgradeTo: new)
> ifTrue: [ MetacelloAllowProjectUpgrade new ]
> ifFalse: [ (existing canDowngradeTo: new)
> ifTrue: [ MetacelloAllowProjectDowngrade new ]
> ifFalse: [ MetacelloAllowConflictingProjectUpgrade new ] 
> ])
> existingProjectRegistration: existing;
> newProjectRegistration: new;
> signal ]
> ifFalse: [ new ] ] in MetacelloScriptEngine>>lookupProjectSpecFor: in 
> Block: [ :existing :new | ...
> [ :existing | ^ presentBlock value: existing value: newRegistration ] in 
> MetacelloProjectRegistration 
> class>>registrationForProjectSpec:ifAbsent:ifPresent: in Block: [ :existing | 
> ^ presentBlock value: existing value...etc...
> [ :existing | ^ presentBlock value: existing ] in 
> MetacelloProjectRegistry>>registrationFor:ifPresent:ifAbsent: in Block: [ 
> :existing | ^ presentBlock value: existing ]
> BlockClosure>>cull:
> Dictionary>>at:ifPresent:
> MetacelloProjectRegistry>>registrationFor:ifPresent:ifAbsent:
> 

[Pharo-users] [ANN] P3 version 1.2

2019-02-12 Thread Sven Van Caekenberghe
Hi,

There is a new release of P3, the modern, lean and mean PostgreSQL client for 
Pharo.

https://github.com/svenvc/P3

Version 1.2 contains the following changes:

- P3PreparedStatement is now joined by a polymorphic P3FormattedStatement 
working client side on text strings
- P3PreparedStatement & P3FormattedStatement now share the same double dispatch 
mechanism to process argument binding
- Added convenience methods #listDatabases #listSchemas & #listTablesInSchema: 
to P3Client
- Added convenience methods #firstColumnData & #firstFieldOfFirstRecord to 
P3Result
- Added dynamic ENUM support via #loadEnums in P3Client
- Add support for the 7 geometric types POINT, CIRCLE, LINE, LSEG, POLYGON & 
PATH with corresponding objects P3Point, P3Circle, P3Line, P3LineSegment, 
P3Polygon & P3Path
- Add support for the INTERVAL type with P3Interval object
- Added P3Client>>#serverVersion accessor
- Add support for BIT & VARBIT types with P3FixedBitString & P3BitString objects
- Add TIMETZ support
- Organised P3 package with tags
- More & better documentation & unit tests

https://github.com/svenvc/P3/releases/tag/v1.2

The quality of open source software is determined by it being alive, supported 
and maintained.

The first way to help is to simply use P3 in your projects and report back 
about your successes and the issues that you encounter. You can ask questions 
on the Pharo mailing lists.

Enjoy,

Sven

--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org







[Pharo-users] Calypso documentation? Or understanding menu building

2019-02-12 Thread Tim Mackinnon
Is there any documentation on Calypso   application contexts? I am trying to 
add a menu item to a package tag (the bit underneath a package - which I often 
call a sub-package).

I’ve specified: 

^CmdContextMenuActivation 
byItemOf: ClyQueryMenuGroup for: RPackage asCalypsoItemContext 

But that puts my menu on the package and not the tag - and if I use the inspect 
extra menu in calypso, I get what looks to be something that could help me 
determine what I want but I’m struggling to understand what ClyTaggedClassGroup 
does, and what a context is all about.

Has anyone else played around with this at all?

Ideally I want to have a menu appear on all the tags underneath a particular 
package - and possibly including that package (or maybe not - I haven’t decided 
as I want to try it in the wild).

While I’m at it - I have quite understood how to create submenu’s either - as 
I’d like to have several commands all as sub items of a menu item “Exercism”.

Tim





Re: [Pharo-users] Pharo 7 crashes on OSX when unsuspending laptop?

2019-02-12 Thread Cyril Ferlicot
On Tue, Feb 12, 2019 at 1:53 PM Tim Mackinnon  wrote:
>
> Ok- I’ve attached my crash.dmp file to that issue - for others that got it, 
> was it launched from the terminal? That’s been my use case 2 days in a row, 
> on a very minimal image - fresh with a small amount of code loaded into it, 
> and a tiny bit of playing around before leaving it.
>

I launch my Pharo Launcher via the app icon and the other images via
the PharoLauncher.

> Tim
>
>


-- 
Cyril Ferlicot
https://ferlicot.fr



Re: [Pharo-users] Pharo 7 crashes on OSX when unsuspending laptop?

2019-02-12 Thread Tim Mackinnon
Ok- I’ve attached my crash.dmp file to that issue - for others that got it, was 
it launched from the terminal? That’s been my use case 2 days in a row, on a 
very minimal image - fresh with a small amount of code loaded into it, and a 
tiny bit of playing around before leaving it.

Tim

> On 12 Feb 2019, at 12:43, Cyril Ferlicot  wrote:
> 
> Hi,
> 
> Related issue: https://github.com/pharo-project/pharo/issues/2422
> 
> On Tue, Feb 12, 2019 at 12:55 PM Tim Mackinnon  wrote:
>> 
>> I think I read someone else commenting on this, but I can’t find where I 
>> read it - but two days in a row now, I’ve had a fresh Pharo 7 image - 
>> downloaded with zero sonf and launched from terminal that has crashed with a 
>> segfault. I’ve essentially unsuspended my laptop and and then cmd-tabbed to 
>> that image to find the apple report tool.
>> 
>> The terminal output looks interesting as it actually seems that the image 
>> crashed overnight (2am) when my laptop was closed - I’ve shown some terminal 
>> info further back where I remember doing some work (ClyExercismSubmitCommand 
>> was a class I was working on before I suspended my laptop). I also show the 
>> apple report tool below it.
>> 
>> Any thoughts - or should I just put this into the bug tracker?
>> 
>> Tim
>> 
>> Terminal output:
>> 
>> CmdCommandActivator>>executeCommand
>> [ | selArgCount |
>> "show cursor in case item opens a new MVC window"
>> (selArgCount := selector numArgs) = 0
>> ifTrue: [ target perform: selector ]
>> ifFalse: [ selArgCount = arguments size
>> ifTrue: [ target perform: selector withArguments: arguments ]
>> ifFalse: [ target perform: selector withArguments: (arguments copyWith: evt) 
>> ] ].
>> self showShortcut.
>> self changed ] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in 
>> Block: [ | selArgCount |...
>> BlockClosure>>ensure:
>> CursorWithMask(Cursor)>>showWhile:
>> ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
>> ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
>> ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
>> MouseButtonEvent>>sentTo:
>> ToggleMenuItemMorph(Morph)>>handleEvent:
>> MorphicEventDispatcher>>dispatchDefault:with:
>> MorphicEventDispatcher>>handleMouseUp:
>> MouseButtonEvent>>sentTo:
>> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
>> Block: [ ^ anEvent sentTo: self ]
>> BlockClosure>>ensure:
>> MorphicEventDispatcher>>dispatchEvent:with:
>> ToggleMenuItemMorph(Morph)>>processEvent:using:
>> MorphicEventDispatcher>>dispatchDefault:with:
>> MorphicEventDispatcher>>handleMouseUp:
>> MouseButtonEvent>>sentTo:
>> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
>> Block: [ ^ anEvent sentTo: self ]
>> BlockClosure>>ensure:
>> MorphicEventDispatcher>>dispatchEvent:with:
>> MenuMorph(Morph)>>processEvent:using:
>> MenuMorph(Morph)>>processEvent:
>> MenuMorph>>handleFocusEvent:
>> Break
>> ClyExercismSubmitCommand>>execute
>> ClyPackageContextOfFullBrowser(ClySystemBrowserContext)>>executeCommand:by:
>> [ self prepareCommandForExecution.
>> context executeCommand: command by: self.
>> self applyCommandResult ] in CmdCommandActivator>>executeCommand in Block: [ 
>> self prepareCommandForExecution
>> BlockClosure>>on:do:
>> CmdCommandActivator>>executeCommand
>> [ | selArgCount |
>> "show cursor in case item opens a new MVC window"
>> (selArgCount := selector numArgs) = 0
>> ifTrue: [ target perform: selector ]
>> ifFalse: [ selArgCount = arguments size
>> ifTrue: [ target perform: selector withArguments: arguments ]
>> ifFalse: [ target perform: selector withArguments: (arguments copyWith: evt) 
>> ] ].
>> self showShortcut.
>> self changed ] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in 
>> Block: [ | selArgCount |...
>> BlockClosure>>ensure:
>> CursorWithMask(Cursor)>>showWhile:
>> ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
>> ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
>> ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
>> MouseButtonEvent>>sentTo:
>> ToggleMenuItemMorph(Morph)>>handleEvent:
>> MorphicEventDispatcher>>dispatchDefault:with:
>> MorphicEventDispatcher>>handleMouseUp:
>> MouseButtonEvent>>sentTo:
>> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
>> Block: [ ^ anEvent sentTo: self ]
>> BlockClosure>>ensure:
>> MorphicEventDispatcher>>dispatchEvent:with:
>> ToggleMenuItemMorph(Morph)>>processEvent:using:
>> MorphicEventDispatcher>>dispatchDefault:with:
>> MorphicEventDispatcher>>handleMouseUp:
>> MouseButtonEvent>>sentTo:
>> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
>> Block: [ ^ anEvent sentTo: self ]
>> BlockClosure>>ensure:
>> MorphicEventDispatcher>>dispatchEvent:with:
>> MenuMorph(Morph)>>processEvent:using:
>> MenuMorph(Morph)>>processEvent:
>> MenuMorph>>handleFocusEvent:
>> [ ActiveHand := self.
>> ActiveEvent := anEvent.
>> result := focusHolder
>> handleFocusEvent: (anEvent transformedBy: (focusHolder transformedFrom: 

Re: [Pharo-users] Pharo 7 crashes on OSX when unsuspending laptop?

2019-02-12 Thread Cyril Ferlicot
Hi,

Related issue: https://github.com/pharo-project/pharo/issues/2422

On Tue, Feb 12, 2019 at 12:55 PM Tim Mackinnon  wrote:
>
> I think I read someone else commenting on this, but I can’t find where I read 
> it - but two days in a row now, I’ve had a fresh Pharo 7 image - downloaded 
> with zero sonf and launched from terminal that has crashed with a segfault. 
> I’ve essentially unsuspended my laptop and and then cmd-tabbed to that image 
> to find the apple report tool.
>
> The terminal output looks interesting as it actually seems that the image 
> crashed overnight (2am) when my laptop was closed - I’ve shown some terminal 
> info further back where I remember doing some work (ClyExercismSubmitCommand 
> was a class I was working on before I suspended my laptop). I also show the 
> apple report tool below it.
>
> Any thoughts - or should I just put this into the bug tracker?
>
> Tim
>
> Terminal output:
>
> CmdCommandActivator>>executeCommand
> [ | selArgCount |
> "show cursor in case item opens a new MVC window"
> (selArgCount := selector numArgs) = 0
> ifTrue: [ target perform: selector ]
> ifFalse: [ selArgCount = arguments size
> ifTrue: [ target perform: selector withArguments: arguments ]
> ifFalse: [ target perform: selector withArguments: (arguments copyWith: evt) 
> ] ].
> self showShortcut.
> self changed ] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in 
> Block: [ | selArgCount |...
> BlockClosure>>ensure:
> CursorWithMask(Cursor)>>showWhile:
> ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
> ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
> ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
> MouseButtonEvent>>sentTo:
> ToggleMenuItemMorph(Morph)>>handleEvent:
> MorphicEventDispatcher>>dispatchDefault:with:
> MorphicEventDispatcher>>handleMouseUp:
> MouseButtonEvent>>sentTo:
> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
> Block: [ ^ anEvent sentTo: self ]
> BlockClosure>>ensure:
> MorphicEventDispatcher>>dispatchEvent:with:
> ToggleMenuItemMorph(Morph)>>processEvent:using:
> MorphicEventDispatcher>>dispatchDefault:with:
> MorphicEventDispatcher>>handleMouseUp:
> MouseButtonEvent>>sentTo:
> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
> Block: [ ^ anEvent sentTo: self ]
> BlockClosure>>ensure:
> MorphicEventDispatcher>>dispatchEvent:with:
> MenuMorph(Morph)>>processEvent:using:
> MenuMorph(Morph)>>processEvent:
> MenuMorph>>handleFocusEvent:
> Break
> ClyExercismSubmitCommand>>execute
> ClyPackageContextOfFullBrowser(ClySystemBrowserContext)>>executeCommand:by:
> [ self prepareCommandForExecution.
> context executeCommand: command by: self.
> self applyCommandResult ] in CmdCommandActivator>>executeCommand in Block: [ 
> self prepareCommandForExecution
> BlockClosure>>on:do:
> CmdCommandActivator>>executeCommand
> [ | selArgCount |
> "show cursor in case item opens a new MVC window"
> (selArgCount := selector numArgs) = 0
> ifTrue: [ target perform: selector ]
> ifFalse: [ selArgCount = arguments size
> ifTrue: [ target perform: selector withArguments: arguments ]
> ifFalse: [ target perform: selector withArguments: (arguments copyWith: evt) 
> ] ].
> self showShortcut.
> self changed ] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in 
> Block: [ | selArgCount |...
> BlockClosure>>ensure:
> CursorWithMask(Cursor)>>showWhile:
> ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
> ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
> ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
> MouseButtonEvent>>sentTo:
> ToggleMenuItemMorph(Morph)>>handleEvent:
> MorphicEventDispatcher>>dispatchDefault:with:
> MorphicEventDispatcher>>handleMouseUp:
> MouseButtonEvent>>sentTo:
> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
> Block: [ ^ anEvent sentTo: self ]
> BlockClosure>>ensure:
> MorphicEventDispatcher>>dispatchEvent:with:
> ToggleMenuItemMorph(Morph)>>processEvent:using:
> MorphicEventDispatcher>>dispatchDefault:with:
> MorphicEventDispatcher>>handleMouseUp:
> MouseButtonEvent>>sentTo:
> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in 
> Block: [ ^ anEvent sentTo: self ]
> BlockClosure>>ensure:
> MorphicEventDispatcher>>dispatchEvent:with:
> MenuMorph(Morph)>>processEvent:using:
> MenuMorph(Morph)>>processEvent:
> MenuMorph>>handleFocusEvent:
> [ ActiveHand := self.
> ActiveEvent := anEvent.
> result := focusHolder
> handleFocusEvent: (anEvent transformedBy: (focusHolder transformedFrom: 
> self)) ] in HandMorph>>sendFocusEvent:to:clear: in Block: [ ActiveHand := 
> self
> Pharo(64915,0xa983a1c0) malloc: *** mach_vm_map(size=8388608) failed (error 
> code=3)
> *** error: can't allocate region securely
> *** set a breakpoint in malloc_error_break to debug
> Pharo(64915,0xa983a1c0) malloc: *** mach_vm_map(size=8388608) failed (error 
> code=3)
> *** error: can't allocate region securely
> *** set a breakpoint in malloc_error_break to debug

Re: [Pharo-users] Pharo 7 crashes on OSX when unsuspending laptop?

2019-02-12 Thread Sven Van Caekenberghe
Me too, but les frequent nowadays

> On 12 Feb 2019, at 13:39, Esteban Lorenzano  wrote:
> 
> Yes, I have suffered that time to time :(
> 
> Esteban
> 
>> On 12 Feb 2019, at 13:00, Tim Mackinnon  wrote:
>> 
>> Interestingly - I went further back in my terminal output and have found the 
>> crash from the day before - it looks quite similar:
>> 
>> E.g.
>> 
>> Processor yield.
>> false ] whileFalse: [  ] ] in MorphicUIManager>>spawnNewProcess in Block: [ 
>> [ WorldMorph doOneCycle
>> [ self value.
>> Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self 
>> value
>> Pharo(61383,0xa983a1c0) malloc: *** mach_vm_map(size=8388608) failed (error 
>> code=3)
>> *** error: can't allocate region securely
>> *** set a breakpoint in malloc_error_break to debug
>> 
>> Segmentation fault Mon Feb 11 13:00:11 2019
>> 
>> 
>> VM: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
>> Date: Sat Jan 5 20:00:11 2019 CommitHash: 7a3c6b6
>> Plugins: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
>> 
>> C stack backtrace & registers:
>> 
>> 
>> 
>> This is the fuller terminal output :
>> 
>> 
>> 
>> Array(Collection)>>detect:ifNone:
>> [ :aSpec | 
>> | description repo |
>> description := aSpec description.
>> (repo := repositories
>>  detect: [ :rep | rep description = description ]
>>  ifNone: [ aSpec createRepository ]) ~~ nil
>>  ifTrue: [ repos add: repo ] ] in 
>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>repositoriesFrom:ignoreOverrides:
>>  in Block: [ :aSpec | ...
>> Array(SequenceableCollection)>>do:
>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>repositoriesFrom:ignoreOverrides:
>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>repositoriesFrom:
>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>resolvePackageSpecReferences:gofer:
>> [ self resolvePackageSpecReferences: packageSpec gofer: gofer ] in 
>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>  in Block: [ self resolvePackageSpecReferences: packageSpec g...etc...
>> BlockClosure>>on:do:
>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>> [ | references nearestReference cachedReference externalReference mcVersion 
>> loadedVersionInfos |
>> cachedReference := nil.
>> packageSpec
>>  searchCacheRepositoryForPackage: [ "check to see if mcz file is already 
>> in cacheRepository"
>>  cachedReference := self
>>  resolvePackageSpec: packageSpec
>>  cachedGofer: self loaderPolicy cacheGofer.
>>  (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ])
>>  ifTrue: [ cachedReference name = packageSpec file
>>  ifTrue:
>>  [ "exact match between 
>> packageSpec file and cache" ^ self scheduleFetchFor: packageSpec 
>> cachedReference: cachedReference ] ] ].
>> references := self
>>  retryingResolvePackageSpecReferences: packageSpec
>>  gofer: gofer.   "look up mcz file"
>> nearestReference := references last
>>  asMetacelloCachingResolvedReference.
>> (cachedReference ~~ nil
>>  and: [ cachedReference name = nearestReference name ])
>>  ifTrue: [ "latest reference in repository matches cachedReference ... "
>>  ^ self
>>  scheduleFetchFor: packageSpec
>>  nearestReference: nearestReference ].
>> (self ignoreImage not
>>  and: [ (loadedVersionInfos := self ancestorsFor: packageSpec) ~~ nil ])
>>  ifTrue: [ "If the mcz is already loaded into the image, no need to copy"
>>  loadedVersionInfos
>>  do: [ :info | 
>>  info name = nearestReference name
>>  ifTrue: [ | spc |
>>  spc := packageSpec copy.
>>  spc file: info name.
>>  (MetacelloIgnorePackageLoaded 
>> signal: spc)
>>  ifFalse: [ ^ self ] ] ] 
>> ].
>> externalReference := (references
>>  select: [ :ref | ref name = nearestReference name ]) first
>>  asMetacelloCachingResolvedReference.
>> self repositoryMap
>>  at: externalReference name
>>  put: externalReference repository.
>> (self
>>  resolveDependencies: externalReference
>>  nearest: nearestReference
>>  into: (OrderedCollection with: nearestReference))
>>  do: [ :reference | 
>>  | pSpec l |
>>  mcVersion := reference version.
>>  (l := (GoferVersionReference name: reference name)
>>  resolveAllWith: self loaderPolicy cacheGofer) isEmpty
>>  ifTrue: [ self cacheRepository 

Re: [Pharo-users] Loading TelePharo on Pharo 7

2019-02-12 Thread Denis Kudriashov
Following script will load TelePharo without error:

Metacello new
  baseline: 'TelePharo';
  repository: 'github://pharo-ide/TelePharo';
  onUpgrade: [:ex | ex useIncoming];
  onConflictUseIncoming;
  load.



пн, 11 февр. 2019 г. в 09:11, Denis Kudriashov :

> Hi Serge.
>
> You need to add option to metacello script onConflict: or onUpgrade: with
> block [:warn | warn useIncoming].
> I do not have computer now to give you exact code.
>
> Problem that telepharo depends on old version of Calypso but image
> includes the latest one. It needs to be fixed. I will look at it.
>
> And we should fix install scripts in readme page. It still references my
> repo but it was moved to pharo-ide org
>
> 9 февр. 2019 г. 8:05 PM пользователь "sergio ruiz" 
> написал:
>
> Hi, all..
>
> I am looking to install TelePharo on my 7.01 image using the setup found
> at :
>
> https://github.com/pharo-ide/TelePharo
>
> like
>
> Metacello new
>   baseline: 'TelePharo';
>   repository: 'github://dionisiydk/TelePharo';
>   load: 'Server’.
>
> and running into the following error. Any ideas?
>
> Thanks!
>
> MetacelloAllowConflictingProjectUpgrade>>defaultAction
> UndefinedObject>>handleSignal:
> Context>>handleSignal:
> Context>>handleSignal:
> MetacelloAllowConflictingProjectUpgrade(Exception)>>pass
> [ ^ exception pass ] in MetacelloScriptEngine>>handleConflict: in Block: [ ^ 
> exception pass ]
> Dictionary>>at:ifAbsent:
> MetacelloScriptEngine>>handleConflict:
> MetacelloAllowConflictingProjectUpgrade>>handleResolutionFor:
> [ :ex | "option handlers need to be outermost set of handlers ... last line 
> of defense before users are involved" ex handleResolutionFor: self ] in [ [ 
> actionBlock
> on:
> MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
> , MetacelloProjectSpecLoadedNotification
> , MetacelloScriptEnsureProjectLoadedForDevelopment
> , MetacelloLookupBaselineSpecForEnsureLoad
> do:
> [ :ex | "lookup and registration handlers need to be innermost set of 
> handlers ...they may throw option notifications" ex handleResolutionFor: self 
> ] ]
> on:
> MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
> , MetacelloAllowConflictingProjectUpgrade
> do:
> [ :ex | "option handlers need to be outermost set of handlers ... 
> last line of defense before users are involved" ex handleResolutionFor: self 
> ] ] in [ [ [ actionBlock
> on:
> MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
> , MetacelloProjectSpecLoadedNotification
> , MetacelloScriptEnsureProjectLoadedForDevelopment
> , MetacelloLookupBaselineSpecForEnsureLoad
> do:
> [ :ex | "lookup and registration handlers need to be innermost set of 
> handlers ...they may throw option notifications" ex handleResolutionFor: self 
> ] ]
> on:
> MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
> , MetacelloAllowConflictingProjectUpgrade
> do:
> [ :ex | "option handlers need to be outermost set of handlers ... 
> last line of defense before users are involved" ex handleResolutionFor: self 
> ] ]
> on: MetacelloAllowLockedProjectChange
> do:
> [ :ex | "MetacelloAllowLockedProjectChange need to be outermost 
> handler ... since it is signaled from second line of handlers" ex 
> handleResolutionFor: self ] ] in 
> MetacelloScriptEngine>>handleNotificationsForAction: in Block: [ :ex | 
> "option handlers need to be outermost set ...etc...
> BlockClosure>>cull:
> Context>>evaluateSignal:
> Context>>handleSignal:
> MetacelloAllowConflictingProjectUpgrade(Exception)>>signal
> [ :existing :new |
> (existing hasLoadConflicts: new)
> ifTrue: [ ((existing canUpgradeTo: new)
> ifTrue: [ MetacelloAllowProjectUpgrade new ]
> ifFalse: [ (existing canDowngradeTo: new)
> ifTrue: [ MetacelloAllowProjectDowngrade new ]
> ifFalse: [ MetacelloAllowConflictingProjectUpgrade new ] 
> ])
> existingProjectRegistration: existing;
> newProjectRegistration: new;
> signal ]
> ifFalse: [ new ] ] in MetacelloScriptEngine>>lookupProjectSpecFor: in 
> Block: [ :existing :new | ...
> [ :existing | ^ presentBlock value: existing value: newRegistration ] in 
> MetacelloProjectRegistration 
> class>>registrationForProjectSpec:ifAbsent:ifPresent: in Block: [ :existing | 
> ^ presentBlock value: existing value...etc...
> [ :existing | ^ presentBlock value: existing ] in 
> MetacelloProjectRegistry>>registrationFor:ifPresent:ifAbsent: in Block: [ 
> :existing | ^ presentBlock value: existing ]
> BlockClosure>>cull:
> Dictionary>>at:ifPresent:
> MetacelloProjectRegistry>>registrationFor:ifPresent:ifAbsent:
> MetacelloProjectRegistration 
> class>>registrationForProjectSpec:ifAbsent:ifPresent:
> MetacelloScriptEngine>>lookupProjectSpecFor:
>