Package depending on the OS ?

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

Re: Package depending on the OS ?

Sean DeNigris
You can do: for: #( #'squeak4.1.x' #'squeak4.2.x' #'squeak4.3.x' ) do: [..] 
Thanks. I was hoping for something that avoids changing the baseline every time a new platform version is released e.g. >=squeak4.x

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Package depending on the OS ?

Dale Henrichs-3
In reply to this post by Tobias Pape-3
Sean,

What Tobias suggests is the way it is done today ... I am still trying
to avoid relying on Smalltalk code to specify baselines --- it's a
security risk to have to execute smalltalk code in order to figure out
what packages are needed for download/load, so I prefer to use Smalltalk
literals for the configuration specification ... just imagine that the
configuration/baseline is specified using STON.

I am willing to consider variations on this theme:

   spec for: #'squeak4.[1-3].x' do: [...]

or:

   for: #'squeak4.*.x' do: [...]

or:

   ???


Dale




On 02/22/2018 10:00 AM, Tobias Pape wrote:

> Hi Sean
>
>> On 22.02.2018, at 17:01, Sean DeNigris <[hidden email]> wrote:
>>
>> On Sunday, May 16, 2010 at 10:46:26 AM UTC-4, Sean DeNigris wrote:
>> This may be totally out of nowhere, but could for:do: take a block?
>> In other words, instead of being restricted to for: #squeak do:, one
>> could say:
>>
>> for: [ spec squeak version: '4.0' to: '4.1' ] do: [...]
>>
>> Another thought is allow a simple regex - maybe use 'x' as 'anything
>> for this part of the version'
>>   I know this is a super old thread, but… did we ever add anything to the API to specify a range of platform versions? It would be useful to say "Pharo 5+" because w/o that it seems that Configs/Baselines have to be updated after each new platform release, even if nothing has changed…
> You can do:
>
> for: #( #'squeak4.1.x' #'squeak4.2.x' #'squeak4.3.x' ) do: [..]
>
> it's rather verbose but works! :)
>
> Best regards
> -Tobias
>
>
>> --
>> You received this message because you are subscribed to the Google Groups "Metacello" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Package depending on the OS ?

Tobias Pape-3

> On 23.02.2018, at 15:02, Dale Henrichs <[hidden email]> wrote:
>
> Sean,
>
> What Tobias suggests is the way it is done today ... I am still trying to avoid relying on Smalltalk code to specify baselines --- it's a security risk to have to execute smalltalk code in order to figure out what packages are needed for download/load, so I prefer to use Smalltalk literals for the configuration specification ... just imagine that the configuration/baseline is specified using STON.
>
> I am willing to consider variations on this theme:
>
>   spec for: #'squeak4.[1-3].x' do: [...]
>
> or:
>
>   for: #'squeak4.*.x' do: [...]
>
> or:
>
>   ???
>

while it is cumbersome, the current variant makes sure that we actually touch the baselines when new Platform versions emerge.
I think this is a plus and helps avoiding bit rot.

An override system would help to test on new platform versions.
So one could easily say,
 - I am on version Y
 - load as if I were on version X
If that works, add version Y to the list, if not, you need a new #for:do: in any case…

Best regards
        -Tobias


>
> Dale
>
>
>
>
> On 02/22/2018 10:00 AM, Tobias Pape wrote:
>> Hi Sean
>>
>>> On 22.02.2018, at 17:01, Sean DeNigris <[hidden email]> wrote:
>>>
>>> On Sunday, May 16, 2010 at 10:46:26 AM UTC-4, Sean DeNigris wrote:
>>> This may be totally out of nowhere, but could for:do: take a block?
>>> In other words, instead of being restricted to for: #squeak do:, one
>>> could say:
>>>
>>> for: [ spec squeak version: '4.0' to: '4.1' ] do: [...]
>>>
>>> Another thought is allow a simple regex - maybe use 'x' as 'anything
>>> for this part of the version'
>>>  I know this is a super old thread, but… did we ever add anything to the API to specify a range of platform versions? It would be useful to say "Pharo 5+" because w/o that it seems that Configs/Baselines have to be updated after each new platform release, even if nothing has changed…
>> You can do:
>>
>> for: #( #'squeak4.1.x' #'squeak4.2.x' #'squeak4.3.x' ) do: [..]
>>
>> it's rather verbose but works! :)
>>
>> Best regards
>> -Tobias
>>
>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "Metacello" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Metacello" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Package depending on the OS ?

