Issue 202 in glassdb: SIXX can't read from sixx file

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

Issue 202 in glassdb: SIXX can't read from sixx file

glassdb
Status: Accepted
Owner: [hidden email]
Labels: Type-Defect Priority-Medium GLASS-Server Version-1.0-beta.8  
Milestone-1.0-beta.8.5

New issue 202 by [hidden email]: SIXX can't read from sixx file
http://code.google.com/p/glassdb/issues/detail?id=202

Probably missing protocol or SIXX needs to be modded to read from GemStone-  
stlye 'fileStreams'.

see  
http://forum.world.st/SIXX-can-t-read-from-sixx-file-td3069611.html#a3069990 
for a discussion

Reply | Threaded
Open this post in threaded view
|

Re: Issue 202 in glassdb: SIXX can't read from sixx file

glassdb

Comment #1 on issue 202 by pdebruic: SIXX can't read from sixx file
http://code.google.com/p/glassdb/issues/detail?id=202

Thanks Dale.  All the tests are green but there doesn't seem to be one to  
test writing to and reading from the file system.  I could have missed the  
test when I was reading through them.  This is what I've noticed but don't  
really know how to fix it.

The two problems that create this problem are Issue 189 and the fact that  
the API for the class File Directory has changed.  Both Ken Treis's SIXX  
and Norbert Hartl's SIXX act as if  FileDirectory has class side methods  
for #readOnlyFileNamed: and Ken's assumes there is #forceNewFileNamed:  
while neither exist.  Starting from a clean install of GLASS 2.4.4.1 and  
GemTools 1.0b4 neither Ken's or Norbet's SIXX work when trying to read in a  
file. If you change the calls in SixxPortableUtil classSide>>  
readFileStreamNamed: and classSide >> writeFileStreamNamed: to  
call "FileDirectory new ..." rather than "FileDirectory ..." you can read  
the file in, but then it fails when parsing the stream because it doesn't  
recognize that its a stream.  Or something like that.


Part of the problem may be that the SixxYaxoXmlParserAdapter classSide>>  
#parseXml: method sends isStream to the stream that gets passed in but  
BinaryOrTextFile, SixxReadStream, SixxWriteStream, etc... answer false to  
that because they inherit from Object and not Stream.  I'm not sure if  
that's how it should be or not.


Also changing the SixxPortableUtil classSide>> writeFileStreamNamed: call  
in Ken Treis's SIXX from:
writeFileStreamNamed: aFilename
        "#Squeak Specific#"
        ^FileDirectory forceNewFileNamed: aFilename.
to:

writeFileStreamNamed: aFilename
        "#Squeak Specific#"
        ^FileDirectory new forceNewFileNamed: aFilename.

generates a stack overflow when running

SixxExamples example5

in the aforementioned configuration

Thanks for taking a look

Paul

Reply | Threaded
Open this post in threaded view
|

Re: Issue 202 in glassdb: SIXX can't read from sixx file

glassdb

Comment #2 on issue 202 by pdebruic: SIXX can't read from sixx file
http://code.google.com/p/glassdb/issues/detail?id=202

Making these changes to SIXX-NorbertHartl.173 & GLASS 2.4.4.1 and GemTools  
1.0b4:

BinaryOrTextFile>>isStream
isStream
   ^true

SixxPortableUtil class>>readFileStreamNamed: aFilename
readFileStreamNamed: aFilename
        "#Squeak Specific#"
        ^FileDirectory default readOnlyFileNamed: aFilename.

SixxReadStream >>initialize
initialize
        contextDictionary := SixxContext forRead.
        position := 0.
        sixxElements := self parseStream: stream contents.
        limit := sixxElements isNil
                                ifTrue: [0]
                                ifFalse: [sixxElements size].
        cachedObjects := Dictionary new




And using the API as described in SixxExamples example5 & example6 allowed  
me to export to and import from a file.  And all the tests pass.

Reply | Threaded
Open this post in threaded view
|

Re: Issue 202 in glassdb: SIXX can't read from sixx file

Dale Henrichs
Paul,

Excellent! I'll integrate your changes in my 1.0-beta.8.5 work...

Thanks,

Dale

On 12/03/2010 11:53 AM, [hidden email] wrote:

>
> Comment #2 on issue 202 by pdebruic: SIXX can't read from sixx file
> http://code.google.com/p/glassdb/issues/detail?id=202
>
> Making these changes to SIXX-NorbertHartl.173&  GLASS 2.4.4.1 and GemTools
> 1.0b4:
>
> BinaryOrTextFile>>isStream
> isStream
>     ^true
>
> SixxPortableUtil class>>readFileStreamNamed: aFilename
> readFileStreamNamed: aFilename
> "#Squeak Specific#"
> ^FileDirectory default readOnlyFileNamed: aFilename.
>
> SixxReadStream>>initialize
> initialize
> contextDictionary := SixxContext forRead.
> position := 0.
> sixxElements := self parseStream: stream contents.
> limit := sixxElements isNil
> ifTrue: [0]
> ifFalse: [sixxElements size].
> cachedObjects := Dictionary new
>
>
>
>
> And using the API as described in SixxExamples example5&  example6 allowed
> me to export to and import from a file.  And all the tests pass.
>


Reply | Threaded
Open this post in threaded view
|

Re: Issue 202 in glassdb: SIXX can't read from sixx file

glassdb
In reply to this post by glassdb
Updates:
        Status: Fixed
        Labels: Fixed-1.0-beta.8.5

Comment #3 on issue 202 by [hidden email]: SIXX can't read from sixx  
file
http://code.google.com/p/glassdb/issues/detail?id=202

fix by only making change (slightly different than suggested by Paul, but  
it involves fewer moving parts) to SixxPortableUtil  
class>>readFileStreamNamed: still not optimal, but it's functional.

Name: SIXX-DaleHenrichs.174
Author: DaleHenrichs
Time: 12/03/2010, 15:02:10
UUID: 76fa9ea6-9e96-4d9d-a224-ebcf8c42eac3
Ancestors: SIXX-NorbertHartl.173

Also created ConfigurationOfGsSIXX.

Name: ConfigurationOfGsSIXX-DaleHenrichs.1
Author: DaleHenrichs
Time: 12/03/2010, 15:07:18
UUID: efeedd90-3ba3-486e-b9b1-db86d85c6267
Ancestors:

I didn't use the ConfigurationOfSIXX, because it starts at a later  
version ... when we port the Pharo version to GemStone, we can obsolete  
this configuration file.

Reply | Threaded
Open this post in threaded view
|

Re: Issue 202 in glassdb: SIXX can't read from sixx file

Paul DeBruicker
In reply to this post by Dale Henrichs
Hi Dale,

Thanks for improving the changes to SIXX.  The configuration doesn't
seem to work.  Executing

ConfigurationOfGsSIXX load

In clean extent results in an error that nil does not understand #load.  
Also SIXX is depends on Grease Core which isn't in the configuration.  I
have updated to Metacello The method

SixxWriteStream>>cr is

cr
     self stream nextPutAll: GRPlatform current newline

Thanks for your help
Paul



On 12/03/2010 03:58 PM, Dale Henrichs wrote:

> Paul,
>
> Excellent! I'll integrate your changes in my 1.0-beta.8.5 work...
>
> Thanks,
>
> Dale
>
> On 12/03/2010 11:53 AM, [hidden email] wrote:
>>
>> Comment #2 on issue 202 by pdebruic: SIXX can't read from sixx file
>> http://code.google.com/p/glassdb/issues/detail?id=202
>>
>> Making these changes to SIXX-NorbertHartl.173&  GLASS 2.4.4.1 and
>> GemTools
>> 1.0b4:
>>
>> BinaryOrTextFile>>isStream
>> isStream
>>     ^true
>>
>> SixxPortableUtil class>>readFileStreamNamed: aFilename
>> readFileStreamNamed: aFilename
>>     "#Squeak Specific#"
>>     ^FileDirectory default readOnlyFileNamed: aFilename.
>>
>> SixxReadStream>>initialize
>> initialize
>>     contextDictionary := SixxContext forRead.
>>     position := 0.
>>     sixxElements := self parseStream: stream contents.
>>     limit := sixxElements isNil
>>                 ifTrue: [0]
>>                 ifFalse: [sixxElements size].
>>     cachedObjects := Dictionary new
>>
>>
>>
>>
>> And using the API as described in SixxExamples example5&  example6
>> allowed
>> me to export to and import from a file.  And all the tests pass.
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Issue 202 in glassdb: SIXX can't read from sixx file

glassdb
In reply to this post by glassdb
Updates:
        Status: Started

Comment #4 on issue 202 by [hidden email]: SIXX can't read from sixx  
file
http://code.google.com/p/glassdb/issues/detail?id=202

Not so fast.... more from Paul:

Hi Dale,

Thanks for improving the changes to SIXX.  The configuration doesn't
seem to work.  Executing

ConfigurationOfGsSIXX load

In clean extent results in an error that nil does not understand #load.
Also SIXX is depends on Grease Core which isn't in the configuration.  I
have updated to Metacello The method

SixxWriteStream>>cr is

cr
      self stream nextPutAll: GRPlatform current newline

Thanks for your help
Paul

Reply | Threaded
Open this post in threaded view
|

Re: Issue 202 in glassdb: SIXX can't read from sixx file

glassdb
Updates:
        Status: Fixed

Comment #5 on issue 202 by [hidden email]: SIXX can't read from sixx  
file
http://code.google.com/p/glassdb/issues/detail?id=202

Name: ConfigurationOfGsSIXX-DaleHenrichs.6
Author: DaleHenrichs
Time: 12/06/2010, 13:36:06
UUID: 135c0842-8313-4b31-a457-f7bc9577696b
Ancestors: ConfigurationOfGsSIXX-DaleHenrichs.5

- re-release version 0.3-c
- loads into GLASS1.0-beta.8.4: 550 run, 549 passes, 0 expected failures, 1  
failures, 0 errors, 0 unexpected passes (failure from Metacello development  
support methods sent but not implmented...yet)