symbolic version and #'common'

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

symbolic version and #'common'

Miguel Cobá
Hi Dale,

after releasing a development version with:

 MetacelloToolBox
    releaseDevelopmentVersionIn: ConfigurationOfGemToolsExample
    description: '- release version 1.0'.

I got something like:

stable: spec
  <symbolicVersion: #'stable'>
  spec for: #'common' version: '1.0'.

Question: the #'common' means that the 1.0 version will be loaded for
every platform?

After Pharo 2.4 release, version 1.4 is the stable for Pharo 2.4, so I
update the version manually (I didn't check if the MetacelloToolBox
handles this) to:

stable: spec
  <symbolicVersion: #'stable'>
  spec for: #'common' version: '1.0'.
  spec for: #'pharo2.4' version: '1.4'

Does this means that when loading on Pharo 2.4, the specific platform
version wins and the #'common' version is not used and when loading on
Pharo 1.0 (and squeak something) the version 1.0 is installed and
#'pharo2.4' is not used?

Or I should edit it manually to:

stable: spec
  <symbolicVersion: #'stable'>
  spec for: #'pharo1.0' version: '1.0'.
  spec for: #'squeak.something' version: '1.0'.
  spec for: #'pharo2.4' version: '1.4'

in order to correctly work?

Cheers
--
Miguel Cobá
http://twitter.com/MiguelCobaMtz
http://miguel.leugim.com.mx



Reply | Threaded
Open this post in threaded view
|

Re: symbolic version and #'common'

Dale Henrichs
On 02/19/2011 12:44 AM, Miguel Cobá wrote:

> Hi Dale,
>
> after releasing a development version with:
>
>   MetacelloToolBox
>      releaseDevelopmentVersionIn: ConfigurationOfGemToolsExample
>      description: '- release version 1.0'.
>
> I got something like:
>
> stable: spec
>    <symbolicVersion: #'stable'>
>    spec for: #'common' version: '1.0'.
>
> Question: the #'common' means that the 1.0 version will be loaded for
> every platform?

Yes.

>
> After Pharo 2.4 release, version 1.4 is the stable for Pharo 2.4, so I
> update the version manually (I didn't check if the MetacelloToolBox
> handles this) to:
>
> stable: spec
>    <symbolicVersion: #'stable'>
>    spec for: #'common' version: '1.0'.
>    spec for: #'pharo2.4' version: '1.4'

You can do these types of programmatic edits using the tool box api, we
just need to find the common patterns so a helper method can be built
... there are quite a few possibilities, so I'm hoping that tools will
appear with checkboxes for the possible options to make things a bit
easier...

>
> Does this means that when loading on Pharo 2.4, the specific platform
> version wins and the #'common' version is not used and when loading on
> Pharo 1.0 (and squeak something) the version 1.0 is installed and
> #'pharo2.4' is not used?

It means that version 1.0 is loaded on all platforms except Phar2.4 ...
(Pharo2.4 is not familiar to me and #'pharo2.4' has not been defined as
a platform attribute yet) ...

If you print the following:

   ConfigurationOfXXX project attributes

You will get a back an ordered list of attrbitues like the following:

   #common
   #squeakCommon
   #pharo
   #'pharo1.x'
   #'pharo1.1.x'

The for:version: statements are processed in order and the last
specification wins.


> Or I should edit it manually to:
>
> stable: spec
>    <symbolicVersion: #'stable'>
>    spec for: #'pharo1.0' version: '1.0'.
>    spec for: #'squeak.something' version: '1.0'.
>    spec for: #'pharo2.4' version: '1.4'
>

This isn't necessary the #common spec covers all cases. If you want to
exclude a singe version, you can use the special symbolic version
#'notDefined':

stable: spec
   <symbolicVersion: #'stable'>
   spec for: #'common' version: '1.0'.
   spec for: #'squeak.something' version: #'notDefined'.
   spec for: #'pharo2.4' version: '1.4'

which means that 1.0 will be used for all platforms except
#'squeak.something' and #'pharo2.4'. #'squeak.something' will get a
#MetacelloSymbolicVersionNotDefinedError and #'pharo2.4' will get versin
1.4.

Dale
Reply | Threaded
Open this post in threaded view
|

Re: symbolic version and #'common'

Miguel Cobá

> This isn't necessary the #common spec covers all cases. If you want to
> exclude a singe version, you can use the special symbolic version
> #'notDefined':
>
> stable: spec
>    <symbolicVersion: #'stable'>
>    spec for: #'common' version: '1.0'.
>    spec for: #'squeak.something' version: #'notDefined'.
>    spec for: #'pharo2.4' version: '1.4'
>
> which means that 1.0 will be used for all platforms except
> #'squeak.something' and #'pharo2.4'. #'squeak.something' will get a
> #MetacelloSymbolicVersionNotDefinedError and #'pharo2.4' will get versin
> 1.4.

Good, that was the answers I was looking for. So the more specific
version that applies for the current platform wins.

Thanks!

--
Miguel Cobá
http://twitter.com/MiguelCobaMtz
http://miguel.leugim.com.mx