Good question... and one I'm entirely unqualified to answer!

...Edward?

-->Jake

On 8/18/2015 9:35 PM, David McNab wrote:
How does @clean handle it when a teammate does a major restructure of a module? For example, refactors a Python class into a base, a derived plus a mixin, and moves 4 global functions into the base class as methods, and moves 3 methods of the class out into functions?

(Just asking)

On 19 August 2015 at 09:13, Edward K. Ream <[email protected] <mailto:[email protected]>> wrote:

    On Tue, Aug 18, 2015 at 2:59 PM, David McNab
    <[email protected] <mailto:[email protected]>> wrote:

        Hi Ed, thanks for your detailed response.


    ​You're welcome.
    ​

        I got a bit of a rude shock a year ago when I took my present
        development role. At first, I imported one of my job's
        codebases into a Leo tree, with aim of continuing with Leo as
        my editor of choice. But I saw that this would be unworkable,
        since my teammates would crucify me for "polluting" the files
        with Leo sentinels, whilst any changes made by others would be
        difficult to reflect in the Leo view without removing then
        reimporting the file.


    ​Have you tried using @clean?

        With Python code, it's not such an issue, since Leo is
        generally quite good at carving up Python sources into a
        simple module/class/method hierarchy. The difficulty comes
        with file types that are hard to carve up automatically AND
        meaningfully, such as javascript, html templates, css and so on.


    ​@clean doesn't use importers.  You (or @auto) "carve up" the file
    as you like initially, and from then on @clean pretty much "just
    works".

    Yes, a better importer for javascript (if that is possible) would
    be great.  There already is an html importer, with an @data node
    describing which html elements you want to create new nodes.​  A
    css importer seems less useful, because css lacks structure, but I
    could be mistaken.

    In other words, get the code into Leo with @auto, and then change
    @auto to @clean.  Or just use the recursive import script in
    scripts.leo.

        For write-only applications (ie, single-developer projects),
        Leo is on numerous fronts the tool of choice. But in scenarios
        where Leo needs to accommodate changes made by non-Leo users,
        people who won't accept Leo sentinels, and who reject literate
        programming, there's a struggle. This is a non-trivial issue,
        that does not reflect on Leo, but rather reflects on team
        development culture.


    ​This used to be true, before @clean, but now, with @clean, I
    think you should be able to use Leo in a completely invisible way
    as far as your teammates are concerned.  The only problem is for
    /you/: if you reload a file changed outside of Leo (by a teammate)
    you may want to move changed lines from the end of one node​
    ​(the default) to the start of the next node.  See this discussion
    <http://leoeditor.com/appendices.html#the-mulder-ream-update-algorithm>,
    and especially the section called "Guesses don't matter".


        I would love nothing more than to be able to edit the
        company's 80,000+ lines of source in Leo, while still being
        able to work in with my teammates, and would welcome any
        suggestions.


    ​@clean is the reason I think that Leo is now, at long last,
    essentially complete.

    Edward
-- You received this message because you are subscribed to the Google
    Groups "leo-editor" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected]
    <mailto:[email protected]>.
    To post to this group, send email to [email protected]
    <mailto:[email protected]>.
    Visit this group at http://groups.google.com/group/leo-editor.
    For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to