Dale Henrichs-3


On 02/23/2018 10:00 AM, Tobias Pape wrote:

>> On 23.02.2018, at 15:02, Dale Henrichs <[hidden email]> wrote:
>>
>> Sean,
>>
>> What Tobias suggests is the way it is done today ... I am still trying to avoid relying on Smalltalk code to specify baselines --- it's a security risk to have to execute smalltalk code in order to figure out what packages are needed for download/load, so I prefer to use Smalltalk literals for the configuration specification ... just imagine that the configuration/baseline is specified using STON.
>>
>> I am willing to consider variations on this theme:
>>
>>    spec for: #'squeak4.[1-3].x' do: [...]
>>
>> or:
>>
>>    for: #'squeak4.*.x' do: [...]
>>
>> or:
>>
>>    ???
>>
> while it is cumbersome, the current variant makes sure that we actually touch the baselines when new Platform versions emerge.
> I think this is a plus and helps avoiding bit rot.
This is a good point ... and one should touch the .travis.yml file at
the same time (per version here as well)  ... I'm inclined to leave well
enough alone for the time being ... but still want to hear additional
arguments ... both pro and con ...
>
> An override system would help to test on new platform versions.
> So one could easily say,
>   - I am on version Y
>   - load as if I were on version X
> If that works, add version Y to the list, if not, you need a new #for:do: in any case…
What would such a thing look like?

I can imagine doing something like the when running on platform
'squeak4.6.x':

   Metacello new
     baseline: '...';
     repository: '...';
     addDefaultAttribute: #( 'squeak4.5.x' );
     load

'squeak4.5.x' would be added to the platform default attribute list and
make it appear that you are running on a squeak4.5.x ...

As I think about this things could get weird if some projects being
loaded due to dependencies did already have squeak4.6.x behavior
different from squeak4.5.x, so I'm not sure that this would actually
make things easier ... in simple cases it could work, but the more
complicated projects could lead to totally unexpected behavior...

Dale

>
> Best regards
> -Tobias
>
>
>> Dale
>>
>>
>>
>>
>> On 02/22/2018 10:00 AM, Tobias Pape wrote:
>>> Hi Sean
>>>
>>>> On 22.02.2018, at 17:01, Sean DeNigris <[hidden email]> wrote:
>>>>
>>>> On Sunday, May 16, 2010 at 10:46:26 AM UTC-4, Sean DeNigris wrote:
>>>> This may be totally out of nowhere, but could for:do: take a block?
>>>> In other words, instead of being restricted to for: #squeak do:, one
>>>> could say:
>>>>
>>>> for: [ spec squeak version: '4.0' to: '4.1' ] do: [...]
>>>>
>>>> Another thought is allow a simple regex - maybe use 'x' as 'anything
>>>> for this part of the version'
>>>>   I know this is a super old thread, but… did we ever add anything to the API to specify a range of platform versions? It would be useful to say "Pharo 5+" because w/o that it seems that Configs/Baselines have to be updated after each new platform release, even if nothing has changed…
>>> You can do:
>>>
>>> for: #( #'squeak4.1.x' #'squeak4.2.x' #'squeak4.3.x' ) do: [..]
>>>
>>> it's rather verbose but works! :)
>>>
>>> Best regards
>>> -Tobias
>>>
>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "Metacello" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> For more options, visit https://groups.google.com/d/optout.
>> --
>> You received this message because you are subscribed to the Google Groups "Metacello" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Package depending on the OS ?

Tobias Pape-3
HI Dale

