[squeak-dev] Git and Tonel (and Magritte)

Eliot Miranda eliot.miranda at gmail.com
Thu Aug 27 00:53:19 UTC 2020

Hi Dale, Hi Martin, Hi All,

    find attached changes that allow Tonel to *optionally* support method
timestamps.  This code formats the category metadata included in a Tonel
source file on the same line as a method timestamp, making for something
less verbose and IMO more attractive.  An example of the format is this:

{ #category : #resources, #timeStamp : 'ThierryGoubier 3\/2\/2018 19:24:09'

MCGitTonelTests class >> gitCreateAndInitRepo: dir [
    #(#('init') #('config' 'user.email' 'you at example.com') #('config' '
user.name' 'Your Name'))
        do: [ :c | MCTonelGitRepository runGitCommand: c in: dir ]

I tried to get Esteban to accept these changes *as an option controlled by
a preference*, so that Pharo would not have to change its format at all.
But when I tried to discuss it with him in mid 2018 and again in early 2019
I was simply rebuffed.  Esteban kept on mentioning merge conflicts when
- if Pharo has the preference disabled it will not produce the metadata and
hence will not suffer merge conflicts
- a merge conflict would only be experienced had a method actually changed
twice independently
Since method timestamps (when correctly implemented) only change when a
method actually changes (and a smart system can undo inadvertent changes)
Esteban's objection is a straw man.

Squeak introduced method timestamps and some of us like them (me very much)
as a very convenient way to stamp methods.  Any source standard hoping to
be widely adopted must be flexible enough to encompass important use cases
of the various dialects.

On Wed, Aug 26, 2020 at 9:41 AM Dale Henrichs <
dale.henrichs at gemtalksystems.com> wrote:

> Eliot,
> When you repost, could you make sure that you include a description of
> where the time stamps are stashed ... I'm assuming that you are adding
> it to the method properties (where the category is stashed) as I think
> that this is the right place, but it's always best not to guess:)
> The current crop of Tonel readers/writers do not necessarily do a good
> job of preserving, foreign data (IIRC, the convention is to add a
> platform prefix to the property name, which is the same convention used
> for class properties ... at GemStone we add a leading `gs_` to our
> property names), so until we can get all of the different Tonel
> readers/writers to preserve foreign properties (package, class and
> method) it will continue to be dicey business for preserving foreign
> properties in cross platform projects ...
> Monticello does not explicitly preserve foreign properties as the
> definitions get created from the native objects, so it takes some
> additional work to arrange to preserve foreign properties for packages,
> classes, and methods in the objects themselves. So it is worth
> considering what you will do with preserving foreign properties from
> other platforms.
> FWIW, I intend to support the preservation of foreign properties in
> Rowan (read that as "I haven't done that yet":)
> Finally, Martin McClure has started working on a spec for the next
> generation Tonel format ... to add a few missing pieces and tweak the
> format to make it possible to continue to evolve the Tonel format into
> the future in a somewhat sane way. If there are folks here in the Squeak
> community who would like to review, comment and participate in the
> creation of the next generation format, send me (or Martin) mail and
> we'll get you added to the mailing list.
> Dale
> On 8/26/20 7:15 AM, Eliot Miranda wrote:
> > Jakob,
> >
> >> On Aug 26, 2020, at 2:45 AM, Jakob Reschke <forums.jakob at resfarm.de>
> wrote:
> >>
> >> Hi Eliot,
> >>
> >>> Am Mi., 26. Aug. 2020 um 11:20 Uhr schrieb Eliot Miranda
> >>> <eliot.miranda at gmail.com>:
> >>>
> >>> If we go with Tonel then we must change it to support method
> timestamps.  I have a change set that does this (it is a trivial change).
> And my changes are controlled by a class variable so that the same code can
> produce Pharo format or a slightly modified format that includes method
> timestamps.
> >>>
> >>> What I don’t understand is why Esteban Lorenzano refuses to accept my
> changes and allow Tonel to be used either with or without method timestamps.
> >>>
> >> Method timestamps produce merge conflicts inevitably.
> > a) only when they change, and they change only when methods change
> > b) inadvertent method timestamp changes can be undone automatically
> > c) Squeak uses method timestamps; we have lots of tools that use them.
> Dropping them just so that we can use Tonel is an example of the tail
> wagging the dog. The Tonel interface must instead be made to function with
> method timestamps
> >
> > If there is a decision not to support method timestamps then I will not
> support the work. This is a make or break issue for me.
> >
> >> Can you re-post
> >> your changeset here?
> > I’ll post it later today (reading email in bed right now).
> >
> >> https://github.com/squeak-smalltalk/squeak-tonel/issues
> > OK
> >
> >> Then we could
> >> discuss whether to include it at least in the Squeak version. As we
> >> have heard from Mariano some time ago, VA Smalltalk also puts its
> >> dialect-specific metadata in the Tonel format, so Squeak would not be
> >> the first to do so.
> > Good.
> >
> >> Kind regards,
> >> Jakob

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200826/e5125fef/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TonelMethodTimestamps.st
Type: application/octet-stream
Size: 4035 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200826/e5125fef/attachment.obj>

More information about the Squeak-dev mailing list