Thanks mariano

in essence what you are saying is that when we depend on a project we have the 
responsibility to define at our level 
the package from which we depend on.

I think that I will add a section on the book chapter.

Stef

On Feb 10, 2013, at 4:40 PM, Mariano Martinez Peck <[email protected]> 
wrote:

> 
> 
> On Sun, Feb 10, 2013 at 12:24 PM, Stéphane Ducasse 
> <[email protected]> wrote:
> Hi dale
> 
> I'm migrating Moose and I got the following question. In terms of granularity 
> of dependency when depending of project.
> 
> Before we had Fame that depended directly on one package of phexample.
> 
> baseline11: spec
>         <version: '1.1-baseline'>
> 
>         spec for: #'common' do: [
>                 spec blessing: #'baseline'.
>                 spec description: 'Baseline 1.1 first version on 
> SmalltalkHub, copied from baseline 1.0 on SqueakSource'.
>                 spec repository: 
> 'http://www.smalltalkhub.com/mc/Moose/Fame/main'.
>                 spec
>                         package: 'Fame-Core';
>                         package: 'Fame-Util';
>                         package: 'Fame-ImportExport' with: [spec requires: 
> #('Fame-Core' ) ];
>                         package: 'Fame-SmalltalkBinding' with: [spec 
> requires: #('Fame-Core' ) ];
>                         package: 'Fame-Example';
>                         package: 'Phexample' with: [spec repository: 
> 'http://www.squeaksource.com/phexample' ];
>                 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
>                         package: 'Fame-Tests-Core' with: [spec requires: 
> #('Fame-Core' 'Fame-Example' 'Phexample' ) ].
>                 spec
>                         group: 'Core' with: #('Fame-Core' 'Fame-ImportExport' 
> 'Fame-Util' 'Fame-SmalltalkBinding' );
>                         group: 'Tests' with: #('Fame-Tests-Core' ) ].
> 
> Stefan created a configuration for PhExample so the Fame baseline now depends 
> on the Phexample project
> 
> baseline12: spec
>         <version: '1.2-baseline'>
> 
>         spec for: #'common' do: [
>                 spec blessing: #'baseline'.
>                 spec description: 'Baseline 1.2 to make explicit that Fame 
> depends on HashTable and Phexample (now on smalltalkHub and with working 
> configurations'.
>                 spec repository: 
> 'http://www.smalltalkhub.com/mc/Moose/Fame/main'.
> 
>                 spec project: 'HashTable' with: [
>                                 spec
>                                         className: 'ConfigurationOfHashTable';
>                                         versionString: #stable;
>                                         repository: 
> 'http://www.smalltalkhub.com/mc/Moose/HashTable/main' ].
> 
>                 spec project: 'Phexample' with: [
>                                 spec
>                                         className: 'ConfigurationOfPhexample';
>                                         versionString: #stable;
>                                         repository: 
> 'http://www.smalltalkhub.com/mc/Phexample/main' ].
> 
> 
> Say you just need the package Core from Phexample (I have just invented the 
> package name) so you can define:
> 
>       spec project: 'PhexampleCore' with: [
>                                 spec
>                                         className: 'ConfigurationOfPhexample';
>                                         versionString: #stable;
>                                             loads: #('Core');
>                                         repository: 
> 'http://www.smalltalkhub.com/mc/Phexample/main' ].
> 
> 
> And then do:
> 
> 'Fame-Tests-Core' with: [spec requires: #('Fame-Core' 'Fame-Example' 
> 'PhexampleCore' ) ].
> 
> Notice all this above this is NOT the same as doing:
> 
>   package: 'Phexample' with: [spec repository: 
> 'http://www.squeaksource.com/phexample' ];
> 
> That way you are just download a package from a repository, Metacello is not 
> involved. So for example if PhexampleCore has dependencies....they are not 
> laoded.
> 
> With the code I pasted above, you don't just download a package from a repo, 
> instead, you say Metacello you depend on a package. And that is managed as 
> metacello. So for example if PhexampleCore has dependencies, they will be 
> loaded and managed.
> 
> Best, 
>  
>                 spec
>                         package: 'Fame-Core' with: [spec requires: 
> 'HashTable'];
>                         package: 'Fame-Util';
>                         package: 'Fame-ImportExport' with: [spec requires: 
> #('Fame-Core' ) ];
>                         package: 'Fame-SmalltalkBinding' with: [spec 
> requires: #('Fame-Core' ) ];
>                         package: 'Fame-Example';
>                         package: 'Fame-Tests-Core' with: [spec requires: 
> #('Fame-Core' 'Fame-Example') ].
>                 spec
>                         group: 'Core' with: #('Fame-Core' 'Fame-ImportExport' 
> 'Fame-Util' 'Fame-SmalltalkBinding' );
>                         group: 'Tests' with: #('Fame-Tests-Core' ) ].
> 
> 
> Now my question
> we got from package: 'Fame-Tests-Core' with: [spec requires: #('Fame-Core' 
> 'Fame-Example' 'Phexample' ) ].
> to a dependency between project and I was wondering if this is ok because may 
> be a project is large and we only
> depend on a small part.
> 
> Then doing so we are also losing the information that this is Fame-Tests-Core 
> that introduces the dependency to PhExample
> and for large project such information can be important
> So is there a way to keep it?
> 
> Stef
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com

Reply via email to