> On 23.02.2018, at 20:22, Dale Henrichs <[hidden email]> wrote:
>
>
>
> On 02/23/2018 10:00 AM, Tobias Pape wrote:
>>> On 23.02.2018, at 15:02, Dale Henrichs <[hidden email]> wrote:
>>>
>>> Sean,
>>>
>>> What Tobias suggests is the way it is done today ... I am still trying to avoid relying on Smalltalk code to specify baselines --- it's a security risk to have to execute smalltalk code in order to figure out what packages are needed for download/load, so I prefer to use Smalltalk literals for the configuration specification ... just imagine that the configuration/baseline is specified using STON.
>>>
>>> I am willing to consider variations on this theme:
>>>
>>>   spec for: #'squeak4.[1-3].x' do: [...]
>>>
>>> or:
>>>
>>>   for: #'squeak4.*.x' do: [...]
>>>
>>> or:
>>>
>>>   ???
>>>
>> while it is cumbersome, the current variant makes sure that we actually touch the baselines when new Platform versions emerge.
>> I think this is a plus and helps avoiding bit rot.
> This is a good point ... and one should touch the .travis.yml file at the same time (per version here as well)  ... I'm inclined to leave well enough alone for the time being ... but still want to hear additional arguments ... both pro and con ...
>>
>> An override system would help to test on new platform versions.
>> So one could easily say,
>>  - I am on version Y
>>  - load as if I were on version X
>> If that works, add version Y to the list, if not, you need a new #for:do: in any case…
> What would such a thing look like?
>
> I can imagine doing something like the when running on platform 'squeak4.6.x':
>
>   Metacello new
>     baseline: '...';
>     repository: '...';
>     addDefaultAttribute: #( 'squeak4.5.x' );
>     load
>
> 'squeak4.5.x' would be added to the platform default attribute list and make it appear that you are running on a squeak4.5.x ..

That's actually what I do for Squeak trunk (Aka alpha):

https://github.com/Metacello/metacello/blob/master/repository/Metacello-Platform.squeak.package/MetacelloSqueakPlatform.class/instance/defaultPlatformAttributes.st#L15


>
> As I think about this things could get weird if some projects being loaded due to dependencies did already have squeak4.6.x behavior different from squeak4.5.x, so I'm not sure that this would actually make things easier ... in simple cases it could work, but the more complicated projects could lead to totally unexpected behavior...

That I understand. What about

  Metacello new
    baseline: '...';
    repository: '...';
    addDefaultAttribute: #'squeak4.5.x' inPlaceOf: #'squeak4.6.x';
    load

?

Best regards
        -Tobias



>
> Dale
>>
>> Best regards
>> -Tobias
>>
>>
>>> Dale
>>>
>>>
>>>
>>>
>>> On 02/22/2018 10:00 AM, Tobias Pape wrote:
>>>> Hi Sean
>>>>
>>>>> On 22.02.2018, at 17:01, Sean DeNigris <[hidden email]> wrote:
>>>>>
>>>>> On Sunday, May 16, 2010 at 10:46:26 AM UTC-4, Sean DeNigris wrote:
>>>>> This may be totally out of nowhere, but could for:do: take a block?
>>>>> In other words, instead of being restricted to for: #squeak do:, one
>>>>> could say:
>>>>>
>>>>> for: [ spec squeak version: '4.0' to: '4.1' ] do: [...]
>>>>>
>>>>> Another thought is allow a simple regex - maybe use 'x' as 'anything
>>>>> for this part of the version'
>>>>>  I know this is a super old thread, but… did we ever add anything to the API to specify a range of platform versions? It would be useful to say "Pharo 5+" because w/o that it seems that Configs/Baselines have to be updated after each new platform release, even if nothing has changed…
>>>> You can do:
>>>>
>>>> for: #( #'squeak4.1.x' #'squeak4.2.x' #'squeak4.3.x' ) do: [..]
>>>>
>>>> it's rather verbose but works! :)
>>>>
>>>> Best regards
>>>> -Tobias
>>>>
>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups "Metacello" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>> --
>>> You received this message because you are subscribed to the Google Groups "Metacello" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Metacello" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
12