Hi, How can I use tonel to load code located in the host filesystem? Thanks Hilaire -- Dr. Geo http://drgeo.eu
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 <hilaire@drgeo.eu> wrote:
Hi,
How can I use tonel to load code located in the host filesystem?
Thanks
Hilaire
-- Dr. Geo http://drgeo.eu
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 <juraj.kubelka@icloud.com> 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 <hilaire@drgeo.eu> wrote:
Hi,
How can I use tonel to load code located in the host filesystem?
Thanks
Hilaire
-- Dr. Geo http://drgeo.eu
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
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
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
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
On 2 Dec 2017, at 20:24, Sean P. DeNigris <sean@clipperadams.com> 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
participants (5)
-
Esteban Lorenzano -
Hilaire -
Juraj Kubelka -
Peter Uhnák -
Sean P. DeNigris