Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GemStone 64 #51

Merged
merged 32 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
84a8940
CommandLineHandler for GS64 (first version)
ytsejam78 Sep 14, 2023
f25cd48
Code ported to GS64 from Pharo package System-BasicCommandLineHandler
ytsejam78 Sep 18, 2023
d201da0
Initial Rowan specs
ytsejam78 Sep 18, 2023
e92e183
Move Pharo specific methods to a compatibility package
gcotelli Sep 19, 2023
e9ce566
Move stdout and stderror initialization to common package
gcotelli Sep 19, 2023
6240a91
Remove direct references to OS Platform
gcotelli Sep 19, 2023
4326f17
Move TPCommandServerOption to Pharo specific package
gcotelli Sep 19, 2023
a2cf7cc
Update Baseline dependencies
gcotelli Sep 19, 2023
5d705f8
Fix test
gcotelli Sep 19, 2023
2819012
Move version initialization to a Pharo package
gcotelli Sep 19, 2023
cff7864
Fix LaunchpadTest>>#tearDown to work on GS64
gcotelli Sep 19, 2023
1efd029
Update Bell dependency
gcotelli Sep 19, 2023
40666ed
Move StrackTraceDumper to Pharo package
gcotelli Sep 19, 2023
c283c8c
Make GS version of StackTraceTextDumper
gcotelli Sep 19, 2023
d660ba0
Add new package to Deployment component
gcotelli Sep 19, 2023
ef39def
Move StackTraceBinarySerializer test to Pharo package
gcotelli Sep 19, 2023
6a89ce2
Move Pharo extensions to its own package
gcotelli Sep 19, 2023
767b00f
Fix some tests
gcotelli Sep 20, 2023
0c8330e
Add missing package to rowan specs
gcotelli Sep 20, 2023
c30ccc6
Fix test
gcotelli Sep 20, 2023
a2df8d3
Add SortFunctions as dependency
gcotelli Sep 20, 2023
75da14f
Fix loading configuration from JSON in GS64
gcotelli Sep 20, 2023
d1438b2
Fix handling of Exit because in GS64 is subclass of Error
gcotelli Sep 20, 2023
513bd87
Fix tests in GS64
gcotelli Sep 20, 2023
33a0c51
Fix tests in GS64
gcotelli Sep 20, 2023
b0372a7
Fix test
gcotelli Sep 20, 2023
e22fd6a
Make CurrentApplicationConfiguration also work in GS
gcotelli Sep 21, 2023
ade10df
Add postLoadScript for recording the version
gcotelli Sep 21, 2023
c957176
Implement GS64 version of VersionFromRepositoryResolver, preliminary …
gcotelli Sep 21, 2023
64c0386
Add GS64 version of VersionFromRepositoryResolver
gcotelli Sep 21, 2023
5e3710c
Remove now uneeded script
gcotelli Sep 21, 2023
e168b01
Fix dependencies in test package
gcotelli Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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