Skip to content

Commit 589e829

Browse files
committed
prep work for introducing RwProjectDefinition and RwLoadeProject (both not actually used to date). All tests were passing prior to 'self halt' being added to RwGsPackageAdditionSymbolDictPatch>>createLoadedPackage.
58 run, 57 passes, 1 expected defects, 0 failures, 0 errors, 0 unexpected passes
1 parent 8dc5673 commit 589e829

4 files changed

+62
-6
lines changed

tonel/Rowan-Core/RwLoadedProject.class.st

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ RwLoadedProject >> initializeForLoadSpecification: aLoadSpecification [
4242

4343
self initialize.
4444
self initializeForName: aLoadSpecification specName.
45-
handle := aLoadSpecification.
46-
Rowan
45+
handle := aLoadSpecification
4746
]
4847

4948
{ #category : 'testing' }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Class {
2+
#name : 'RwProjectDefinition',
3+
#superclass : 'RwDefinition',
4+
#instVars : [
5+
'packageSet'
6+
],
7+
#category : 'Rowan-Core'
8+
}
9+
10+
{ #category : 'instance creation' }
11+
RwProjectDefinition class >> newNamed: packageName [
12+
13+
^ self
14+
withProperties: (Dictionary with: 'name' -> packageName)
15+
packageSet: RwPackageSetDefinition new
16+
]
17+
18+
{ #category : 'instance creation' }
19+
RwProjectDefinition class >> withProperties: properties packageSet: packageSetDefinition [
20+
21+
^ self basicNew
22+
properties: properties;
23+
packageSet: packageSetDefinition;
24+
yourself
25+
]
26+
27+
{ #category : 'initialization' }
28+
RwProjectDefinition >> initialize [
29+
30+
super initialize.
31+
packageSet := RwPackageSetDefinition new
32+
]
33+
34+
{ #category : 'properties' }
35+
RwProjectDefinition >> key [
36+
"Answer an object that can be used to uniquely identify myself in the context of my container."
37+
38+
^self propertyAt: 'name' ifAbsent: [nil]
39+
]
40+
41+
{ #category : 'accessing' }
42+
RwProjectDefinition >> packageSet [
43+
44+
^packageSet
45+
46+
]
47+
48+
{ #category : 'accessing' }
49+
RwProjectDefinition >> packageSet: anObject [
50+
51+
packageSet := anObject
52+
53+
]

tonel/Rowan-GemStone/RwGsPackageAdditionSymbolDictPatch.class.st

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Class {
1414
{ #category : 'applying' }
1515
RwGsPackageAdditionSymbolDictPatch >> createLoadedPackage [
1616

17-
self packageSymbolDictionary
18-
createLoadedPackageFromDefinition: self packageDefinition
17+
| loadedPackage |
18+
loadedPackage := self packageSymbolDictionary
19+
createLoadedPackageFromDefinition: self packageDefinition. "Right here we need to register the loaded package with the loaded project ... what that really means is that we need to have a createLoadedProject message sent to a RwGBwProjectAdditionSymbolDictPatch, etc. which means that we need to wrap a RwPackageSetDefinition with a RwProjectDefinition ... ACTUALLY ... the RwPackageSetDefinition should be renamed/replaced with RwProjectDefinition that has ref to the spec and set of packages involved in the operation ... compare will identify new packages, etc. ... " "then we will be able to manage the loaded projects"
20+
21+
self halt
1922
]

tonel/Rowan-GemStone/RwGsPackageSymbolDictionary.class.st

+3-2
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ RwGsPackageSymbolDictionary >> classRegistry [
402402
{ #category : 'package - patch api' }
403403
RwGsPackageSymbolDictionary >> createLoadedPackageFromDefinition: packageDefinition [
404404

405-
self
405+
^ self
406406
createLoadedPackageNamed: packageDefinition key
407407
properties: packageDefinition properties
408408
]
@@ -416,7 +416,8 @@ RwGsPackageSymbolDictionary >> createLoadedPackageNamed: packageName properties:
416416
ifNotNil: [ self error: 'Internal error -- Attempt to add a package that exists.' ].
417417
newLoadedPackage := RwGsLoadedSymbolDictPackage newNamed: packageName.
418418
newLoadedPackage setPropertiesTo: properties.
419-
packageRegistry at: packageName put: newLoadedPackage
419+
packageRegistry at: packageName put: newLoadedPackage.
420+
^ newLoadedPackage
420421
]
421422

422423
{ #category : 'class - patch api' }

0 commit comments

Comments
 (0)