Skip to content

Commit

Permalink
Merge pull request #31 from GsDevKit/merge
Browse files Browse the repository at this point in the history
Sync with SeasideSt/Grease master repo
  • Loading branch information
dalehenrich authored Feb 6, 2024
2 parents 87912b5 + 58f6c57 commit 042a0a0
Show file tree
Hide file tree
Showing 238 changed files with 1,439 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, GemStone64-3.7.0, GemStone64-3.6.7, GemStone64-3.5.7, Squeak64-5.3 ]
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, GemStone64-3.7.0, GemStone64-3.6.6, GemStone64-3.5.7, Squeak64-5.3 ]
experimental: [ false ]
include:
- smalltalk: Pharo64-12
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
baselines
baselineCommon: spec

spec
for: #common
do: [ spec blessing: #baseline.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
baselines
baselineGemStone: spec

spec
for: #'gemstone'
do: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ baselinePharo: spec
requires: #('Grease-Pharo100-Core');
includes: #('Grease-Tests-Pharo-Core') ];
package: 'Grease-Pharo100-Core' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Pharo90-Slime' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Tests-Slime' with: [ spec requires: #('Grease-Pharo90-Slime') ].
package: 'Grease-Pharo110-Slime' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Tests-Pharo-Slime' with: [ spec requires: #('Grease-Pharo110-Slime') ].

spec
group: 'Slime' with: #('Grease-Pharo90-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ]
group: 'Slime' with: #('Grease-Pharo110-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Pharo-Slime') ]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
self packageOrganizer ensurePackage: #BaselineOfGrease withTags: #('Manifest')!
SystemOrganization addCategory: #BaselineOfGrease!
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ resolveWith: aDictionary
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo90-') ifAbsent: [
"try -Pharo100-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo100-') ifAbsent: [
"try -Squeak-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [
"try -Squeak5-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [
"try -Squeak6-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [
"specific for Grease-Slime"
aDictionary at: (each copyReplaceAll: 'Grease-Pharo-Slime' with: 'Grease-Slime') ifAbsent: [
self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] ] ]
"try -Pharo110-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo110-') ifAbsent: [
"try -Squeak-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [
"try -Squeak5-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [
"try -Squeak6-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [
"specific for Grease-Slime"
aDictionary at: (each copyReplaceAll: 'Grease-Pharo-Slime' with: 'Grease-Slime') ifAbsent: [
self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] ] ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
files
newTemporaryFile
"Create a new temporary file in the systems temp directory and answer its pathString.
It is the users responsibility to delete or move the file, it will not be cleaned up automatically
(unless the host system has a policy for it)."
^ self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
files
newTemporaryFileNamed: aName
"Create a new temporary file in the systems temp directory and answer its pathString.
It is the users responsibility to delete or move the file, it will not be cleaned up automatically
(unless the host system has a policy for it)."
self subclassResponsibility

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version info
version
"Answer the Grease version"

^ (GRVersion major: 1 minor: 12 revision: 2)
^ (GRVersion major: 1 minor: 16 revision: 0)
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
deleteFile: aPathString

GsFile removeServerFile: aPathString
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
newTemporaryFile

^ self newTemporaryFileNamed: UUID new greaseString
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
files
newTemporaryFileNamed: aName

| fileName |
fileName := GRPlatform current pathSeparator,'tmp', GRPlatform current pathSeparator, aName.
(self fileExists: fileName) ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ].
^ (GsFile openWriteOnServer: fileName) pathName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
newTemporaryFile

^ self newTemporaryFileNamed: UUID new greaseString
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
files
newTemporaryFileNamed: aName

| newFile |
newFile := FileLocator temp / aName.
newFile exists ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ].
^ newFile pathString
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ newTemporaryFileReference
It is the users responsibility to delete or move the file,
it will not be cleaned up automatically (unless the host system
has a policy for it)."
self
greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReference'
details: 'Use newTemporaryFile'.
^ self newTemporaryFileReferenceNamed: UUID new asString
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ newTemporaryFileReferenceNamed: aName
It is the users responsibility to delete or move the file,
it will not be cleaned up automatically (unless the host system
has a policy for it)."
self
greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReferenceNamed:'
details: 'Use newTemporaryFileNamed:'.
^ FileLocator temp / aName
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #'Grease-Pharo100-Core'!
self packageOrganizer ensurePackage: #'Grease-Pharo100-Core' withTags: #()!
5 changes: 5 additions & 0 deletions repository/Grease-Pharo110-Slime.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
group

^ 'ANSI Compatibility'
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
initialization
initialize

super initialize.
self
replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ]'
with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 ] ]';
replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ] and: [ | `@temp4 | ``@expr4 ]'
with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 and: [ | `@temp4 | ``@expr4 ] ] ]';
replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ] and: [ | `@temp4 | ``@expr4 ] and: [ | `@temp5 | ``@expr5 ]'
with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 and: [ | `@temp4 | ``@expr4 and: [ | `@temp5 | ``@expr5 ] ] ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 ] ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ] or: [ | `@temp5 | ``@expr5 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 or: [ | `@temp5 | ``@expr5 ] ] ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ] or: [ | `@temp5 | ``@expr5 ] or: [ | `@temp6 | ``@expr6 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 or: [ | `@temp5 | ``@expr5 or: [ | `@temp6 | ``@expr6 ] ] ] ] ]'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
name

