Login  Register

Problems with Metacello

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Problems with Metacello

Stéphane Ducasse
17193 posts
Hi Dale

I have two questions:


first question: className usage in presence of regular package.
-------------------------------------------------------------------------------------------
In the following baseline, I do not understand why I'm forced to specify the className because the configuration
is based on the project name.


spec project: 'OrderPreservingDictionary' with: [
                        spec
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ without className

                                versionString: #stable;
                                loads: #('Core');
                                repository: 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].

does not work

while

spec project: 'OrderPreservingDictionary' with: [
                        spec
                                className: 'ConfigurationOfOrderPreservingDictionary';
                                versionString: #stable;
                                loads: #('Core');
                                repository: 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
Works


baseline200: spec
        <version: '2.0.0-baseline'>

        spec for: #common do: [
                spec
                        blessing: #baseline;
                        description: 'Migrated to SmalltalkHub and taking into account new configurations of subcomponents';
                        repository: 'http://smalltalkhub.com/mc/Pharo/XMLWriter/main'.
                               
                spec project: 'OrderPreservingDictionary' with: [
                        spec
                                className: 'ConfigurationOfOrderPreservingDictionary';
                                versionString: #stable;
                                loads: #('Core');
                                repository: 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
                               
                spec package: 'XML-Writer' with: [spec requires: 'OrderPreservingDictionary'].
                       
                spec
                        group: 'default' with: #('Core');
                        group: 'Core' with: #('XML-Writer');
                        group: 'Tests' with: #() ].


                spec for: #squeakCommon do: [
                        spec package: 'Collections-Support' with: [
                                spec repository: 'http://www.squeaksource.com/Pharo' ] ].


second question
-----------------------

People wrote the following in the baseline


        spec for: #squeakCommon do: [
                        spec package: 'Collections-Support' with: [
                                spec repository: 'http://www.squeaksource.com/Pharo' ] ].

        I commented the squeakCommon part because it was loading an old package in pharo!
        And this package is part of Pharo.
        Now when I comment the version I do not understand why it is still trying to load a package version because there is already a
        version in the image.
       
        I will remove it from the baseline but I do not understand this behavior. Packages present in the image do not take
        precedence?


version200: spec
        <version: '2.0.0' imports: #('2.0.0-baseline')>
        spec
                for: #common
                        do: [ spec
                                        blessing: #release;
                                        package: 'XML-Writer' with: 'XML-Writer-JAAyer.5' ];
               
                " I do not understand the following line because it means that we would load an older version than the one currently in Pharo. Clearly the best way to introduce bugs and losing hours trying to understand why.
                for: #squeakCommon do: [ spec package: 'Collections-Support' with: 'Collections-Support-StephaneDucasse.35' ];"
                for: #gemstone
                        do: [
                                        spec
                                                package: 'Collections-Support' with: 'Collections-Support.g-OttoBehrens.45';
                                                package: 'Collections-Tests-Support' with: 'Collections-Tests-Support.g-OttoBehrens.3' ]


Now I do not understand why it loads a package when the package

Stef


Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Problems with Metacello

stephane ducasse
2664 posts

On Feb 16, 2013, at 10:36 PM, Stéphane Ducasse <[hidden email]> wrote:

