about Metacello package loading order

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

about Metacello package loading order

Usman Bhatti
I have a configuration as follows :

spec for: #common do: [
"a class in package BBB inherits from a class in package AAA"
spec 
package: 'AAA';
        package: 'BBB' with: [spec requires:  'AAA']
].

Now, when I try to load this configuration, it fails to properly load the package BBB (there are some missing classes) with this msg:

This package depends on the following classes:

  A class in package AAA

You must resolve these dependencies before you will be able to load these definitions: A class in package BBB.

It seems that there is a way to load packages in a linear order (http://code.google.com/p/metacello/wiki/FAQ#Controlling_Package_Initialization_Order). However, my project defaults is already set to linear and after reading this post my problem is not resolved. 

Can anyone help me how I can enforce package AAA to load before BBB?

tx,

usman

Reply | Threaded
Open this post in threaded view
|

Re: about Metacello package loading order

Stéphane Ducasse
it should work. I have many examples of such a situation and it works.
Did you try to get (chef the metacello chapter) the list of packages that we will be loaded.


((ConfigurationOfCoolBrowser project version: '0.2') record:
  { 'CoolBrowser-Core' .
                'CoolBrowser-Addons' }) loadDirective


Stef


On Oct 14, 2012, at 8:25 PM, Usman Bhatti wrote:

> I have a configuration as follows :
>
> spec for: #common do: [
> "a class in package BBB inherits from a class in package AAA"
> spec
> package: 'AAA';
>         package: 'BBB' with: [spec requires:  'AAA']
> ].
> Now, when I try to load this configuration, it fails to properly load the package BBB (there are some missing classes) with this msg:
>
> This package depends on the following classes:
>
>   A class in package AAA
>
> You must resolve these dependencies before you will be able to load these definitions: A class in package BBB.
>
> It seems that there is a way to load packages in a linear order (http://code.google.com/p/metacello/wiki/FAQ#Controlling_Package_Initialization_Order). However, my project defaults is already set to linear and after reading this post my problem is not resolved.
>
> Can anyone help me how I can enforce package AAA to load before BBB?
>
> tx,
>
> usman
>


Reply | Threaded
Open this post in threaded view
|

Re: about Metacello package loading order

Igor Stasenko
In reply to this post by Usman Bhatti
On 14 October 2012 20:25, Usman Bhatti <[hidden email]> wrote:

> I have a configuration as follows :
>
> spec for: #common do: [
> "a class in package BBB inherits from a class in package AAA"
> spec
> package: 'AAA';
>         package: 'BBB' with: [spec requires:  'AAA']
> ].
>
> Now, when I try to load this configuration, it fails to properly load the
> package BBB (there are some missing classes) with this msg:
>
> This package depends on the following classes:
>
>   A class in package AAA
>
> You must resolve these dependencies before you will be able to load these
> definitions: A class in package BBB.
>
> It seems that there is a way to load packages in a linear order
> (http://code.google.com/p/metacello/wiki/FAQ#Controlling_Package_Initialization_Order).
> However, my project defaults is already set to linear and after reading this
> post my problem is not resolved.
>
> Can anyone help me how I can enforce package AAA to load before BBB?
>

That should not happen. Unless you doing something wrong.
 It looks like a bug in metacello.

> tx,
>
> usman



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: about Metacello package loading order

Stéphane Ducasse
In reply to this post by Usman Bhatti
usman

can you provide to me the link (privately if you need).

Stef

On Oct 14, 2012, at 8:25 PM, Usman Bhatti wrote:

> I have a configuration as follows :
>
> spec for: #common do: [
> "a class in package BBB inherits from a class in package AAA"
> spec
> package: 'AAA';
>         package: 'BBB' with: [spec requires:  'AAA']
> ].
> Now, when I try to load this configuration, it fails to properly load the package BBB (there are some missing classes) with this msg:
>
> This package depends on the following classes:
>
>   A class in package AAA
>
> You must resolve these dependencies before you will be able to load these definitions: A class in package BBB.
>
> It seems that there is a way to load packages in a linear order (http://code.google.com/p/metacello/wiki/FAQ#Controlling_Package_Initialization_Order). However, my project defaults is already set to linear and after reading this post my problem is not resolved.
>
> Can anyone help me how I can enforce package AAA to load before BBB?
>
> tx,
>
> usman
>


Reply | Threaded
Open this post in threaded view
|

Re: about Metacello package loading order

Mariano Martinez Peck
In reply to this post by Usman Bhatti


On Sun, Oct 14, 2012 at 8:25 PM, Usman Bhatti <[hidden email]> wrote:
I have a configuration as follows :

spec for: #common do: [
"a class in package BBB inherits from a class in package AAA"
spec 
package: 'AAA';
        package: 'BBB' with: [spec requires:  'AAA']
].


As Stef said, it should work. I don't see anything weird.
Try to PRINT (as Stef said) the result of doing a #record instead of a #load and see what is being load and in which order.
 

Now, when I try to load this configuration, it fails to properly load the package BBB (there are some missing classes) with this msg:

This package depends on the following classes:

  A class in package AAA

You must resolve these dependencies before you will be able to load these definitions: A class in package BBB.

It seems that there is a way to load packages in a linear order (http://code.google.com/p/metacello/wiki/FAQ#Controlling_Package_Initialization_Order). However, my project defaults is already set to linear and after reading this post my problem is not resolved. 

Can anyone help me how I can enforce package AAA to load before BBB?

tx,

usman




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: about Metacello package loading order

Usman Bhatti
The problem was resolved. Thanks to Stef and Marianno for their effort to look at the code. 
The package was actually loaded in two configurations and I was not calling requires: in all locations (duplicate code is bad even in configuration ;-). So, a bit of cleanup resolved the problem. 

Good thing is that now I know about this directive that helps debugging package loading.

((ConfigurationOfMantisDemo loadDev)
 record) loadDirective.

usman
On Sun, Oct 14, 2012 at 10:04 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Sun, Oct 14, 2012 at 8:25 PM, Usman Bhatti <[hidden email]> wrote:
I have a configuration as follows :

spec for: #common do: [
"a class in package BBB inherits from a class in package AAA"
spec 
package: 'AAA';
        package: 'BBB' with: [spec requires:  'AAA']
].


As Stef said, it should work. I don't see anything weird.
Try to PRINT (as Stef said) the result of doing a #record instead of a #load and see what is being load and in which order.
 

Now, when I try to load this configuration, it fails to properly load the package BBB (there are some missing classes) with this msg:

This package depends on the following classes:

  A class in package AAA

You must resolve these dependencies before you will be able to load these definitions: A class in package BBB.

It seems that there is a way to load packages in a linear order (http://code.google.com/p/metacello/wiki/FAQ#Controlling_Package_Initialization_Order). However, my project defaults is already set to linear and after reading this post my problem is not resolved. 

Can anyone help me how I can enforce package AAA to load before BBB?

tx,

usman




--
Mariano
http://marianopeck.wordpress.com


Reply | Threaded
Open this post in threaded view
|

Re: about Metacello package loading order

LogiqueWerks
and thanks very much for posting your update - and with the summary on
that directive

I believe that many experienced people see config and build/strip and
'base image' issues as the real challenges to Smalltalk in industrial
settings ( the success stories may fail to reveal the pain that was
endured - the usual caveat)

( even if back in the day the IT pundits carried on about memory
footprint, bytecode and VM, not 'C' compiler, so why not LISP
yada-yada )

Native widgets, 3D and all the jQuirky web-tricks pale when a mission
critical app gets attention from top brass in a corporation because of
a bad build or a config snaffu that "would never happen" if we used {
here read Erlang, Gnu D or whatever )

What is not seen is the utter madness of trying to get an Eclipse
config that is correct (useable code can be committed to a repo from
that workspace) when arriving on any large team Java project running
on Eclipse in a corporate setting where there is new work, custom work
and maintenance. Not that getting started with an appropriate build
does not take more than 5 business days often enough .... ( a scandal,
yes, but it just keeps repeating - as any gray-haired St contractor
can tell you ... )

The 'C' and 'C++' myth as you surely know is called "configure-make"
... If anything like this had been required to land 747's at Hong Kong
Kai-tak a lot of people would have been crossing the Pacific in ships
and clipper ships ;-) ... and forget about that cardiac bypass surgery
at Cleveland Clinic. ( see redundancy and reliability in gauges vs CRM
in the cockpit - and some tower controllers in the past who would be
advising you that your gear were, in fact, down ;-)

Thankfully, the typical Chevy or Toyoto mechanic does not have to do a
build to get your car back to you with new or adjusted brakes ;-)  (
yes, ABS - and the Smalltalk analog being ... )  Someone should tell
the Adobe FLASH team ... NOT. I would go on, but I have to update my
Adobe Reader ...

thanks again

Sent with neither Adobe AIR not Microsoft SilverLight on the box - and
after only one re-boot fo a DLL update ;-)

" Now let's reset JAVA_HOME to point at 1.4.4299 so that I can get
this Ruby Gem to install  ! "

R
no PCRE used to spell check the above rant
no devotee to Scala or Clojure should reply with a flame on this list
: if you think you are here, you are actually lost in a Feedax Cessna
Caravan at dusk in a UT box canyon at low altitude and high airspeed
with BINGO fuel and a Ctr of Lift a bit too near or sliding behind
your C of G and now he asks "Was it you who tied down the freight or
was it me ?"