[Pharo-project] PackageOrganizer packages vs. categories

Mariano Martinez Peck marianopeck at gmail.com
Sat Jun 16 06:06:09 EDT 2012


On Sat, Jun 16, 2012 at 5:41 AM, Sean P. DeNigris <sean at clipperadams.com>wrote:

> I was expecting "PackageOrganizer default packageOfClass: FileSystemError"
> to
> return "FileSystem-Core" but it returned "FileSystem-Core-Kernel", which is
> not a package. It's a category, but it's packaged in "FileSystem-Core". Is
> this a bug? Will PackageOrganizer go away when RPackage takes over?
>
>
We have been discussing this with Esteban last Monday. Indeed, there is
something that does not work.
With PackageInfo or whatever (before RPackage) you used to have a package
and categories.
So for example, the *Monticello* *package* Fuel has several *categories*:
Fuel-Clusters, Fuel-Collections, Fuel-Errors, etc.
>From what I can see in RPackage, those *categories* are called
*packages*as well.

So... I can get the RPackage for each of those categories:

(RPackageOrganizer default packageNamed: 'Fuel-Clusters') classes -> ok
(RPackageOrganizer default packageNamed: 'Fuel-Collections') classes -> ok
etc...

The problem is that so far you *cannot* get a RPackage representing a
Monticello package. This is because a Monticello package could be
represented as a *list* of RPackages.
How do I get the classes of the monticello package Fuel?
(RPackageOrganizer default packageNamed: 'Fuel') classes   -> does not work

The problem is that 'Fuel' is considered as an individual RPackage (just as
Fuel-Clusters, Fuel-Collections, etc). This problem is that

MCPackage >> correspondingRPackage

    | symbol |
    symbol := Symbol readFromString: '#', self name.
    ^ RPackageOrganizer default packageNamed: symbol ifAbsent: [ nil ]

answers *one* RPackage where actually should be a list. So for example for
the MCPackage of 'Fuel' I should get a list of all RPackages
(Fuel-Clusters, Fuel-Collections, etc). Then I can do the inject:into or
whatever if I want to ask/calculate sutff (like #classes and
#extensionMethods).

Cheers






> Sean
>
> --
> View this message in context:
> http://forum.world.st/PackageOrganizer-packages-vs-categories-tp4635069.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120616/d090d14b/attachment.html>


More information about the Pharo-dev mailing list