> Hi Dale
>
> I have two questions:
>
>
> first question: className usage in presence of regular package.
> -------------------------------------------------------------------------------------------
> In the following baseline, I do not understand why I'm forced to specify the className because the configuration
> is based on the project name.
>
>
> spec project: 'OrderPreservingDictionary' with: [
> spec
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ without className
>
> versionString: #stable;
> loads: #('Core');
> repository: 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
>
> does not work
>
> while
>
> spec project: 'OrderPreservingDictionary' with: [
> spec
> className: 'ConfigurationOfOrderPreservingDictionary';
> versionString: #stable;
> loads: #('Core');
> repository: 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
> Works
>
>
> baseline200: spec
> <version: '2.0.0-baseline'>
>
> spec for: #common do: [
> spec
> blessing: #baseline;
> description: 'Migrated to SmalltalkHub and taking into account new configurations of subcomponents';
> repository: 'http://smalltalkhub.com/mc/Pharo/XMLWriter/main'.
>
> spec project: 'OrderPreservingDictionary' with: [
> spec
> className: 'ConfigurationOfOrderPreservingDictionary';
> versionString: #stable;
> loads: #('Core');
> repository: 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
>
> spec package: 'XML-Writer' with: [spec requires: 'OrderPreservingDictionary'].
>
> spec
> group: 'default' with: #('Core');
> group: 'Core' with: #('XML-Writer');
> group: 'Tests' with: #() ].
>
>
> spec for: #squeakCommon do: [
> spec package: 'Collections-Support' with: [
> spec repository: 'http://www.squeaksource.com/Pharo' ] ].
>
>
> second question
> -----------------------
>
> People wrote the following in the baseline
>
>
> spec for: #squeakCommon do: [
> spec package: 'Collections-Support' with: [
> spec repository: 'http://www.squeaksource.com/Pharo' ] ].
>
> I commented the squeakCommon part because it was loading an old package in pharo!
> And this package is part of Pharo.
> Now when I comment the version I do not understand why it is still trying to load a package version because there is already a
> version in the image.
>
> I will remove it from the baseline but I do not understand this behavior. Packages present in the image do not take
> precedence?


I imagine that this is because they are not saved in the same repository than the one of pharo2.0
I will have a look to see if it changes something.

>
>
> version200: spec
> <version: '2.0.0' imports: #('2.0.0-baseline')>
> spec
> for: #common
> do: [ spec
> blessing: #release;
> package: 'XML-Writer' with: 'XML-Writer-JAAyer.5' ];
>
> " I do not understand the following line because it means that we would load an older version than the one currently in Pharo. Clearly the best way to introduce bugs and losing hours trying to understand why.
> for: #squeakCommon do: [ spec package: 'Collections-Support' with: 'Collections-Support-StephaneDucasse.35' ];"
> for: #gemstone
> do: [
> spec
> package: 'Collections-Support' with: 'Collections-Support.g-OttoBehrens.45';
> package: 'Collections-Tests-Support' with: 'Collections-Tests-Support.g-OttoBehrens.3' ]
>
>
> Now I do not understand why it loads a package when the package
>
> Stef
>
>


Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

spec className?

Stéphane Ducasse
17193 posts
In reply to this post by Stéphane Ducasse
Hi dale


I wrote in the book that we do not need to specify the className when the configurationOf has the same name as the project
but I experienced a problem that I could not solve by specifying a className

Is it something known?

Stef

Begin forwarded message:

first question: className usage in presence of regular package.
-------------------------------------------------------------------------------------------
In the following baseline, I do not understand why I'm forced to specify the className because the configuration 
is based on the project name.


spec project: 'OrderPreservingDictionary' with: [
spec 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ without className

versionString: #stable; 
loads: #('Core'); 
repository: '<a href="http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main']" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].

does not work 

while

spec project: 'OrderPreservingDictionary' with: [
spec 
className: 'ConfigurationOfOrderPreservingDictionary';
versionString: #stable; 
loads: #('Core'); 
repository: '<a href="http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main']" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
Works


baseline200: spec
<version: '2.0.0-baseline'>

spec for: #common do: [ 
spec
blessing: #baseline;
description: 'Migrated to SmalltalkHub and taking into account new configurations of subcomponents';
repository: 'http://smalltalkhub.com/mc/Pharo/XMLWriter/main'.

spec project: 'OrderPreservingDictionary' with: [
spec 
className: 'ConfigurationOfOrderPreservingDictionary';
versionString: #stable; 
loads: #('Core'); 
repository: '<a href="http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main']" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].

spec package: 'XML-Writer' with: [spec requires: 'OrderPreservingDictionary']. 

spec
group: 'default' with: #('Core');
group: 'Core' with: #('XML-Writer');
group: 'Tests' with: #() ].


spec for: #squeakCommon do: [ 
spec package: 'Collections-Support' with: [ 
spec repository: 'http://www.squeaksource.com/Pharo' ] ].

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: spec className?

Dale Henrichs
3217 posts
Stef,

The className: message will be optional with the release of the Metacello scripting API ... so it _is_ planned.

Dale

