-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #4: eval command is returning nil ... but we're getting Text ob…
…jects which is not desirable ... command line handling for 'eval 3+4' is a bit funky at the moment ... but we're getting a resultgit commit -mIssue
- Loading branch information
1 parent
f8d4e54
commit 61d6e04
Showing
30 changed files
with
277 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...e.package/CharacterCollection.extension/instance/convertTDEvaluateTokenResponseToText..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*gsdevkit_stones-tode | ||
convertTDEvaluateTokenResponseToText: objectSerializer | ||
"expected response is a String, but could be a TZProxyNotification" | ||
|
||
^ objectSerializer fromString: self |
2 changes: 2 additions & 0 deletions
2
src/GsDevKit_stones-Tode.package/CharacterCollection.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "CharacterCollection" } |
18 changes: 18 additions & 0 deletions
18
..._stones-Tode.package/TDExternalSessionClient.class/instance/_serverBackupDirectory.to..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
server external session calls | ||
_serverBackupDirectory: backupDirectoryString to: topezServerOop | ||
| doitString | | ||
doitString := ' | ||
[ | ||
| tsp | | ||
tsp := Object _objectForOop: ' , topezServerOop printString | ||
, | ||
'. | ||
tsp backupDirectory: ' , backupDirectoryString printString | ||
, | ||
' ] | ||
on: Error | ||
do: [ :ex | System waitForDebug ]'. | ||
[ self session nbExecute: doitString ] | ||
on: GsErrorNotification | ||
do: [ :ex | self error: 'Unable send #backupDirectory: message to tODE server' ]. | ||
^ self session nbResult |
18 changes: 18 additions & 0 deletions
18
...nes-Tode.package/TDExternalSessionClient.class/instance/_serverEffectiveApiVersion.to..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
server external session calls | ||
_serverEffectiveApiVersion: versionString to: topezServerOop | ||
| doitString | | ||
doitString := ' | ||
[ | ||
| tsp | | ||
tsp := Object _objectForOop: ' , topezServerOop printString | ||
, | ||
'. | ||
tsp effectiveApiVersion: ' , versionString printString | ||
, | ||
' ] | ||
on: Error | ||
do: [ :ex | System waitForDebug ]'. | ||
[ self session nbExecute: doitString ] | ||
on: GsErrorNotification | ||
do: [ :ex | self error: 'Unable send #effectiveApiVersion: message to tODE server' ]. | ||
^ self session nbResult |
14 changes: 14 additions & 0 deletions
14
...evKit_stones-Tode.package/TDExternalSessionClient.class/instance/_serverExecuteString..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
server external session calls | ||
_serverExecuteString: executeString | ||
| doitString | | ||
doitString := ' | ||
[ | ||
^ (' , executeString | ||
, | ||
') ] | ||
on: Error, Halt | ||
do: [ :ex | System waitForDebug ]'. | ||
[ self session nbExecute: doitString ] | ||
on: GsErrorNotification | ||
do: [ :ex | self error: 'Unable to execute #executeString: on tODE server' ]. | ||
^ self session nbResult |
19 changes: 19 additions & 0 deletions
19
...package/TDExternalSessionClient.class/instance/_serverSerializeObjectsUser.version.to..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
server external session calls | ||
_serverSerializeObjectsUser: serializerClassString version: versionString to: topezServerOop | ||
| doitString | | ||
doitString := ' | ||
[ | ||
| tsp | | ||
tsp := Object _objectForOop: ' , topezServerOop printString | ||
, | ||
'. | ||
tsp serializeObjectsUsing: ' , serializerClassString printString | ||
, ' version: ' , versionString printString | ||
, | ||
' ] | ||
on: Error | ||
do: [ :ex | System waitForDebug ]'. | ||
[ self session nbExecute: doitString ] | ||
on: GsErrorNotification | ||
do: [ :ex | self error: 'Unable send #serializeObjectsUsing:version: message to tODE server' ]. | ||
^ self session nbResult |
18 changes: 18 additions & 0 deletions
18
...tones-Tode.package/TDExternalSessionClient.class/instance/_serverSnapshotDirectory.to..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
server external session calls | ||
_serverSnapshotDirectory: snapshotDirectoryString to: topezServerOop | ||
| doitString | | ||
doitString := ' | ||
[ | ||
| tsp | | ||
tsp := Object _objectForOop: ' , topezServerOop printString | ||
, | ||
'. | ||
tsp snapshotDirectory: ' , snapshotDirectoryString printString | ||
, | ||
' ] | ||
on: Error | ||
do: [ :ex | System waitForDebug ]'. | ||
[ self session nbExecute: doitString ] | ||
on: GsErrorNotification | ||
do: [ :ex | self error: 'Unable send #snapshotDirectory: message to tODE server' ]. | ||
^ self session nbResult |
21 changes: 21 additions & 0 deletions
21
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/clientApiVersion.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
accessing | ||
clientApiVersion | ||
"Version changes whenever the api between client and server changes: | ||
Major version changes when incompatible API changes have been made. | ||
Minor version changes when API is extended/changed in a backwards compatible manner. | ||
Patch version changes whenever bugfixes are made in the API" | ||
|
||
"1.0.0 - initial version" | ||
|
||
"1.1.0 - introduce TDEventsCache" | ||
|
||
"1.2.0 - add additional instance variables (netLDIPort and netLDIPortRange) to TDSessionDescription" | ||
|
||
"1.3.0 - debugger uses #closeWith: callback when dbContinue runs off the end, | ||
server-side effectiveApiVersion" | ||
|
||
"1.4.0 - use client callback #dbStepThrough:forProcessOop: for debugger step thru ... GemStone3.2 and greater" | ||
|
||
"1.5.0 - external tode server supported" | ||
|
||
^ '1.5.0' asRwSemanticVersionNumber |
3 changes: 3 additions & 0 deletions
3
...evKit_stones-Tode.package/TDExternalSessionClient.class/instance/clientForwarderCache..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
clientForwarderCache: object | ||
clientForwarderCache := object |
3 changes: 3 additions & 0 deletions
3
...DevKit_stones-Tode.package/TDExternalSessionClient.class/instance/clientForwarderCache.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
clientForwarderCache | ||
^ clientForwarderCache ifNil: [ clientForwarderCache := Dictionary new ] |
3 changes: 3 additions & 0 deletions
3
...DevKit_stones-Tode.package/TDExternalSessionClient.class/instance/effectiveApiVersion..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
effectiveApiVersion: object | ||
effectiveApiVersion := object |
3 changes: 3 additions & 0 deletions
3
...sDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/effectiveApiVersion.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
effectiveApiVersion | ||
^effectiveApiVersion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/login.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
session management | ||
login | ||
| gemNRS stoneNRS sessionDescription | | ||
| gemNRS stoneNRS sessionDescription sess | | ||
sessionDescription := self sessionDescription. | ||
gemNRS := GsNetworkResourceString | ||
gemNRSForNetLDI: sessionDescription netLDIPort | ||
onHost: sessionDescription gemHost. | ||
stoneNRS := GsNetworkResourceString | ||
stoneNRSForStoneName: sessionDescription stoneName | ||
onHost: sessionDescription stoneHost. | ||
^ (GsTsExternalSession | ||
sess := GsTsExternalSession | ||
gemNRS: gemNRS | ||
stoneNRS: stoneNRS | ||
username: sessionDescription userId | ||
password: sessionDescription password) login | ||
password: sessionDescription password. | ||
sess nbLogin. | ||
sess waitForReadReady. | ||
sess nbLoginFinished. | ||
^ sess |
6 changes: 6 additions & 0 deletions
6
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/serverApiVersion..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
accessing | ||
serverApiVersion: aServerApiVersion | ||
serverApiVersion := aServerApiVersion. | ||
self clientApiVersion >= serverApiVersion | ||
ifTrue: [ self effectiveApiVersion: serverApiVersion ] | ||
ifFalse: [ self effectiveApiVersion: self clientApiVersion ] |
3 changes: 3 additions & 0 deletions
3
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/serverApiVersion.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
serverApiVersion | ||
^serverApiVersion |
5 changes: 4 additions & 1 deletion
5
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/session.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
session management | ||
session | ||
session ifNil: [ session := self login ]. | ||
session | ||
ifNil: [ | ||
session := self login. | ||
self topezServerProxy ]. | ||
^ session |
3 changes: 3 additions & 0 deletions
3
...it_stones-Tode.package/TDExternalSessionClient.class/instance/todeServerCreationString.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
session management | ||
todeServerCreationString | ||
^self todeServerCreationStringWithOptions: true |
12 changes: 12 additions & 0 deletions
12
...de.package/TDExternalSessionClient.class/instance/todeServerCreationStringWithOptions..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
session management | ||
todeServerCreationStringWithOptions: withOptions | ||
| str optionsString | | ||
str := self todeServerAccessString , ' createFor: ' | ||
, self shell shellId asString. | ||
withOptions | ||
ifTrue: [ | ||
optionsString := true | ||
ifTrue: [ '' ] | ||
ifFalse: [ '#transcript' ]. | ||
str := str , ' options: #(' , optionsString , ')' ]. | ||
^ str |
3 changes: 3 additions & 0 deletions
3
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/topezServerProxy..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
topezServerProxy: object | ||
topezServerProxy := object |
63 changes: 63 additions & 0 deletions
63
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/topezServerProxy.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
accessing | ||
topezServerProxy | ||
^ topezServerProxy | ||
ifNil: [ | ||
| jsonString transcriptOopType resultArray topezServerOop topezClientOopType todeServerCreationString serializeResultString | | ||
[ | ||
todeServerCreationString := self todeServerCreationString. | ||
jsonString := self session executeString: todeServerCreationString ] | ||
on: GsErrorNotification | ||
do: [ :firstEx | | ||
"try again with no options, in case using old version of tode ... eventually get rid of this" | ||
[ | ||
todeServerCreationString := self todeServerCreationStringWithOptions: false. | ||
jsonString := self session nbExecute: todeServerCreationString ] | ||
on: GsErrorNotification | ||
do: [ :ex | | ||
self | ||
error: | ||
'Unable to log into server:' , ex description , 'with: ' | ||
, todeServerCreationString printString ] ]. | ||
resultArray := STON fromString: jsonString. | ||
topezServerOop := resultArray at: 1. | ||
topezClientOopType := resultArray at: 3. | ||
topezServerProxy := topezServerOop. | ||
(resultArray at: 2) | ||
ifNotNil: [ :transcriptOop | | ||
transcriptOopType := transcriptOop. | ||
self clientForwarderCache at: transcriptOopType put: Transcript ]. | ||
self clientForwarderCache at: topezClientOopType put: self. | ||
resultArray size > 3 | ||
ifTrue: [ | ||
| protocolSignature objSerializer serverApiVersionString | | ||
protocolSignature := resultArray at: 4. | ||
objSerializer := STON. | ||
|
||
serializeResultString := self | ||
_serverSerializeObjectsUser: objSerializer name asString | ||
version: '0.9.1' | ||
to: topezServerOop. | ||
|
||
serverApiVersionString := resultArray size > 4 | ||
ifTrue: [ resultArray at: 5 ] | ||
ifFalse: [ '1.0.0' ]. | ||
self serverApiVersion: serverApiVersionString asRwSemanticVersionNumber ]. | ||
self effectiveApiVersion >= '1.3.0' asRwSemanticVersionNumber | ||
ifTrue: [ | ||
self | ||
_serverEffectiveApiVersion: self effectiveApiVersion asString | ||
to: topezServerOop ]. | ||
self sessionDescription backupDirectory isEmpty not | ||
ifTrue: [ | ||
self | ||
_serverBackupDirectory: self sessionDescription backupDirectory | ||
to: topezServerOop ]. | ||
self sessionDescription snapshotDirectory isEmpty not | ||
ifTrue: [ | ||
self | ||
_serverSnapshotDirectory: self sessionDescription snapshotDirectory | ||
to: topezServerOop ]. | ||
TZGemStoneProxyBehavior new | ||
topez: self; | ||
allGlobalNames; | ||
yourself ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/GsDevKit_stones-Tode.package/TDShell.class/instance/objectSerializer.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
accessing | ||
objectSerializer | ||
^ self topez objectSerializer | ||
^ STON |
Empty file.
7 changes: 7 additions & 0 deletions
7
src/GsDevKit_stones-Tode.package/TZGemStoneProxyBehavior.class/instance/allGlobalNames.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
accessing | ||
allGlobalNames | ||
AllGlobalNames | ||
ifNil: [ | ||
"may be needed?" | ||
AllGlobalNames := #() ]. | ||
^ AllGlobalNames |
3 changes: 3 additions & 0 deletions
3
src/GsDevKit_stones-Tode.package/TZGemStoneProxyBehavior.class/instance/topez..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
topez: object | ||
topez := object |
3 changes: 3 additions & 0 deletions
3
src/GsDevKit_stones-Tode.package/TZGemStoneProxyBehavior.class/instance/topez.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
topez | ||
^topez |
19 changes: 19 additions & 0 deletions
19
src/GsDevKit_stones-Tode.package/TZGemStoneProxyBehavior.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"category" : "GsDevKit_stones-Tode", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
"AllGlobalNames", | ||
"GciSemaphore" ], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"behaviorOop", | ||
"topez", | ||
"allInstVarNames", | ||
"allClassVarNames", | ||
"allSharedPoolNames" ], | ||
"name" : "TZGemStoneProxyBehavior", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } |