Installing Metacello baseline for Pharo in Squeak? (NeoJSON)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing Metacello baseline for Pharo in Squeak? (NeoJSON)

Christoph Thiede

Hello list,


not sure if this is possible at all or if I am making a stupid error: I always had assumed that FileTree is a kind of mediator between Smalltalk code objects and file systems, so shouldn't it be possible to load code from a Pharo code structure (SomeClass.class.st files) into a Squeak code structure (SomeClass.class/someSelector.st) via Metacello?


Here is my concrete example: I would like to install NeoJSON in Squeak, which apparently was written for Pharo. So I did this (in a fresh image)


Metacello new
  repository: 'github://svenvc/NeoJSON/repository';
  baseline: 'NeoJSON';
  load.

... but unfortunately, this gives me a MetacelloPackageSpecResolutionError:




So this might be a general question: Did I misunderstood the mediator concept of FileTree or is there some specific error in either Metacello or this repo's configuration?

Some explanations would be highly welcome!


(PS: Not sure if I chose the right list for this question. If this should have gone to the Beginners list instead, please tell me and I will resend.)


Best,

Christoph



Reply | Threaded
Open this post in threaded view
|

Re: Installing Metacello baseline for Pharo in Squeak? (NeoJSON)

Levente Uzonyi
Hi Christoph,

On Mon, 10 Feb 2020, Thiede, Christoph wrote:

>
> Hello list,
>
>
> not sure if this is possible at all or if I am making a stupid error: I always had assumed that FileTree is a kind of mediator between Smalltalk
> code objects and file systems, so shouldn't it be possible to load code from a Pharo code structure (SomeClass.class.st files) into a Squeak code
> structure (SomeClass.class/someSelector.st) via Metacello?
>
>
> Here is my concrete example: I would like to install NeoJSON in Squeak, which apparently was written for Pharo. So I did this (in a fresh image)
>
>
> Metacello new
>   repository: 'github://svenvc/NeoJSON/repository';
>   baseline: 'NeoJSON';
>   load.
>
> ... but unfortunately, this gives me a MetacelloPackageSpecResolutionError:
>
>
> [IMAGE]
>
>
> So this might be a general question: Did I misunderstood the mediator concept of FileTree or is there some specific error in either Metacello or
> this repo's configuration?
>
> Some explanations would be highly welcome!
NeoJSON is for Pharo. Pharo migrated to Tonel, so NeoJSON uses Tonel.
AFAIK no one has written Tonel support for Squeak. But even if there were
Tonel support, NeoJSON probably has incompatibilities with Squeak, so
you'll have to port it.
If you need to process JSON files, I suggest using the Json package.
If you specifically need NeoJSON, you can either use an earlier commit
of NeoJSON which is still in FileTree format, or just file out the code
from a Pharo image.

Levente

>
>
> (PS: Not sure if I chose the right list for this question. If this should have gone to the Beginners list instead, please tell me and I will
> resend.)
>
>
> Best,
>
> Christoph
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Installing Metacello baseline for Pharo in Squeak? (NeoJSON)

Christoph Thiede

Hi Levente,


If you need to process JSON files, I suggest using the Json package.


I came across the OpenAPI implementation for Pharo and wanted to try it out, but it depends on NeoJSON.


If you specifically need NeoJSON, you can either use an earlier commit of NeoJSON which is still in FileTree format, or just file out the code from a Pharo image.


Good idea! I managed to load NeoJSON with this URL: 'github://svenvc/NeoJSON:ff1c22775182547af801cdfc286b3f33e8286475/repository'
Unfortunately, I cannot stop Metacello from attempting to load the master when installing OpenAPI, so this is failing still ...
I only wanted to have a quick look at it. Now I ended up experimenting a bit with Pharo. Sigh, why can't they be more compatible ...

Thanks for your help! :-)
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Levente Uzonyi <[hidden email]>
Gesendet: Montag, 10. Februar 2020 22:35:02
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Installing Metacello baseline for Pharo in Squeak? (NeoJSON)
 