----- Original Message -----
| From: "Stéphane Ducasse" <[hidden email]>
| To: "Dale Henrichs" <[hidden email]>
| Cc: "[hidden email] Development" <[hidden email]>
| Sent: Wednesday, February 20, 2013 12:03:04 PM
| Subject: spec className?
|
| Hi dale
|
|
| I wrote in the book that we do not need to specify the className when the
| configurationOf has the same name as the project
| but I experienced a problem that I could not solve by specifying a className
|
| Is it something known?
|
| Stef
|
| Begin forwarded message:
|
| > first question: className usage in presence of regular package.
| > -------------------------------------------------------------------------------------------
| > In the following baseline, I do not understand why I'm forced to specify
| > the className because the configuration
| > is based on the project name.
| >
| >
| > spec project: 'OrderPreservingDictionary' with: [
| > spec
| > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ without className
| >
| > versionString: #stable;
| > loads: #('Core');
| > repository:
| > 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
| >
| > does not work
| >
| > while
| >
| > spec project: 'OrderPreservingDictionary' with: [
| > spec
| > className: 'ConfigurationOfOrderPreservingDictionary';
| > versionString: #stable;
| > loads: #('Core');
| > repository:
| > 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
| > Works
| >
| >
| > baseline200: spec
| > <version: '2.0.0-baseline'>
| >
| > spec for: #common do: [
| > spec
| > blessing: #baseline;
| > description: 'Migrated to SmalltalkHub and taking into account new
| > configurations of subcomponents';
| > repository: 'http://smalltalkhub.com/mc/Pharo/XMLWriter/main'.
| >
| > spec project: 'OrderPreservingDictionary' with: [
| > spec
| > className: 'ConfigurationOfOrderPreservingDictionary';
| > versionString: #stable;
| > loads: #('Core');
| > repository:
| > 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
| >
| > spec package: 'XML-Writer' with: [spec requires:
| > 'OrderPreservingDictionary'].
| >
| > spec
| > group: 'default' with: #('Core');
| > group: 'Core' with: #('XML-Writer');
| > group: 'Tests' with: #() ].
| >
| >
| > spec for: #squeakCommon do: [
| > spec package: 'Collections-Support' with: [
| > spec repository: 'http://www.squeaksource.com/Pharo' ] ].
|
|

Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: spec className?

stephane ducasse
2664 posts

On Feb 20, 2013, at 11:16 PM, Dale Henrichs <[hidden email]> wrote:

> Stef,
>
> The className: message will be optional with the release of the Metacello scripting API ... so it _is_ planned.

Ok I thought it was. Good to know because I spent hours before I tried to add it.
But this is strange because I have the impression that I used it in some configurations.

Stef

> Dale
>
> ----- Original Message -----
> | From: "Stéphane Ducasse" <[hidden email]>
> | To: "Dale Henrichs" <[hidden email]>
> | Cc: "[hidden email] Development" <[hidden email]>
> | Sent: Wednesday, February 20, 2013 12:03:04 PM
> | Subject: spec className?
> |
> | Hi dale
> |
> |
> | I wrote in the book that we do not need to specify the className when the
> | configurationOf has the same name as the project
> | but I experienced a problem that I could not solve by specifying a className
> |
> | Is it something known?
> |
> | Stef
> |
> | Begin forwarded message:
> |
> | > first question: className usage in presence of regular package.
> | > -------------------------------------------------------------------------------------------
> | > In the following baseline, I do not understand why I'm forced to specify
> | > the className because the configuration
> | > is based on the project name.
> | >
> | >
> | > spec project: 'OrderPreservingDictionary' with: [
> | > spec
> | > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ without className
> | >
> | > versionString: #stable;
> | > loads: #('Core');
> | > repository:
> | > 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
> | >
> | > does not work
> | >
> | > while
> | >
> | > spec project: 'OrderPreservingDictionary' with: [
> | > spec
> | > className: 'ConfigurationOfOrderPreservingDictionary';
> | > versionString: #stable;
> | > loads: #('Core');
> | > repository:
> | > 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
> | > Works
> | >
> | >
> | > baseline200: spec
> | > <version: '2.0.0-baseline'>
> | >
> | > spec for: #common do: [
> | > spec
> | > blessing: #baseline;
> | > description: 'Migrated to SmalltalkHub and taking into account new
> | > configurations of subcomponents';
> | > repository: 'http://smalltalkhub.com/mc/Pharo/XMLWriter/main'.
> | >
> | > spec project: 'OrderPreservingDictionary' with: [
> | > spec
> | > className: 'ConfigurationOfOrderPreservingDictionary';
> | > versionString: #stable;
> | > loads: #('Core');
> | > repository:
> | > 'http://smalltalkhub.com/mc/Pharo/OrderPreservingDictionary/main'].
> | >
> | > spec package: 'XML-Writer' with: [spec requires:
> | > 'OrderPreservingDictionary'].
> | >
> | > spec
> | > group: 'default' with: #('Core');
> | > group: 'Core' with: #('XML-Writer');
> | > group: 'Tests' with: #() ].
> | >
> | >
> | > spec for: #squeakCommon do: [
> | > spec package: 'Collections-Support' with: [
> | > spec repository: 'http://www.squeaksource.com/Pharo' ] ].
> |
> |