-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Error running Cypress package boilerplate for topaz:
topaz 1> doit
| packageName |
packageName := 'Cypress-GemStoneCompatibilityLayer'.
System myUserProfile symbolList do: [:symDict |
symDict do: [:possibleClass |
| toRemove |
possibleClass isBehavior ifTrue: [
{possibleClass. possibleClass class} do: [:aClass |
aClass category = packageName
ifTrue: [
"*anythingbutpackagename[-anything]"
toRemove := aClass categoryNames select:
[:each |
(each first = $* and: [(each size = (packageName size + 1) and: [(each findStringNoCase: packageName startingAt: 2) = 2])
or: [each size > (packageName size + 1) and: [(each findStringNoCase: packageName startingAt: 2) = 2 and: [(each at: packageName size + 2) = $-]]]])
or: [each first ~= $*]]
]
ifFalse: [
"*packagename[-anything]"
toRemove := aClass categoryNames select:
[:each |
each first = $* and: [(each size = (packageName size + 1) and: [(each findStringNoCase: packageName startingAt: 2) = 2])
or: [each size > (packageName size + 1) and: [(each findStringNoCase: packageName startingAt: 2) = 2 and: [(each at: packageName size + 2) = $-]]]]]
].
toRemove do: [:each | aClass removeCategory: each].
]
]
]
].
true.
%
ERROR 2019 , a ImproperOperation occurred (error 2019), reason:objErrCollectionEmpty, An attempt was made to access elements of the empty collection #''. (ImproperOperation)
From code inspection it looks like we need to protect the senders of `#first':
aClass categoryNames select:
[:each |
each first = $* ...
to something like this:
aClass categoryNames select:
[:each |
each isEmpty not and: [each first = $* ...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels