why doesn't this baseline load any package when included in another baseline?

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

why doesn't this baseline load any package when included in another baseline?

Paul DeBruicker
Hi -

In this repo

MCHttpRepository
    location: 'http://www.squeaksource.com/TimeZoneDatabase'
    user: ''
    password: ''


There is the BaselineOfTimeZoneDatabase

If in a Pharo7 playground I run

Metacello new
        baseline: 'TimeZoneDatabase';
        repository: 'http://www.squeaksource.com/TimeZoneDatabase';
        load

It loads into the image fine and seems to work.

If I include it in another project like this
       
        ...
        spec baseline: 'TimeZoneDatabase'
                        with: [ spec repository: 'http://www.squeaksource.com/TimeZoneDatabase' ].
        spec package: 'MyPackage'
                        with:[ spec requires: #('DependencyA' 'DependencyB' 'DependencyC' 'DependencyD' 'TimeZoneDatabase')]
        spec group:'default' with:'MyPackage'.


and load that project into a different, clean Pharo 7 image with


Metacello new
        baseline: 'MyProject';
        repository: '/my/pharo/packages/';
        load: 'default'

Then none of the TimeZoneDatabase packages are loaded and only the postLoadDoIt from the BaselineOfTimeZoneDatabase is called.  


(The other dependencies aren't loaded either but I figured to just use this TimeZoneDatabase as an example for this email).  





In the BaselineOfTimeZoneDatabase the #baseline: method is

baseline: spec
        <baseline>
        spec
                for: #common
                do: [ spec postLoadDoIt: #buildSystemDatabase.
                        spec package: 'Time'.
                        spec group: 'Core' with: #('default') ].
        spec
                for: #squeak
                do: [ spec
                                package: 'TimeZoneDatabase-Squeak'
                                with: [ spec requires: #('Time') ].
                        spec group: 'default' with: #('TimeZoneDatabase-Squeak') ].
        spec
                for: #pharo
                do: [ spec
                                package: 'TimeZoneDatabasePharoPreload';
                                package: 'Time'
                                        with: [ spec requires: #('TimeZoneDatabasePharoPreload') ];
                                package: 'TimeZoneDatabase-Pharo'
                                        with: [ spec requires: #('Time') ].
                        spec group: 'default' with: #('TimeZoneDatabase-Pharo') ]





I'm clearly doing something wrong but don't know what.  Any ideas on what to change or try next?



Thanks

Paul
Reply | Threaded
Open this post in threaded view
|

Re: why doesn't this baseline load any package when included in another baseline?

Pierce Ng-3
On Sun, Feb 03, 2019 at 01:41:30PM -0800, PAUL DEBRUICKER wrote:
> MCHttpRepository
>     location: 'http://www.squeaksource.com/TimeZoneDatabase'

Hi Paul,

I see that there is a ConfigurationOfTimeZoneDatabase in the SS repo as
well.

> spec baseline: 'TimeZoneDatabase'
> with: [ spec repository: 'http://www.squeaksource.com/TimeZoneDatabase' ].

In your BaselineOfYourProject that is citing TimeZoneDatabase as a
dependency, you could try loading ConfigOfTimeZoneDatabase instead:

    spec project: 'TimeZoneDatabase' with: [
       spec
         className: 'ConfigurationOfTimeZoneDatabase';
         version: #stable;
         repository: 'http://www.squeaksource.com/TimeZoneDatabase' ].

This is known working in my BaselineOfGlorpSQLite which loads ConfigurationOfUDBC
from STH.

Pierce


Reply | Threaded
Open this post in threaded view
|

Re: why doesn't this baseline load any package when included in another baseline?

Paul DeBruicker
Thanks Pierce

Turns out my problem seems to have been from using a #cacheRepository: send
in the Metacello load instruction.  

e.g. when I do a

Metacello new
    baseline:'MyProject';
    repository:'/my/path/';
    cacheRepository: '/my/cache';
    load

Then the packages aren't loaded but if I do a

Metacello new
    baseline:'MyProject';
    repository:'/my/path/';
    load


then everything is loaded.  The cache directory already has the packages in
it, from another load into another image in pharo 6.  So I'll try to learn
what that cacheRepository: send is doing that I don't expect.



thanks for looking into this.


Paul



Pierce Ng-3 wrote

> On Sun, Feb 03, 2019 at 01:41:30PM -0800, PAUL DEBRUICKER wrote:
>> MCHttpRepository
>>     location: 'http://www.squeaksource.com/TimeZoneDatabase'
>
> Hi Paul,
>
> I see that there is a ConfigurationOfTimeZoneDatabase in the SS repo as
> well.
>
>> spec baseline: 'TimeZoneDatabase'
>> with: [ spec repository:
>> 'http://www.squeaksource.com/TimeZoneDatabase' ].
>
> In your BaselineOfYourProject that is citing TimeZoneDatabase as a
> dependency, you could try loading ConfigOfTimeZoneDatabase instead:
>
>     spec project: 'TimeZoneDatabase' with: [
>        spec
>          className: 'ConfigurationOfTimeZoneDatabase';
>          version: #stable;
>          repository: 'http://www.squeaksource.com/TimeZoneDatabase' ].
>
> This is known working in my BaselineOfGlorpSQLite which loads
> ConfigurationOfUDBC
> from STH.
>
> Pierce





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: why doesn't this baseline load any package when included in another baseline?

Paul DeBruicker
There's already an issue on GH. So thats good.  

https://github.com/Metacello/metacello/issues/400



Paul DeBruicker wrote
> Thanks Pierce
>
> Turns out my problem seems to have been from using a #cacheRepository:
> send
> in the Metacello load instruction.  





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html