Hi Christoph,

On Mon, 10 Feb 2020, Thiede, Christoph wrote:

>
> Hello list,
>
>
> not sure if this is possible at all or if I am making a stupid error: I always had assumed that FileTree is a kind of mediator between Smalltalk
> code objects and file systems, so shouldn't it be possible to load code from a Pharo code structure (SomeClass.class.st files) into a Squeak code
> structure (SomeClass.class/someSelector.st) via Metacello?
>
>
> Here is my concrete example: I would like to install NeoJSON in Squeak, which apparently was written for Pharo. So I did this (in a fresh image)
>
>
> Metacello new
>   repository: 'github://svenvc/NeoJSON/repository';
>   baseline: 'NeoJSON';
>   load.
>
> ... but unfortunately, this gives me a MetacelloPackageSpecResolutionError:
>
>
> [IMAGE]
>
>
> So this might be a general question: Did I misunderstood the mediator concept of FileTree or is there some specific error in either Metacello or
> this repo's configuration?
>
> Some explanations would be highly welcome!

NeoJSON is for Pharo. Pharo migrated to Tonel, so NeoJSON uses Tonel.
AFAIK no one has written Tonel support for Squeak. But even if there were
Tonel support, NeoJSON probably has incompatibilities with Squeak, so
you'll have to port it.
If you need to process JSON files, I suggest using the Json package.
If you specifically need NeoJSON, you can either use an earlier commit
of NeoJSON which is still in FileTree format, or just file out the code
from a Pharo image.

Levente

>
>
> (PS: Not sure if I chose the right list for this question. If this should have gone to the Beginners list instead, please tell me and I will
> resend.)
>
>
> Best,
>
> Christoph
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Installing Metacello baseline for Pharo in Squeak? (NeoJSON)

Jakob Reschke-2
In reply to this post by Levente Uzonyi
Find the ported basic Tonel I/O here:

You should also be able to use Tonel repositories in Squot. Without method timestamps of course...

But at the moment you cannot load with Metacello. Last year the state was that it assumes all GitHub downloads to be in filetree format. I guess Pharo modified Metacello to address this, so maybe we can copy code from them back to Dale's Metacello repository?



Levente Uzonyi <[hidden email]> schrieb am Mo., 10. Feb. 2020, 22:35:
Hi Christoph,

On Mon, 10 Feb 2020, Thiede, Christoph wrote:

>
> Hello list,
>
>
> not sure if this is possible at all or if I am making a stupid error: I always had assumed that FileTree is a kind of mediator between Smalltalk
> code objects and file systems, so shouldn't it be possible to load code from a Pharo code structure (SomeClass.class.st files) into a Squeak code
> structure (SomeClass.class/someSelector.st) via Metacello?
>
>
> Here is my concrete example: I would like to install NeoJSON in Squeak, which apparently was written for Pharo. So I did this (in a fresh image)
>
>
> Metacello new
>   repository: 'github://svenvc/NeoJSON/repository';
>   baseline: 'NeoJSON';
>   load.
>
> ... but unfortunately, this gives me a MetacelloPackageSpecResolutionError:
>
>
> [IMAGE]
>
>
> So this might be a general question: Did I misunderstood the mediator concept of FileTree or is there some specific error in either Metacello or
> this repo's configuration?
>
> Some explanations would be highly welcome!

NeoJSON is for Pharo. Pharo migrated to Tonel, so NeoJSON uses Tonel.
AFAIK no one has written Tonel support for Squeak. But even if there were
Tonel support, NeoJSON probably has incompatibilities with Squeak, so
you'll have to port it.
If you need to process JSON files, I suggest using the Json package.
If you specifically need NeoJSON, you can either use an earlier commit
of NeoJSON which is still in FileTree format, or just file out the code
from a Pharo image.

Levente

>
>
> (PS: Not sure if I chose the right list for this question. If this should have gone to the Beginners list instead, please tell me and I will
> resend.)
>
>
> Best,
>
> Christoph
>
>
>