tonel how to

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

tonel how to

HilaireFernandes
Hi,

How can I use tonel to load code located in the host filesystem?

Thanks

Hilaire

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



Reply | Threaded
Open this post in threaded view
|

Re: tonel how to

Juraj Kubelka
Hi Hilaire,

I have been playing with it recently. There is my exercise: 
myClass := MyDemo.
myClassName := MyDemo name.
snapshot := (MCPackage new name: myClass package name) snapshot.
memory := FileSystem memory. 
writer := TonelWriter on: memory root.
writer writeSnapshot: snapshot.
"Remove package"
myClass package removeFromSystem.
"Find myClass file"
classDefinition := snapshot definitions 
    detect: [ :e | e isClassDefinition and: [ 
            e className = myClassName ] ].
dir := writer packageDir.
fileName := writer fileNameFor: classDefinition.
(dir / fileName) contents.
"Read and Install definitions"
reader := writer class readerClass on: memory root.
reader packageDirectory: dir basename.
reader loadDefinitions.
reader snapshot install.

Maybe it is what you are asking for. 

Cheers,
Juraj




On Nov 30, 2017, at 15:36, Hilaire <[hidden email]> wrote:

Hi,

How can I use tonel to load code located in the host filesystem?

Thanks

Hilaire

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




Reply | Threaded
Open this post in threaded view
|

Re: tonel how to

Peter Uhnák
Hi,

Iceberg will autodetect the format, or you can use monticello with "tonel://" scheme (in P61 you will need newest iirc metacello).

If you want to convert a repo (or create a separate repo in tonel format so you can try it out), I have a migration tool https://github.com/peteruhnak/tonel-migration

On Thu, Nov 30, 2017 at 9:22 PM, Juraj Kubelka <[hidden email]> wrote:
Hi Hilaire,

I have been playing with it recently. There is my exercise: 
myClass := MyDemo.
myClassName := MyDemo name.
snapshot := (MCPackage new name: myClass package name) snapshot.
memory := FileSystem memory. 
writer := TonelWriter on: memory root.
writer writeSnapshot: snapshot.
"Remove package"
myClass package removeFromSystem.
"Find myClass file"
classDefinition := snapshot definitions 
    detect: [ :e | e isClassDefinition and: [ 
            e className = myClassName ] ].
dir := writer packageDir.
fileName := writer fileNameFor: classDefinition.
(dir / fileName) contents.
"Read and Install definitions"
reader := writer class readerClass on: memory root.
reader packageDirectory: dir basename.
reader loadDefinitions.
reader snapshot install.

Maybe it is what you are asking for. 

Cheers,
Juraj




On Nov 30, 2017, at 15:36, Hilaire <[hidden email]> wrote:

Hi,

How can I use tonel to load code located in the host filesystem?

Thanks

Hilaire

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





Reply | Threaded
Open this post in threaded view
|

Re: tonel how to

HilaireFernandes
I am using P7.

I already have a tonel export done[1], I need to find what is the magic
to use with monticello or metacello to load the code from a local repo
in tonel format

Hilaire


[1]
http://bazaar.launchpad.net/~drgeo-developers/drgeo/trunk/files/head:/src/


Le 01/12/2017 à 09:36, Peter Uhnák a écrit :
> Hi,
>
> Iceberg will autodetect the format, or you can use monticello with
> "tonel://" scheme (in P61 you will need newest iirc metacello).
>
> If you want to convert a repo (or create a separate repo in tonel
> format so you can try it out), I have a migration tool
> https://github.com/peteruhnak/tonel-migration
>

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



Reply | Threaded
Open this post in threaded view
|

Re: tonel how to

Sean P. DeNigris
Administrator
In reply to this post by Peter Uhnák
Peter Uhnák wrote
> Iceberg will autodetect the format, or you can use monticello with
> "tonel://" scheme (in P61 you will need newest iirc metacello).

What about in a BaselineOf? I've been discussing with Dale on the MetaC list
[1] a problem I've been having with git dependencies. On my development
machine, there are already local clones for all the projects I commonly work
with. This makes it relatively easy to put filetree:// urls for dependency
baseline repos. I don't use github:// style URLs because a) many of the
repos are private and accessed via SSH keys, which MetaC did not seem to
honor, and b) many are hosted on bitbucket and gitlab which at the time did
not seem to be well supported by MetaC. However, after setting up CI on
Gitlab for some projects, I quickly ran into the problem that the local
clones of the dependencies did not already exist. A workaround was to
manually clone them first, but this is tedious and fragile. I imagined maybe
using gitlab:// URLs which would always fail (because they are private
repos), which I could then wrap in an error handler that used e.g. OSP to
clone and retry. Does anyone have a good solution for this?

1.
http://forum.world.st/Bitbucket-Private-Repos-Redux-td4966412.html#a4995200



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

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: tonel how to

HilaireFernandes
In reply to this post by HilaireFernandes
ok, I got it to work with gofer:

Gofer new
     url: 'tonel:///home/hilaire/Travaux/Developpement/DrGeoII/trunk/src';
     package: 'ConfigurationOfDrGeo';
     load.

Le 01/12/2017 à 18:07, Hilaire a écrit :
> I am using P7.
>
> I already have a tonel export done[1], I need to find what is the
> magic to use with monticello or metacello to load the code from a
> local repo in tonel format
>
> Hilaire

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



Reply | Threaded
Open this post in threaded view
|

Re: tonel how to

Sean P. DeNigris
Administrator
In reply to this post by Peter Uhnák
Peter Uhnák wrote
> or you can use monticello with
> "tonel://" scheme (in P61 you will need newest iirc metacello).

Hmm. IMHO these implementation-revealing url schemes stink. IIRC there is a
gitlocal:// in some contexts. This seems a little better. Can't we
autodetect the format instead of having to change every URL each time the
format changes?



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

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: tonel how to

EstebanLM


> On 2 Dec 2017, at 20:24, Sean P. DeNigris <[hidden email]> wrote:
>
> Peter Uhnák wrote
>> or you can use monticello with
>> "tonel://" scheme (in P61 you will need newest iirc metacello).
>
> Hmm. IMHO these implementation-revealing url schemes stink. IIRC there is a
> gitlocal:// in some contexts. This seems a little better. Can't we
> autodetect the format instead of having to change every URL each time the
> format changes?

iceberg autodetect formats (hence the gitlocal stuff).
but others can’t, so there is the reason why along with ‘gitlocal’ there is a “format-revealing” url.
(btw, http and others are also “revealing”) :)

Esteban


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