Configuration Madness

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

Configuration Madness

roberto.minelli@usi.ch
Dear all,

I have a question about the ConfigurationOf my project, and I really hope you can help.

In my project I have a package called ‘DevFlow-Extensions’ that is a “placeholder” for code that is dependent on the Pharo version.

On the ConfigurationOf, according to the Pharo version I do something like

spec for: #'pharo3.x'
                do: [

                        spec blessing: #baseline.
                        spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
                       
                        spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions30'.
        ].

spec for: #'pharo4.x'
                do: [

                        spec blessing: #baseline.
                        spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
                       
                        spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions40'.
        ].

In this way, in Pharo 3.0 I’d load DevFlow-Extensions30 and in Pharo 4.0 I’d load DevFlow-Extensions40. Super cool.
I am using a single package (‘DevFlow-Extensions’) to specify of groups, for example:

spec group: 'User' with: #(
                'DevFlow-Meta'
                ...
                'DevFlow-Announcement'
                'DevFlow-Extensions').

Now the problem is that for Pharo 5 I have to load both 'DevFlow-Extensions40’ and 'DevFlow-Extensions50’.
I read the chapter on Metacello, but didn’t find a solution. I tried some combinations of #includes: and #requires: but with no luck.

Any help is appreciated, thank you very much!

Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Configuration Madness

Max Leske

> On 16 Sep 2015, at 16:39, [hidden email] wrote:
>
> Dear all,
>
> I have a question about the ConfigurationOf my project, and I really hope you can help.
>
> In my project I have a package called ‘DevFlow-Extensions’ that is a “placeholder” for code that is dependent on the Pharo version.
>
> On the ConfigurationOf, according to the Pharo version I do something like
>
> spec for: #'pharo3.x'
> do: [
>
> spec blessing: #baseline.
> spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
>
> spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions30'.
> ].
>
> spec for: #'pharo4.x'
> do: [
>
> spec blessing: #baseline.
> spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
>
> spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions40'.
> ].
>
> In this way, in Pharo 3.0 I’d load DevFlow-Extensions30 and in Pharo 4.0 I’d load DevFlow-Extensions40. Super cool.
> I am using a single package (‘DevFlow-Extensions’) to specify of groups, for example:
>
> spec group: 'User' with: #(
> 'DevFlow-Meta'
> ...
> 'DevFlow-Announcement'
> 'DevFlow-Extensions').
>
> Now the problem is that for Pharo 5 I have to load both 'DevFlow-Extensions40’ and 'DevFlow-Extensions50’.
> I read the chapter on Metacello, but didn’t find a solution. I tried some combinations of #includes: and #requires: but with no luck.
>
> Any help is appreciated, thank you very much!
>
> Roberto

Shouldn’t this work?

spec package: 'DevFlow-Extensions' with: #('DevFlow-Extensions40’ ‘DevFlow-Extensions50).



Reply | Threaded
Open this post in threaded view
|

Re: Configuration Madness

Dale Henrichs-3


On 9/16/15 8:07 AM, Max Leske wrote:

>> On 16 Sep 2015, at 16:39, [hidden email] wrote:
>>
>> Dear all,
>>
>> I have a question about the ConfigurationOf my project, and I really hope you can help.
>>
>> In my project I have a package called ‘DevFlow-Extensions’ that is a “placeholder” for code that is dependent on the Pharo version.
>>
>> On the ConfigurationOf, according to the Pharo version I do something like
>>
>> spec for: #'pharo3.x'
>> do: [
>>
>> spec blessing: #baseline.
>> spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
>>
>> spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions30'.
>> ].
>>
>> spec for: #'pharo4.x'
>> do: [
>>
>> spec blessing: #baseline.
>> spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
>>
>> spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions40'.
>> ].
>>
>> In this way, in Pharo 3.0 I’d load DevFlow-Extensions30 and in Pharo 4.0 I’d load DevFlow-Extensions40. Super cool.
>> I am using a single package (‘DevFlow-Extensions’) to specify of groups, for example:
>>
>> spec group: 'User' with: #(
>> 'DevFlow-Meta'
>> ...
>> 'DevFlow-Announcement'
>> 'DevFlow-Extensions').
>>
>> Now the problem is that for Pharo 5 I have to load both 'DevFlow-Extensions40’ and 'DevFlow-Extensions50’.
>> I read the chapter on Metacello, but didn’t find a solution. I tried some combinations of #includes: and #requires: but with no luck.
>>
>> Any help is appreciated, thank you very much!
>>
>> Roberto
> Shouldn’t this work?
>
> spec package: 'DevFlow-Extensions' with: #('DevFlow-Extensions40’ ‘DevFlow-Extensions50).
>
>
>
Good idea, but it's not quite correct, I think this will work:

spec for: #'pharo5.x'
   do: [
     spec package: 'DevFlow-Extensions40' .
     spec package: 'DevFlow-Extensions50' .
     spec group: 'DevFlow-Extensions' with: #('DevFlow-Extensions40’ ‘DevFlow-Extensions50) ].


Dale

Reply | Threaded
Open this post in threaded view
|

Re: Configuration Madness

roberto.minelli@usi.ch
Thanks a lot Dale, this works indeed.

P.s. Sorry for the delay in the answer but my mailbox went crazy!

R


> On 16 Sep 2015, at 17:43, Dale Henrichs <[hidden email]> wrote:
>
>
>
> On 9/16/15 8:07 AM, Max Leske wrote:
>>> On 16 Sep 2015, at 16:39, [hidden email] wrote:
>>>
>>> Dear all,
>>>
>>> I have a question about the ConfigurationOf my project, and I really hope you can help.
>>>
>>> In my project I have a package called ‘DevFlow-Extensions’ that is a “placeholder” for code that is dependent on the Pharo version.
>>>
>>> On the ConfigurationOf, according to the Pharo version I do something like
>>>
>>> spec for: #'pharo3.x'
>>> do: [
>>>
>>> spec blessing: #baseline.
>>> spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
>>>
>>> spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions30'.
>>> ].
>>>
>>> spec for: #'pharo4.x'
>>> do: [
>>>
>>> spec blessing: #baseline.
>>> spec repository: 'http://smalltalkhub.com/mc/RobertoMinelli/DevFlow/main'.
>>>
>>> spec package: 'DevFlow-Extensions' with: 'DevFlow-Extensions40'.
>>> ].
>>>
>>> In this way, in Pharo 3.0 I’d load DevFlow-Extensions30 and in Pharo 4.0 I’d load DevFlow-Extensions40. Super cool.
>>> I am using a single package (‘DevFlow-Extensions’) to specify of groups, for example:
>>>
>>> spec group: 'User' with: #(
>>> 'DevFlow-Meta'
>>> ...
>>> 'DevFlow-Announcement'
>>> 'DevFlow-Extensions').
>>>
>>> Now the problem is that for Pharo 5 I have to load both 'DevFlow-Extensions40’ and 'DevFlow-Extensions50’.
>>> I read the chapter on Metacello, but didn’t find a solution. I tried some combinations of #includes: and #requires: but with no luck.
>>>
>>> Any help is appreciated, thank you very much!
>>>
>>> Roberto
>> Shouldn’t this work?
>>
>> spec package: 'DevFlow-Extensions' with: #('DevFlow-Extensions40’ ‘DevFlow-Extensions50).
>>
>>
>>
> Good idea, but it's not quite correct, I think this will work:
>
> spec for: #'pharo5.x'
>  do: [
>    spec package: 'DevFlow-Extensions40' .
>    spec package: 'DevFlow-Extensions50' .
>    spec group: 'DevFlow-Extensions' with: #('DevFlow-Extensions40’ ‘DevFlow-Extensions50) ].
>
>
> Dale
>