Skip to content

Commit

Permalink
Merge pull request #51 from ba-st/gs64
Browse files Browse the repository at this point in the history
Add support for GemStone 64
  • Loading branch information
gcotelli authored Sep 21, 2023
2 parents 9c57522 + e168b01 commit 129f6a4
Show file tree
Hide file tree
Showing 56 changed files with 1,013 additions and 121 deletions.
34 changes: 34 additions & 0 deletions rowan/components/Deployment.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
RwSimpleProjectLoadComponentV2 {
#name : 'Deployment',
#projectNames : [
'Bell',
'Buoy',
'INI-Parser',
'SortFunctions'
],
#componentNames : [ ],
#packageNames : [
'Launchpad-Applications',
'Launchpad-Commands',
'Launchpad-Configuration',
'Launchpad-Configuration-GS64-Extensions',
'Launchpad-GS64-Extensions',
'Launchpad-Tracing',
'Launchpad-Tracing-GS64'
],
#conditionalPackageMapSpecs : {
'gemstone' : {
'allusers' : {
#packageNameToPlatformPropertiesMap : {
'Launchpad-Applications' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Commands' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Configuration' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Configuration-GS64-Extensions' : { 'symbolDictName' : 'Globals' },
'Launchpad-GS64-Extensions' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Tracing' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Tracing-GS64' : { 'symbolDictName' : 'Launchpad' }
}
}
}
}
}
32 changes: 32 additions & 0 deletions rowan/components/Tests.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
RwSimpleProjectLoadComponentV2 {
#name : 'Tests',
#condition : 'tests',
#projectNames : [ ],
#componentNames : [
'Deployment'
],
#packageNames : [
'Launchpad-Applications-Tests',
'Launchpad-Commands-Tests',
'Launchpad-Configuration-Tests',
'Launchpad-Examples',
'Launchpad-GS64-Extensions-Tests',
'Launchpad-SUnit',
'Launchpad-Tracing-Tests'
],
#conditionalPackageMapSpecs : {
'gemstone' : {
'allusers' : {
#packageNameToPlatformPropertiesMap : {
'Launchpad-Applications-Tests' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Commands-Tests' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Configuration-Tests' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Examples' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-GS64-Extensions-Tests' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-SUnit' : { 'symbolDictName' : 'Launchpad' },
'Launchpad-Tracing-Tests' : { 'symbolDictName' : 'Launchpad' }
}
}
}
}
}
11 changes: 11 additions & 0 deletions rowan/project.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
RwProjectSpecificationV2 {
#specName : 'project',
#projectSpecPath : 'rowan',
#componentsPath : 'rowan/components',
#packagesPath : 'source',
#projectsPath : 'rowan/projects',
#specsPath : 'rowan/specs',
#packageFormat : 'tonel',
#packageConvention : 'Rowan',
#comment : 'Launchpad project specification'
}
11 changes: 11 additions & 0 deletions rowan/projects/Bell.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
RwLoadSpecificationV2 {
#specName: 'Bell',
#projectName : 'Bell',
#gitUrl : 'https://github.com/ba-st/Bell.git',
#revision : 'v2',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Deployment',
'Dependent-SUnit-Extensions'
]
}
11 changes: 11 additions & 0 deletions rowan/projects/Buoy.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
RwLoadSpecificationV2 {
#specName: 'Buoy',
#projectName : 'Buoy',
#gitUrl : 'https://github.com/ba-st/Buoy.git',
#revision : 'v7',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Deployment',
'Dependent-SUnit-Extensions'
]
}
10 changes: 10 additions & 0 deletions rowan/projects/INI-Parser.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
RwLoadSpecificationV2 {
#specName: 'INI-Parser',
#projectName : 'INI-Parser',
#gitUrl : 'https://github.com/ba-st-dependencies/INI-Parser.git',
#revision : 'v2',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Deployment'
]
}
Empty file added rowan/projects/README.md
Empty file.
10 changes: 10 additions & 0 deletions rowan/projects/SortFunctions.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
RwLoadSpecificationV2 {
#specName: 'SortFunctions',
#projectName : 'SortFunctions',
#gitUrl : 'https://github.com/ba-st-dependencies/SortFunctions.git',
#revision : 'v1',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Deployment'
]
}
14 changes: 14 additions & 0 deletions rowan/specs/Launchpad-CI.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
RwLoadSpecificationV2 {
#specName: 'Launchpad-CI',
#projectName : 'Launchpad',
#diskUrl : 'Launchpad',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Tests'
],
#customConditionalAttributes : [
'tests',
'sunit'
],
#comment : 'Loading spec for the continuous integration setup'
}
9 changes: 9 additions & 0 deletions rowan/specs/Launchpad-Deployment.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
RwLoadSpecificationV2 {
#specName: 'Launchpad-Deployment',
#projectName : 'Launchpad',
#diskUrl : 'Launchpad',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Deployment'
]
}
3 changes: 2 additions & 1 deletion source/.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
#format : #tonel
#format : #tonel,
#convention : 'Rowan'
}
69 changes: 53 additions & 16 deletions source/BaselineOfLaunchpad/BaselineOfLaunchpad.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@ BaselineOfLaunchpad >> projectClass [
BaselineOfLaunchpad >> setUpDependencies: spec [

spec
baseline: 'Buoy' with: [ spec repository: 'github://ba-st/Buoy:v6' ];
baseline: 'Buoy' with: [ spec repository: 'github://ba-st/Buoy:v7' ];
project: 'Buoy-Deployment' copyFrom: 'Buoy' with: [ spec loads: 'Deployment' ];
project: 'Buoy-SUnit' copyFrom: 'Buoy' with: [ spec loads: 'Dependent-SUnit-Extensions' ];
project: 'Buoy-Tools' copyFrom: 'Buoy' with: [ spec loads: 'Tools' ].

spec
baseline: 'Bell' with: [ spec repository: 'github://ba-st/Bell:v1' ];
baseline: 'Bell' with: [ spec repository: 'github://ba-st/Bell:v2' ];
project: 'Bell-Deployment' copyFrom: 'Bell' with: [ spec loads: 'Deployment' ];
project: 'Bell-SUnit' copyFrom: 'Bell' with: [ spec loads: 'Dependent-SUnit-Extensions' ].

spec
baseline: 'INIParser' with: [ spec repository: 'github://ctSkennerton/INI-Parser:v1.1.1' ];
baseline: 'INIParser' with: [ spec repository: 'github://ba-st-dependencies/INI-Parser:v2' ];
project: 'INIParser-Deployment' copyFrom: 'INIParser' with: [ spec loads: 'Deployment' ].

spec
baseline: 'Hyperspace' with: [ spec repository: 'github://ba-st/Hyperspace:v4' ];
baseline: 'Hyperspace' with: [ spec repository: 'github://ba-st/Hyperspace:v5' ];
project: 'Hyperspace-SUnit'
copyFrom: 'Hyperspace'
with: [ spec loads: 'Dependent-SUnit-Extensions' ]
Expand All @@ -79,21 +79,41 @@ BaselineOfLaunchpad >> setUpDependencies: spec [
BaselineOfLaunchpad >> setUpDeploymentPackages: spec [

spec
package: 'Launchpad-Configuration'
with: [ spec requires: #( 'Bell-Deployment' 'INIParser-Deployment' 'Buoy-Deployment' ) ];
package: 'Launchpad-Configuration-Pharo-Extensions';
group: 'Deployment'
with: 'Launchpad-Configuration-Pharo-Extensions'.

spec
package: 'Launchpad-Configuration' with: [
spec requires:
#( 'Bell-Deployment' 'INIParser-Deployment'
'Buoy-Deployment' 'Launchpad-Configuration-Pharo-Extensions' ) ];
group: 'Deployment' with: 'Launchpad-Configuration'.

spec
package: 'Launchpad-Applications' with: [ spec requires: 'Bell-Deployment' ];
package: 'Launchpad-Applications'
with: [ spec requires: 'Bell-Deployment' ];
group: 'Deployment' with: 'Launchpad-Applications'.

spec
package: 'Launchpad-Commands'
with: [ spec requires: #( 'Launchpad-Applications' 'Launchpad-Configuration' ) ];
package: 'Launchpad-Commands' with: [
spec requires:
#( 'Launchpad-Applications' 'Launchpad-Configuration' ) ];
group: 'Deployment' with: 'Launchpad-Commands'.

spec
package: 'Launchpad-Tracing' with: [ spec requires: 'Launchpad-Applications' ];
package: 'Launchpad-Commands-Pharo'
with: [ spec requires: 'Launchpad-Commands' ];
group: 'Deployment' with: 'Launchpad-Commands-Pharo'.

spec
package: 'Launchpad-Tracing-Pharo'
with: [ spec requires: 'Launchpad-Applications' ];
group: 'Deployment' with: 'Launchpad-Tracing-Pharo'.

spec
package: 'Launchpad-Tracing'
with: [ spec requires: 'Launchpad-Tracing-Pharo' ];
group: 'Deployment' with: 'Launchpad-Tracing'
]

Expand Down Expand Up @@ -177,20 +197,37 @@ BaselineOfLaunchpad >> setUpTestPackages: spec [

spec
package: 'Launchpad-Configuration-Tests'
with: [ spec requires: #( 'Launchpad-Configuration' 'Launchpad-SUnit' ) ];
with: [
spec requires: #( 'Launchpad-Configuration'
'Launchpad-SUnit' ) ];
group: 'Tests' with: 'Launchpad-Configuration-Tests'.

spec
package: 'Launchpad-Applications-Tests'
with: [ spec requires: #( 'Launchpad-Applications' 'Launchpad-SUnit' ) ];
with: [
spec requires: #( 'Launchpad-Applications' 'Launchpad-SUnit' ) ];
group: 'Tests' with: 'Launchpad-Applications-Tests'.

spec
package: 'Launchpad-Tracing-Tests' with: [ spec requires: 'Launchpad-Tracing' ];
package: 'Launchpad-Tracing-Tests'
with: [ spec requires: 'Launchpad-Tracing' ];
group: 'Tests' with: 'Launchpad-Tracing-Tests'.

spec
package: 'Launchpad-Commands-Tests'
with: [ spec requires: #( 'Examples' 'Launchpad-Commands' 'Launchpad-SUnit' 'Hyperspace-SUnit' ) ];
group: 'Tests' with: 'Launchpad-Commands-Tests'
package: 'Launchpad-Tracing-Pharo-Tests'
with: [ spec requires: 'Launchpad-Tracing' ];
group: 'Tests' with: 'Launchpad-Tracing-Pharo-Tests'.

spec
package: 'Launchpad-Commands-Tests' with: [
spec requires:
#( 'Examples' 'Launchpad-Commands' 'Launchpad-SUnit'
'Hyperspace-SUnit' ) ];
group: 'Tests' with: 'Launchpad-Commands-Tests'.

spec
package: 'Launchpad-Commands-Pharo-Tests' with: [
spec requires:
#( 'Launchpad-Commands-Tests' 'Launchpad-Commands-Pharo' ) ];
group: 'Tests' with: 'Launchpad-Commands-Pharo-Tests'
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ Class {
}

{ #category : #accessing }
VersionFromRepositoryResolver >> valueFor: aPackageName [

| version |
VersionFromRepositoryResolver >> valueFor: projectName [

| packageName version |
packageName := ('BaselineOf<1s>' expandMacrosWith: projectName) asSymbol.
version := ''.
self class environment at: #IceRepository ifPresent: [ :icebergRepository |
version := icebergRepository registry detect: [ :repository |
repository includesPackageNamed: aPackageName ]
repository includesPackageNamed: packageName ]
ifFound: [ :repository | self versionFromGitRepository: repository ]
ifNone: [ self versionFromMonticelloRepository: aPackageName ]
ifNone: [ self versionFromMonticelloRepository: packageName ]
].
^ version
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ Class {
#category : #'Launchpad-Applications'
}

{ #category : #accessing }
CurrentApplicationConfiguration class >> default [

^ LaunchpadApplication currentlyRunning configuration
]

{ #category : #accessing }
CurrentApplicationConfiguration >> default [

^LaunchpadApplication currentlyRunning configuration
^ self class default
]
6 changes: 6 additions & 0 deletions source/Launchpad-Applications/LaunchpadApplication.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ LaunchpadApplication class >> initialize [
self resetCurrentlyRunning
]

{ #category : #testing }
LaunchpadApplication class >> isAbstract [

^ self = LaunchpadApplication
]

{ #category : #printing }
LaunchpadApplication class >> printCommandArgumentsOn: stream [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ ReleasedApplicationMode >> isDebugMode [
{ #category : #utilities }
ReleasedApplicationMode >> value: aBlock onErrorDo: errorHandler [

^ aBlock on: Error do: errorHandler
^ aBlock on: Error except: Exit do: errorHandler
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Extension { #name : #LaunchpadRootCommandTest }

{ #category : #'*Launchpad-Commands-Pharo-Tests' }
LaunchpadRootCommandTest >> testHandlingStartGreeterApplicationEnablingTCPCommandServer [

| output |

output := self handle: {
'launchpad'.
'start'.
'--debug-mode'.
'--enable-tcp-command-server=0'.
LaunchpadGreeterApplication commandName.
'--name=John' }.

self assert: output equals: 'Hi John!<n>' expandMacros.

self assertLogRecordsMatch: #(
'[INFO] Receiving commands over TCP/0'
'[INFO] greeter [v1.0.0] - A greetings application'
'[INFO] Obtaining configuration...'
'[WARNING] "Title" parameter not provided. Using default.'
'[INFO] Name: John'
'[INFO] Title: '
'[INFO] Obtaining configuration... [DONE]'
'[INFO] Exit application' )
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Class {
#instVars : [
'server'
],
#category : #'Launchpad-Commands-Tests'
#category : #'Launchpad-Commands-Pharo-Tests'
}

{ #category : #running }
Expand Down
1 change: 1 addition & 0 deletions source/Launchpad-Commands-Pharo-Tests/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : #'Launchpad-Commands-Pharo-Tests' }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Extension { #name : #LaunchpadStartApplicationCommand }

{ #category : #'*Launchpad-Commands-Pharo' }
LaunchpadStartApplicationCommand >> enableTCPCommandServerListeningOn: listeningPort [

commandServer := TCPCommandServer listeningOn: listeningPort.
commandServer registerCommandNamed: 'SHUTDOWN' executing: [
[
LaunchpadApplication currentlyRunning
stop;
exitSuccess
] forkAt: Processor timingPriority named: 'Launchpad shutdown process'
]
]
Loading

0 comments on commit 129f6a4

Please sign in to comment.