In this case (see GemTalk/JadeiteForPharo#248) the project was created in JfP using the New... menu item, which creates a project using default parameters.
The load spec created looks like the following:
RwLoadSpecificationV2 {
#projectName : 'lisa',
#projectSpecFile : 'rowan/project.ston',
#componentNames : [
'Core'
],
#platformProperties : {
'gemstone' : {
'allusers' : {
#defaultSymbolDictName : 'UserGlobals'
}
}
},
#comment : ''
}
and notice that the default symbol dictionary name is UserGlobals.
The following script is used to attempt to load and package a .gs file (UseSpec.gs):
| classesToBeInitialized |
classesToBeInitialized := Array new.
Rowan gemstoneTools topaz currentTopazProjectName: 'lisa'.
Rowan gemstoneTools topaz currentTopazPackageName: 'UseSpace'.
[
[
GsFileIn fromServerPath: 'UseSpace.gs'.
] on: Warning do: [ :ex | ex resume ].
] on: RwExecuteClassInitializeMethodsAfterLoadNotification
do: [:ex |
classesToBeInitialized add: ex candidateClass.
ex resume: false ].
classesToBeInitialized do: [:class | class initialize ].
Rowan gemstoneTools topaz currentTopazProjectName: nil.
Rowan gemstoneTools topaz currentTopazPackageName: nil.
The .gs file UseSpec.gs contains class definitions that look like the following:
expectvalue /Class
doit
Object subclass: 'IPCustomerCollection'
instVarNames: #( theCustomers intendedSize counter)
classVars: #()
classInstVars: #()
poolDictionaries: #()
inDictionary: Globals
options: #()
%
Note that the inDictionary: Globals field in the class definition does not match the default symbol dictionary declared in the load spec UserGlobals.
When the script is run a Attempt to move a packaged class 'IPCustomerCollection' from the symbol dictionary 'UserGlobals' to the symbol dictionary 'Globals'. Please use the Rowan api to achieve the move, at line 16 file /bosch1/users/dhenrich/_stones/37x/g_37x_externals_st/lisa/gs/UseSpace.gs error is thrown.
An error is expected at this time, because we are expecting to create loaded packages that will duplicate the results of loading the .gs, so an error is expected.
However, the error message is incorrect. The class is actually not being moved from 'UserGlobals' into 'Globals', the class has been created in 'Globals' following the topaz class definition and the error should complain that it will not move the class from 'Globals' into 'UserGlobals'.
So... the error message needs to be fixed to avoid confusion.