Packing prerequisite missing loose method.

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

Packing prerequisite missing loose method.

Howard Oh
In my Dolphin 4, packaging some classes in a pac file,

I found out that the prerequisite tracking feature of Package Manager
is not fully trustable.

The problem class is my "Complex", a class that deals with complex
number as a subclass of Number.

Complex>>cosh , reads "hyperbolic cosine" , is defined as can be found
in a text book.

cosh

                  ^Complex
                real: self real cosh * self imaginary cos
                imaginary: self real sinh * self imaginary sin




which requires Number>>cosh, and Number>>sinh that Pure Dolphin image
does not have.

So I had to write them in my other package called "HwaJongOh.pac"

Number>>cosh "loose method"

        ^(self exp + self negated exp)/2



I was very expecting to find "HwaJongOh.pac" in the "show
prerequisites" shell, but there was not. I guess it's because, #cosh is
also defined in the "Complex" package , so the PackageManager thinks
that HwajongOh.pac is not required.


I went into a very obvious test.
Installed the "Complex.pac" package into a pure dolphin image, and then
evaluated the #cosh method. ERROR

Regards


Reply | Threaded
Open this post in threaded view
|

Re: Packing prerequisite missing loose method.

Chris Uppal-3
Howard Oh wrote:

> I was very expecting to find "HwaJongOh.pac" in the "show
> prerequisites" shell, but there was not. I guess it's because, #cosh is
> also defined in the "Complex" package , so the PackageManager thinks
> that HwajongOh.pac is not required.

No.  It's because the automatic dependency discovery does /not/ try to follow
method definitions.  So if one of your packages refers to #cosh, the automatic
dependency discovery will /not/ infer that that package has a dependency on
whatever package (or packages) define methods called #cosh.

You can add explicit dependencies between packages, but I can't remember if
that feature was available in D4.  If it is, then it can be found by viewing
the package properties (context menu of the package list in the package
browser) and then drilling down until you find "manual dependencies".

    -- chris