^ 'Booleans'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
rationale

^ '#and:and: and #or:or: are not ANSI compatible.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "GRSlimeTransformationRule",
"category" : "Grease-Pharo110-Slime",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRAnsiBooleansRule",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
group

^ 'ANSI Compatibility'
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
initialization
initialize

super initialize.
self
replace: 'Character value: ``@expr'
with: 'Character codePoint: ``@expr'.
self
replace: '`#source `{:node | node value isCharacter }` to: `#target'
byEvaluating: [ :node |
(node receiver value isCharacter and: [
node arguments first value isCharacter ])
ifTrue: [
RBLiteralNode value: (String streamContents: [ :stream |
node receiver value codePoint to: node arguments first value codePoint do: [ :code | stream nextPut: (Character codePoint: code) ] ]) ]
ifFalse: [ node ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
name

^ 'Characters'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
rationale

^ 'Character value: 64 and $a to: $b is not ANSI compatible.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "GRSlimeTransformationRule",
"category" : "Grease-Pharo110-Slime",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRAnsiCharactersRule",
"type" : "normal"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
group

^ 'ANSI Compatibility'
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
initialization
initialize
super initialize.
self
replace: '``@collection withIndexDo: [ :`each :`index | | `@temps | ``@.body ]'
with: '``@collection keysAndValuesDo: [ :`index :`each | | `@temps | ``@.body ]';
replace: '``@collection doWithIndex: [ :`each :`index | | `@temps | ``@.body ]'
with: '``@collection keysAndValuesDo: [ :`index :`each | | `@temps | ``@.body ]';
replace: '``@collection collect: ``@block1 thenDo: ``@block2'
with: '(``@collection collect: ``@block1) do: ``@block2';
replace: '``@collection collect: ``@block1 thenSelect: ``@block2'
with: '(``@collection collect: ``@block1) select: ``@block2';
replace: '``@collection pairsDo: [ :`t1 :`t2 | ``@.statements ]'
with: '1 to: ``@collection size by: 2 do: [ :index | | `t1 `t2 | `t1 := ``@collection at: index. `t2 := ``@collection at: index + 1. ``@.statements ]';
replace: '``@collection reject: ``@block1 thenDo: ``@block2'
with: '(``@collection reject: ``@block1) do: ``@block2';
replace: '``@collection select: ``@block1 thenCollect: ``@block2'
with: '(``@collection select: ``@block1) collect: ``@block2';
replace: '``@collection select: ``@block1 thenDo: ``@block2'
with: '(``@collection select: ``@block1) do: ``@block2';
replace: '``@collection detectSum: [ :`t1 | ``@.statements. `.last ]'
with: '``@collection inject: 0 into: [ :sum :`t1 | ``@.statements. sum + (`.last) ]';
replace: '``@collection valuesDo: ``@block'
with: '``@collection do: ``@block';
replace: '``@collection reversed'
with: '``@collection reverse';
replace: '``@dictionary keysSortedSafely'
with: '``@dictionary keys asSortedCollection';
replace: '``@collectionClass new: ``@size withAll: ``@character'
with: '(``@collectionClass new: ``@size) atAllPut: ``@character'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
name

^ 'Collections'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
rationale

^ 'Some collection methods are not ANSI compatible: #pairsDo:, #collect:thenDo:, #reject:thenDo:, #detectSum:, #valuesDo:, #keysSortedSafely, #new:withAll:, etc.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "GRSlimeTransformationRule",
"category" : "Grease-Pharo110-Slime",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRAnsiCollectionsRule",
"type" : "normal"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
group

^ 'ANSI Compatibility'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
initialization
initialize

super initialize.
self
replace: '``@boolean ifNotNilDo: ``@block'
with: '``@boolean ifNotNil: ``@block';
replace: '``@boolean ifNotNilDo: ``@block1 ifNil: ``@block2'
with: '``@boolean ifNotNil: ``@block1 ifNil: ``@block2';
replace: '``@boolean ifNil: ``@block1 ifNotNilDo: ``@block2'
with: '``@boolean ifNil: ``@block1 ifNotNil: ``@block2';
replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]'
with: '``@boolean ifNotNil: [ :arg | | `@temps | ``@.body ]';
replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ] ifNil: ``@block '
with: '``@boolean ifNotNil: [ :arg | | `@temps | ``@.body ] ifNil: ``@block';
replace: '``@boolean ifNil: ``@block ifNotNil: [ | `@temps | ``@.body ]'
with: '``@boolean ifNil: ``@block ifNotNil: [ :arg | | `@temps | ``@.body ]'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
name

^ 'Conditionals'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
rationale

^ 'Conditionals like #ifNotNilDo: are not ANSI compatible.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "GRSlimeTransformationRule",
"category" : "Grease-Pharo110-Slime",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRAnsiConditionalsRule",
"type" : "normal"
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
group

^ 'ANSI Compatibility'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
initialization
initialize

super initialize.
self
replace: '``@object asString' with: '``@object greaseString';
replace: '``@object asInteger' with: '``@object greaseInteger'
Loading

0 comments on commit 042a0a0

Please sign in to comment.