8
8
#name : ' Rowan' ,
9
9
#superclass : ' Object' ,
10
10
#classInstVars : [
11
- ' knownRepositories' ,
12
11
' configuration' ,
13
- ' platform' ,
14
- ' knownProjects'
12
+ ' platform'
15
13
],
16
14
#category : ' Rowan-Core'
17
15
}
@@ -24,15 +22,6 @@ Rowan class >> addProject: aRwProjectSpecification [
24
22
^ self image addProject: aRwProjectSpecification
25
23
]
26
24
27
- { #category : ' public' }
28
- Rowan class >> addRepositoryNamed: urlString [
29
- " Register a repository.
30
- Note that duplicate registrations are ignored, since knownRepositories is a Set"
31
-
32
- knownRepositories
33
- add: (CypRepository onUrl: (CypUrl fromString: urlString))
34
- ]
35
-
36
25
{ #category : ' public' }
37
26
Rowan class >> configuration [
38
27
@@ -79,25 +68,12 @@ Rowan class >> image [
79
68
80
69
{ #category : ' private' }
81
70
Rowan class >> initialize [
82
- " Rowan initialize."
83
-
84
- knownRepositories := Set new .
85
- platform := RwPlatform current.
86
- configuration := platform defaultConfiguration.
87
- platform initialize.
88
- knownProjects := Dictionary new
89
- ]
90
71
91
- { #category : ' public' }
92
- Rowan class >> knownProjects [
93
-
94
- ^ knownProjects
95
- ]
72
+ " Rowan initialize."
96
73
97
- { #category : ' public' }
98
- Rowan class >> knownRepositories [
99
-
100
- ^ knownRepositories
74
+ platform := RwPlatform current.
75
+ configuration := platform defaultConfiguration.
76
+ platform initialize
101
77
]
102
78
103
79
{ #category : ' public' }
@@ -134,30 +110,6 @@ Rowan class >> loadedPackagesNamed: someNames [
134
110
^ RwPackageSet withAll: (loadedPackages select: [:each | each notNil])
135
111
]
136
112
137
- { #category : ' public' }
138
- Rowan class >> packageNamed: aName [
139
- " Answer a PackageReference, if the given package name is unique in all registered repositories. If the name resolves 0 or >=2 times, error."
140
-
141
- | token resolutions |
142
- token := ' notFound' .
143
- resolutions := (self knownRepositories
144
- collect: [:repo | repo packageNamed: aName ifAbsent: [token]])
145
- select: [:each | each ~~ token].
146
- resolutions isEmpty ifTrue: [self error: ' Named package not found' ].
147
- resolutions size > 1
148
- ifTrue: [self error: ' Package name is not unique in registered repositories.' ].
149
- ^ resolutions any
150
- ]
151
-
152
- { #category : ' public' }
153
- Rowan class >> packagesNamed: someNames [
154
- " Create a PackageSet by names only, resolved from known repositories"
155
-
156
- | packageRefs |
157
- packageRefs := someNames collect: [:aName | self packageNamed: aName].
158
- ^ RwPackageSet withAll: packageRefs
159
- ]
160
-
161
113
{ #category : ' public tools' }
162
114
Rowan class >> packageTools [
163
115
@@ -188,6 +140,14 @@ Rowan class >> projectNamed: aString ifAbsent: absentBlock [
188
140
^ self image projectNamed: aString ifAbsent: absentBlock
189
141
]
190
142
143
+ { #category : ' public' }
144
+ Rowan class >> projectNames [
145
+
146
+ " Return list of project names"
147
+
148
+ ^ self image projectNames
149
+ ]
150
+
191
151
{ #category : ' public tools' }
192
152
Rowan class >> projectTools [
193
153
0 commit comments