dalehenrich / filetree

Monticello repository for directory-based Monticello packages enabling the use of git, svn, etc. for managing Smalltalk source code.
https://github.com/CampSmalltalk/Cypress
MIT License
133 stars 26 forks source link

Trying to sort out timestamp issues in Squeak (5.3) #228

Closed tcj closed 4 years ago

tcj commented 4 years ago

Hi Dale & co.,

I am looking for ideas as to how to begin diagnosing some timestamp issues in Squeak, targeting the 5.3 release image.

I want to make a small commit to a package in the Grease repo, which is in Cypress format. (Squeak uses FileTree to access Cypress-format repos, yes?)

When using Metacello to load Grease into Squeak, the method timestamps are all set to the time the packages were loaded into the image. It was pointed out to me on squeak-dev that this is because the Grease repo has metadata turned off.

MCModification obsoletion timeStamp = ' 7/30/2020 22:03:37' modification timeStamp = ' 7/30/2020 22:01:38'

Unfortunately, then, when I try to use various Monticello diffing tools, all methods are always listed as being different (by timestamp only). There is the timestamp in the method in the FileTree repo, and there is the timestamp of the method as it was loaded into my image via Metacello, and of course these are different. I think this is "not to be desired." Could there be any fix for this? If so, at what layer would I start to look for implementing a fix?

There is an additional issue when I have actually created my commit. The commit has a timeStamp string which begins with a space, whereas the method it is being compared against does not. The space causes the diffing algorithm to see the timestamps as different:

MCModification obsoletion timeStamp = ' 7/30/2020 20:27:03' modification timeStamp = '7/30/2020 20:27:03'

I'm afraid I could be running into a bit of chicken-or-egg problem here. If the tooling needs work, but it is this same tooling which I must use to commit changes to fix the tooling, ... :)

Thanks, Tim

dalehenrich commented 4 years ago

@tcj, as you've discovered, when metadata is turned off, the time stamps are no longer useful ... If I understand your questions correctly the difficulty here is that when you compare the filetree package to a loaded package all of the methods appear different because the Monticello difference code uses timestamps as one of it's comparison items... and I think that this is probably the best place to make changes ... It should be possible to add a flag to the Monticello changes code or a filter to the Monticello changes browser to ignore timestamp-only differences.

I'm not quite sure where the obsoletion timestamp is coming from, but if you are creating that timestamp, then it should be possible to strip the leading space ...

tcj commented 4 years ago

Thanks Dale! Have a nice weekend.