Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo
Status: New
Owner: ----

New issue 3452 by [hidden email]: GlorpDBX no longer loads due to garbled  
timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

Pharo image: Pharo-core
Pharo core version: PharoCore-1.2-12251 is OKAY, but PharoCore-1.2-12261  
and newer fails

Steps to reproduce:

Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfGlorpDBX';
load.
!
ConfigurationOfGlorpDBX ensureMetacello.
!
(ConfigurationOfGlorpDBX project version: '1.2') load: { 'All with  
PostgreSQL native'. }


I tried to debug it myself, but ended up in method trailer code. I also  
tried reverting the method #parseTimestampFrom: and got a complaint  
about "<historical>", which I couldn't figure out where it came from.

Attachments:
        PharoDebug.log  40.3 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo
Updates:
        Status: Accepted
        Cc: Benjamin.VanRyseghem.Pharo

Comment #1 on issue 3452 by stephane.ducasse: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

This is probably due to Issue 3224: Migrating MethodReference to  
MethodReferenceWithSource
Could you load the fix first to see if this is working?


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo

Comment #2 on issue 3452 by [hidden email]: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

Filed-in the 2 changesets in Issue 3224, and got the same stack trace as  
before.

Today, I figured that maybe the timestamp is not garbled, an really is:
     pm From  
VisualWorksÂÃÂ...etc...

I changed #parseTimestampFrom: to check for 'VisualWorks' (see attached  
change set). Here are the crucial lines:

      ^ ((aString isEmpty or: [aString includesSubString: 'VisualWorks'])  
or:[aString = '<historical>'])
                ifTrue:[DateAndTime new]
                ifFalse:[ "Get the date start index and extract only those tokens that  
represent date or time" ...

Now everything loaded fine.

Attachments:
        SourceReference-parseTimestampFrom.st  1.3 KB

Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo

Comment #3 on issue 3452 by [hidden email]: GlorpDBX no longer  
loads due to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

Would'nt it be a better to just parse the timestamp and return "DateAndTime  
new" in case of (any) parse failure.
So either its parseable in the format we want or we just want a new  
timestamp.

This would IMHO be a better design than hardcoding 'VisualWorks' formats or  
try to catch possibilities with the next "or:".







Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo

Comment #4 on issue 3452 by stephane.ducasse: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

I agree with torsten, and I have no idea why we have this visualWorks  
reference in there.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo

Comment #5 on issue 3452 by [hidden email]: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

The VisualWorks reference is in the timestamp of the Glorp source. It's  
likely from the original code developed in VW.

Yes, a failed parse should return "DataAndTime new", I figured that out  
almost immediately afterwards. Here's new code, without a VisualWorks  
reference, but it does not catch all parse failures. The old code appeared  
to check for index out of range, but in fact let through a timestamp  
without any '/' characters.

Attachments:
        SourceReference-parseTimestampFrom.st  1.3 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo

Comment #6 on issue 3452 by [hidden email]: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

TestCase attached

Attachments:
        MethodReferenceTest-testParseTimestampFromString.st  1.7 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo
Updates:
        Labels: Milestone-1.2

Comment #7 on issue 3452 by stephane.ducasse: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo
Updates:
        Status: Fixed

Comment #8 on issue 3452 by stephane.ducasse: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3452 in pharo: GlorpDBX no longer loads due to garbled timestamp

pharo
Updates:
        Status: closed

Comment #9 on issue 3452 by stephane.ducasse: GlorpDBX no longer loads due  
to garbled timestamp
http://code.google.com/p/pharo/issues/detail?id=3452

in 12286