Skip to content

Commit

Permalink
Merge pull request #20 from mumez/develop
Browse files Browse the repository at this point in the history
Added Squeak 6 support
  • Loading branch information
mumez authored Feb 1, 2023
2 parents f672178 + 5551c28 commit 6df91d9
Show file tree
Hide file tree
Showing 33 changed files with 85 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
smalltalk: [Pharo64-10]
smalltalk: [Pharo64-10, Squeak64-6.0]
experimental: [false]
continue-on-error: ${{ matrix.experimental }}
name: ${{ matrix.smalltalk }}
Expand Down
2 changes: 1 addition & 1 deletion .smalltalk.ston
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SmalltalkCISpec {
#onConflict : #useLoaded,
#useLatestMetacello : false,
#onWarningLog : true,
#platforms : [ #pharo ]
#platforms : [ #pharo, #squeak ]
}
]
}
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
SIXX
====
# SIXX

SIXX is an XML serializer/deserializer written in Smalltalk. The purpose is to store and load Smalltalk objects in a portable, dialect-independent XML format.

This repository is mainly for sources ([Cypress](<https://github.com/CampSmalltalk/Cypress>) format). For further info, see the [main site](http://www.mars.dti.ne.jp/~umejava/smalltalk/sixx/index.html)
[![CI](https://github.com/mumez/SIXX/actions/workflows/main.yml/badge.svg)](https://github.com/mumez/SIXX/actions/workflows/main.yml)

This repository is mainly for sources ([Cypress](<https://github.com/CampSmalltalk/Cypress>) format). For further info, see the [main site](http://www.mars.dti.ne.jp/~umejava/smalltalk/sixx/index.html) and [wiki site](https://swikis.ddo.jp/umejava/SIXX).

## Installation using Metacello

### Installation using Metacello
For Squeak and Pharo users, the latest version can be installed via ConfigurationOfSIXX.

#### Squeak
```Smalltalk
Installer squeaksource
project: 'MetacelloRepository';
install: 'ConfigurationOfSIXX'.
(Smalltalk at: #ConfigurationOfSIXX) load
```
### Pharo & Squeak

#### Pharo
```Smalltalk
Metacello new
baseline: 'SIXX';
repository: 'github://mumez/SIXX';
load
```

### Squeak before version 5

```Smalltalk
Installer squeaksource
project: 'MetacelloRepository';
install: 'ConfigurationOfSIXX'.
(Smalltalk at: #ConfigurationOfSIXX) load
```
5 changes: 2 additions & 3 deletions repository/BaselineOfSIXX.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ baseline: spec
group: 'Examples' with: #('SIXX-Examples');
group: 'Tests' with: #('SIXX-Test')].
spec for: #squeak do:[
self xmlParser: spec.
spec package: 'SIXX-Squeak'.
spec package: 'SIXX-ParserAdapter' with: [spec requires: 'XML-Parser'].
spec package: 'SIXX-ParserAdapter'.
spec package: 'SIXX-InOut-Common' with: [spec includes: 'SIXX-InOut-Squeak'].
spec package: 'SIXX-InOut-Squeak' with: [spec requires: #('SIXX-Squeak' 'SIXX-InOut-Common')].
].
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"class" : {
},
"instance" : {
"baseline:" : "MU 2/1/2023 17:25",
"xmlParser:" : " 2/1/2023 11:39:55" } }
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"commentStamp" : "",
"super" : "BaselineOf",
"category" : "BaselineOfSIXX",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "BaselineOfSIXX",
"type" : "normal"
}
"pools" : [
],
"super" : "BaselineOf",
"type" : "normal" }
1 change: 1 addition & 0 deletions repository/BaselineOfSIXX.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'BaselineOfSIXX-MU.3' message 'Removed XML-Parser requirement for Squeak' id 'd4022c6d-1272-cc40-94e0-824ebb38da3b' date '1 February 2023' time '5:26:36.949295 pm' author 'MU' ancestors ((name 'BaselineOfSIXX-MU.2' message 'Updated Baseline for Squeak' id 'b5850611-169a-1047-9c09-933902fa380b' date '1 February 2023' time '5:00:02.48794 pm' author 'MU' ancestors ((name 'BaselineOfSIXX-cypress.1' message 'fabricated from a Cypress format repository' id 'fb27f779-e902-1948-b229-c852ff7f25c4' date '1 February 2023' time '11:39:55.364373 am' author '' ancestors () stepChildren ())) stepChildren ())) stepChildren ())
3 changes: 2 additions & 1 deletion repository/BaselineOfSIXX.package/properties.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{ }
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
testRunnerSupportWarningTest
^ true

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion repository/SIXX-Pharo.package/monticello.meta/version

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
testRunnerSupportWarningTest
^ SystemVersion current majorVersionNumber < 6
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"readFileStreamNamed:" : "MU 12/30/2015 23:11",
"settings" : "mu 12/25/2006 10:30",
"signalException:" : "MU 6/11/2003 17:26",
"testRunnerSupportWarningTest" : "MU 2/1/2023 16:34",
"writeFileStreamNamed:" : "MU 12/30/2015 23:11" },
"instance" : {
} }
2 changes: 1 addition & 1 deletion repository/SIXX-Squeak.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'SIXX-Squeak-MasashiUmezawa.3' message 'Use MultiByteFileStream instead of CrLfFileStream' id '07fec1dd-363e-e943-857c-1605eb7e167a' date '3 January 2016' time '3:43:09.075753 pm' author 'MasashiUmezawa' ancestors ((name 'SIXX-Squeak-mu.2' message '- Repackaged from SIXX-mu.146' id 'f33ee064-e1b7-0d46-93ba-64cf9ffe91b2' date '14 November 2009' time '10:59:55 pm' author 'mu' ancestors ((name 'SIXX-Squeak-mu.1' message 'empty log message' id '3435adcc-a2b9-ab4a-ad19-698196f83385' date '14 November 2009' time '10:28:49 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())
(name 'SIXX-Squeak-MU.4' message 'Added SixxPortableUtil class>>testRunnerSupportWarningTest' id '3f446494-2e77-0140-8a14-9e7c4bee5b63' date '1 February 2023' time '4:53:05.02294 pm' author 'MU' ancestors ((name 'SIXX-Squeak-MasashiUmezawa.3' message 'Use MultiByteFileStream instead of CrLfFileStream' id '07fec1dd-363e-e943-857c-1605eb7e167a' date '3 January 2016' time '3:43:09.075753 pm' author 'MasashiUmezawa' ancestors ((name 'SIXX-Squeak-mu.2' message '- Repackaged from SIXX-mu.146' id 'f33ee064-e1b7-0d46-93ba-64cf9ffe91b2' date '14 November 2009' time '10:59:55 pm' author 'mu' ancestors ((name 'SIXX-Squeak-mu.1' message 'empty log message' id '3435adcc-a2b9-ab4a-ad19-698196f83385' date '14 November 2009' time '10:28:49 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
private
ignoreWarning: aBlock
SixxPortableUtil testRunnerSupportWarningTest ifTrue: [
^ aBlock value.
].
"This hack is especially for Squeak 6+ which records testing error when a warning occurs"
^ aBlock on: Warning do: [:ex | ex resume ].
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
actions
should: aBlock
^ self ignoreWarning: [super should: aBlock]
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"class" : {
},
"instance" : {
"ignoreWarning:" : "MU 2/1/2023 16:40",
"setUp" : "mu 12/19/2006 18:40",
"should:" : "MU 2/1/2023 14:34",
"tearDown" : "mu 12/19/2006 18:40" } }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ tests
testReadSixxForDateAndTimeOldFormat
"self debug: #testReadSixxForDateAndTimeOldFormat"
| sixxString |
(#('Squeak5*' 'Squeak6*') anySatisfy:[:each | each match: Smalltalk version]) ifTrue: [^self].
sixxString := '<sixx.object sixx.id="0" sixx.type="DateAndTime" sixx.env="Smalltalk" >
<sixx.object sixx.id="1" sixx.name="seconds" sixx.type="SmallInteger" sixx.env="Smalltalk" >68952</sixx.object>
<sixx.object sixx.id="2" sixx.name="offset" sixx.type="Duration" sixx.env="Smalltalk" >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"testReadSixxForCorruptRecursiveDictionary" : "mu 12/19/2006 18:41",
"testReadSixxForDate" : "MasashiUmezawa 5/4/2014 02:00",
"testReadSixxForDateAndTime" : "jf 11/17/2009 20:49",
"testReadSixxForDateAndTimeOldFormat" : "MasashiUmezawa 5/4/2014 02:01",
"testReadSixxForDateAndTimeOldFormat" : "MU 2/1/2023 13:44",
"testReadSixxForDictionary" : "kuri-t 6/10/2002 14:35",
"testReadSixxForFraction" : "mu 5/4/2007 13:19",
"testReadSixxForInterval" : "minami 3/18/2003 01:36",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ testWriteReadNewFailedClass
self should: [original att1 = 1].
self should: [original att2 = 'TWO'].
self should: [original sixxString] raise: SixxInvalidSerialization.
sixxString := original sixxString.
sixxString := self ignoreWarning: [original sixxString].

self should: [Object readSixxFrom: sixxString] raise: SixxNewFailed.
read := Object readSixxFrom: sixxString.
read := self ignoreWarning: [Object readSixxFrom: sixxString].
self should: [read att1 = 1].
self should: [read att2 = 'TWO'].
self should: [read att3Block notNil].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ testWriteReadNewFailedClassReceiverAlternative
self should: [original att1 = 1].
self should: [original att2 = 'TWO'].
self should: [original sixxString] raise: SixxInvalidSerialization.
sixxString := original sixxString.
sixxString := self ignoreWarning: [original sixxString].

self should: [Object readSixxFrom: sixxString] raise: SixxNewFailed.
read := [Object readSixxFrom: sixxString] on: SixxNewFailed do: [:ex | ex resume: SixxMockFixedAlternativeClass].
read := self ignoreWarning: [[Object readSixxFrom: sixxString] on: SixxNewFailed do: [:ex | ex resume: SixxMockFixedAlternativeClass]].
self should: [read class = SixxMockFixedAlternativeClass].
self should: [read att1 = 1].
self should: [read att2 = 'TWO'].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ testWriteReadNewVariableFailedClass
self should: [original att1 = 1].
self should: [original att2 = 'TWO'].
self should: [original sixxString] raise: SixxInvalidSerialization.
sixxString := original sixxString.
sixxString := self ignoreWarning: [original sixxString].

self should: [Object readSixxFrom: sixxString] raise: SixxNewFailed.
read := Object readSixxFrom: sixxString.
read := self ignoreWarning: [Object readSixxFrom: sixxString].
self should: [read att1 = 1].
self should: [read att2 = 'TWO'].
self should: [read att3Block notNil].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ testWriteReadNewVariableFailedClassReceiverAlternative
self should: [original att1 = 1].
self should: [original att2 = 'TWO'].
self should: [original sixxString] raise: SixxInvalidSerialization.
sixxString := original sixxString.
sixxString := self ignoreWarning: [original sixxString].

self should: [Object readSixxFrom: sixxString] raise: SixxNewFailed.
read := [Object readSixxFrom: sixxString] on: SixxNewFailed do: [:ex | ex resume: SixxMockVariableAlternativeClass].
read := self ignoreWarning: [[Object readSixxFrom: sixxString] on: SixxNewFailed do: [:ex | ex resume: SixxMockVariableAlternativeClass]].
self should: [read class = SixxMockVariableAlternativeClass].
self should: [read att1 = 1].
self should: [read att2 = 'TWO'].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
},
"instance" : {
"testWriteReadNewFailedClass" : "mu 6/24/2004 22:54",
"testWriteReadNewFailedClassReceiverAlternative" : "mu 4/26/2011 13:42",
"testWriteReadNewVariableFailedClass" : "mu 6/24/2004 23:10",
"testWriteReadNewVariableFailedClassReceiverAlternative" : "MasashiUmezawa 7/8/2012 23:59" } }
"testWriteReadNewFailedClass" : "MU 2/1/2023 16:07",
"testWriteReadNewFailedClassReceiverAlternative" : "MU 2/1/2023 16:45",
"testWriteReadNewVariableFailedClass" : "MU 2/1/2023 16:45",
"testWriteReadNewVariableFailedClassReceiverAlternative" : "MU 2/1/2023 16:46" } }
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ testRenamedReadFailed
data := Array with: 1 with:2 with: (Array with:1 with:3 with:1).
oldSixx := (self sixxFrom: data) copyReplaceAll: 'SmallInteger' with: 'SmallIntegerOLD'.
srs := SixxShapeChangeReadStream on: (ReadStream on: oldSixx).
obj := srs next.
obj := self ignoreWarning: [srs next].
srs close.
self shouldnt: [obj = data].
self should: [obj = #(nil nil #(nil nil nil))]
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ testShapeChangedComplexReadFailed
</sixx>'.
srs := SixxShapeChangeReadStream on: (ReadStream on: oldSixx).
srs shapeChangers at: #SixxMockShapeChangedObjectFAILED put: SixxMockShapeChangedObject.
arr := srs next.
arr := self ignoreWarning: [srs next].
srs close.
self should: [arr class = Array].
self should: [arr = #(nil nil nil 'here')].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"sixxFrom:" : "mu 12/25/2006 16:34",
"testNewFailedRead" : "jf 11/20/2009 12:39",
"testRenamedRead" : "jf 11/20/2009 12:39",
"testRenamedReadFailed" : "jf 11/20/2009 12:40",
"testRenamedReadFailed" : "MU 2/1/2023 16:42",
"testShapeChangedComplexRead" : "jf 11/20/2009 12:40",
"testShapeChangedComplexReadFailed" : "jf 11/20/2009 12:40",
"testShapeChangedComplexReadFailed" : "MU 2/1/2023 16:42",
"testShapeChangedConverterRead" : "jf 11/20/2009 12:40",
"testShapeChangedConverterReadWithSameClassName" : "jf 11/20/2009 12:40",
"testShapeChangedRead" : "jf 11/20/2009 12:40",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ testRenamedReadFailed
| data oldSixx obj |
data := Array with: 1 with:2 with: (Array with:1 with:3 with:1).
oldSixx := data sixxString copyReplaceAll: 'SmallInteger' with: 'SmallIntegerOLD'.
obj := Object readSixxFrom: oldSixx.
obj := self ignoreWarning: [Object readSixxFrom: oldSixx].
self shouldnt: [obj = data].
self should: [obj = #(nil nil #(nil nil nil))]
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ testShapeChangedComplexReadFailed
<sixx.object sixx.id="0" sixx.type="String" >here</sixx.object>
</sixx.object>'.
SixxContext evaluate: [
arr := Object readSixxFrom: oldSixx.
arr := self ignoreWarning: [Object readSixxFrom: oldSixx].
] shapeChangersBy: [:shapeChangers |
shapeChangers at: #SixxMockShapeChangedObjectFAILED put: SixxMockShapeChangedObject.
].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"instance" : {
"testNewFailedRead" : "mu 10/31/2007 22:27",
"testRenamedRead" : "mu 10/31/2007 22:26",
"testRenamedReadFailed" : "mu 10/10/2007 17:11",
"testRenamedReadFailed" : "MU 2/1/2023 16:46",
"testShapeChangedComplexRead" : "mu 10/31/2007 22:25",
"testShapeChangedComplexReadFailed" : "mu 10/31/2007 22:24",
"testShapeChangedComplexReadFailed" : "MU 2/1/2023 16:47",
"testShapeChangedConverterRead" : "mu 10/31/2007 22:23",
"testShapeChangedConverterReadWithSameClassName" : "mu 10/31/2007 20:08",
"testShapeChangedRead" : "mu 10/31/2007 20:05",
Expand Down
Loading

0 comments on commit 6df91d9

Please sign in to comment.