Hi Guile,

Le 18/02/2017 à 13:20, Guillermo Polito a écrit :
We could try that... The thing is that it contains definitions of a
Smalltalk kernel, so there are alternative Boolean classes, String
classes, and so on... We would like to avoid conflicts in the image.

the API of FileTree is tied to the Monticello model of smalltalk code (and the api of Monticello repositories).

The MC model of code is of interest to you because it is completely decoupled from the code running in the image. It is just a bunch of objects, instances of MCMethodDefinition, MCClass... etc... regrouped in a MCVersion. What is saved, loaded and manipulated by a FileTree repository is that structure. The use is fairly clean: save a version (or a set of versions... with gitfiletree only) along with the dependencies; iterate over the contents of the MCVersion and write files / create directories.

Reading with FileTree is the same process: read the directories / files and recreate the MCVersion.

Now, reimplementing this gives you two strategies: look into MCFileTreeStCypressWriter to see the core methods (the ones writing the files out of the MCVersion items, such as #writeClassDefinition:to:). This is not much code, but it seems more complex than it is really because there is a lot of delegation going on and the upper Monticello repository and writer classes are not abstract enough for FileTree.

Regards,

Thierry

On Sat, Feb 18, 2017 at 1:17 PM, <[email protected]
<mailto:[email protected]>> wrote:

    I don't understand because you can load your project in a Pharo
    image and save it as with FileTree.

    Envoyé de mon iPhone

    Le 18 févr. 2017 à 13:09, Guillermo Polito
    <[email protected] <mailto:[email protected]>> a écrit :

    Hi Serge,

    Jonathan is trying to convert some old code I have in here:

    https://github.com/guillep/PharoCandle
    <https://github.com/guillep/PharoCandle>

    to Filtree.

    The thing is that at that moment I started that, FileTree was not
    there, So I made my own format and my own parser based and
    PetitParser and the Smalltalk petit parser that produced my own
    little meta-model :P.

    But now we want to move to the standard tools of today.

    What we would like to know is what should we use to write FileTree
    from something that is not Monticello, what is the class to look
    at, and the API to use.

    ANY information is welcome :)

    Thanks,
    Guille

    On Fri, Feb 17, 2017 at 5:22 PM, Jonathan Khalil <[email protected]
    <mailto:[email protected]>> wrote:

        Oh really ? My school is Ecole Supérieur Polytechnique (ESP).

        I want to rewrite the pharoCandle in the FileTree format but i
        don't know where to start.

        Jonathan

        2017-02-17 16:37 GMT+01:00 Serge Stinckwich
        <[email protected] <mailto:[email protected]>>:

            On Fri, Feb 17, 2017 at 3:06 PM, Jonathan Khalil
            <[email protected] <mailto:[email protected]>> wrote:
            > Hi everyone,
            >
            > I'm Jonathan, student in master, from Dakar, Sénégal and i will 
be working
            > with stephane ducasse's team for my internship.

            Great Jonathan. Where are you located ? My research team
            is working in
            Senegal in Dakar and St-Louis.

            > I need some lectures on FileTree.
            > Someone know how can i get it ?

            What kind of information you are looking for FileTree ?
            I'm not sure that there is that much information about it
            except the code :-)

            https://github.com/dalehenrich/filetree
            <https://github.com/dalehenrich/filetree>

            Regards,
            --
            Serge Stinckwich
            UCBN & UMI UMMISCO 209 (IRD/UPMC)
            Every DSL ends up being Smalltalk
            http://www.doesnotunderstand.org/
            <http://www.doesnotunderstand.org/>






Reply via email to