potential problem with category and package name

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

potential problem with category and package name

stepharo
I think that this kind of code should break
when category = packageName+tag and packageName = packageName

ofPackageNamed: aPackageName
     | builder |
     builder := self new.
     self allManifestClasses
         detect: [ :each | each category = aPackageName ]
         ifFound: [ :manifestClass | builder manifestClass: manifestClass ]
         ifNone: [ builder createManifestNamed: aPackageName ].
     ^ builder

What do you think?
Stef

Reply | Threaded
Open this post in threaded view
|

Re: potential problem with category and package name

Thierry Goubier
Le 04/06/2015 20:57, stepharo a écrit :

> I think that this kind of code should break
> when category = packageName+tag and packageName = packageName
>
> ofPackageNamed: aPackageName
>      | builder |
>      builder := self new.
>      self allManifestClasses
>          detect: [ :each | each category = aPackageName ]
>          ifFound: [ :manifestClass | builder manifestClass: manifestClass ]
>          ifNone: [ builder createManifestNamed: aPackageName ].
>      ^ builder
>
> What do you think?

No, that code is OK. tags are optional.

Here, the manifest will appear as the package level, and not hidden in
one of the tags.

(in short, category linked to packageName is, as a RE,
category = packageName.* , that is all categories starting with
packageName, including packageName itself)

Thierry

> Stef
>
>
>