[Pharo-project] Group metacello question
Hi dale Q1: can I have group: 'Pharo' group: 'Pharo2.0.x' will Pharo2.0.x only gets executed and not Pharo? when I load from 2.0? Q2: separated question and how can I share spec between let say 1.4 and 2.0 group: 'Pharo1.4.x' self common: spec the rest for 1.4 group: 'Pharo2.0.x self common: spec the rest for 2.0 tx Stef
----- Original Message ----- | From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> | To: "Pharo Development" <Pharo-project@lists.gforge.inria.fr> | Sent: Friday, October 19, 2012 1:51:38 PM | Subject: [Pharo-project] Group metacello question | | Hi dale | | Q1: | can I have | group: 'Pharo' | | | group: 'Pharo2.0.x' | | will Pharo2.0.x only gets executed and not Pharo? when I load from | 2.0? Groups are not loaded unless you reference them in a load statement: load: #( 'Pharo2.0.x') or reference the group name in a `requires:` ... they are intended to be shortcuts or aliases for sets of packages like using the 'Tests' group for collecting all of the test packages. You _can_ use groups for naming sets of packages that refer to a platform, but the groups are _not_ automtically loaded ... | | Q2: | separated question | and how can I share spec between let say 1.4 and 2.0 | | group: 'Pharo1.4.x' | | self common: spec | the rest for 1.4 | | group: 'Pharo2.0.x | self common: spec | the rest for 2.0 | You should be using the for:do: for conditional stuff: spec for: #'pharo1.4.x' do: [ common specs for 1.4 ]. spec for: #'pharo2.0.x' do: [ common specs for 2.0 ]. If you want to know the exact platform atributes available then execute the following in an image: (ConfigurationOfYourProject) project attributes The attributes that apply: #pharo #pharo1.x, will be listed. Dale
I'm updating the chapter \paragraph{Loading order.} \sd{dale is it correct?} Notice that if you in a system where the platform attributes are (\ct{#common} \ct{#squeakCommon} \ct{#pharo} \ct{#'pharo2.x'} \ct{#'pharo2.0.x'}) (you can obtain this information doing \ct{ConfigurationOf project attributes}) and you have specified three sections such as \ct{#common}, \ct{#pharo} and \ct{#pharo2.0.x}, these sections will loaded one after the other. \begin{code}{} ConfigurationOfCoolBrowser>>baseline09: spec <version: '0.9-baseline'> !\textbf{spec for: \#common do: [}! spec blessing: #baseline. spec repository: 'http://www.example.com/CoolBrowser'. spec package: 'CoolBrowser-Core'; package: 'CoolBrowser-Tests' with: [ spec requires: 'CoolBrowser-Core' ]; package: 'CoolBrowser-Addons' with: [ spec requires: 'CoolBrowser-Core' ]; package: 'CoolBrowser-AddonsTests' with: [ spec requires: #('CoolBrowser-Addons' 'CoolBrowser-Tests' ) ]. spec group: 'default' with: #('CoolBrowser-Core' 'CoolBrowser-Addons' ); group: 'Core' with: #('CoolBrowser-Core' 'CoolBrowser-Platform' ); group: 'Extras' with: #('CoolBrowser-Addon'); group: 'Tests' with: #('CoolBrowser-Tests' 'CoolBrowser-AddonsTests' ); group: 'CompleteWithoutTests' with: #('Core', 'Extras' ); group: 'CompleteWithTests' with: #('CompleteWithoutTests', 'Tests' )]. !\textbf{spec for: \#gemstone do: [}! spec package: 'CoolBrowser-Platform' with: 'CoolBrowser-PlatformGemstone']. !\textbf{spec for: \#pharo do: [}! spec package: 'CoolBrowser-Platform' with: 'CoolBrowser-PlatformPharo']. !\textbf{spec for: \#pharo2.0.x do: [}! spec package: 'CoolBrowser-Addons' with: 'CoolBrowser-Core20']. \end{code}
Hi dale it is correct that common squeakcommon pharo then pharoxxx sections are loaded all together? Stef
I'm updating the chapter
\paragraph{Loading order.} \sd{dale is it correct?} Notice that if you in a system where the platform attributes are (\ct{#common} \ct{#squeakCommon} \ct{#pharo} \ct{#'pharo2.x'} \ct{#'pharo2.0.x'}) (you can obtain this information doing \ct{ConfigurationOf project attributes}) and you have specified three sections such as \ct{#common}, \ct{#pharo} and \ct{#pharo2.0.x}, these sections will loaded one after the other.
\begin{code}{} ConfigurationOfCoolBrowser>>baseline09: spec <version: '0.9-baseline'>
!\textbf{spec for: \#common do: [}! spec blessing: #baseline. spec repository: 'http://www.example.com/CoolBrowser'.
spec package: 'CoolBrowser-Core'; package: 'CoolBrowser-Tests' with: [ spec requires: 'CoolBrowser-Core' ]; package: 'CoolBrowser-Addons' with: [ spec requires: 'CoolBrowser-Core' ]; package: 'CoolBrowser-AddonsTests' with: [ spec requires: #('CoolBrowser-Addons' 'CoolBrowser-Tests' ) ]. spec group: 'default' with: #('CoolBrowser-Core' 'CoolBrowser-Addons' ); group: 'Core' with: #('CoolBrowser-Core' 'CoolBrowser-Platform' ); group: 'Extras' with: #('CoolBrowser-Addon'); group: 'Tests' with: #('CoolBrowser-Tests' 'CoolBrowser-AddonsTests' ); group: 'CompleteWithoutTests' with: #('Core', 'Extras' ); group: 'CompleteWithTests' with: #('CompleteWithoutTests', 'Tests' )].
!\textbf{spec for: \#gemstone do: [}! spec package: 'CoolBrowser-Platform' with: 'CoolBrowser-PlatformGemstone']. !\textbf{spec for: \#pharo do: [}! spec package: 'CoolBrowser-Platform' with: 'CoolBrowser-PlatformPharo']. !\textbf{spec for: \#pharo2.0.x do: [}! spec package: 'CoolBrowser-Addons' with: 'CoolBrowser-Core20'].
\end{code}
Stef, Yes... the specifications from each section are merged in order to produce the final set of specifications: for: #common do: [ spec: 'package' with: [ spec repository: 'http://example.com/repo' ]]. for: #pharo do: [ spec: 'package' with: [ spec file: 'package.pharo-dkh.1' ]]. for: #squeak do: [ spec: 'package' with: [ spec file: 'package.squeak-dkh.1' ]]. with the attributes #(common pharo) it resolves to: spec: 'package' with: [ spec file: 'package.pharo-dkh.1'; repository: 'http://example.com/repo' ]. with the attributes #(common pharo) it resolves to: spec: 'package' with: [ spec file: 'package.squeak-dkh.1'; repository: 'http://example.com/repo' ]. with the attributes #(common gemstone) it resolves to: spec: 'package' with: [ spec repository: 'http://example.com/repo' ]. and so on... Dale ----- Original Message ----- | From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> | To: Pharo-project@lists.gforge.inria.fr | Sent: Saturday, October 20, 2012 2:10:03 PM | Subject: Re: [Pharo-project] Group metacello question | | Hi dale | | it is correct that | | common | squeakcommon | pharo | then pharoxxx | sections are loaded all together? | | Stef | > I'm updating the chapter | > | > | > \paragraph{Loading order.} | > \sd{dale is it correct?} Notice that if you | > in a system where the platform attributes are (\ct{#common} | > \ct{#squeakCommon} \ct{#pharo} \ct{#'pharo2.x'} | > \ct{#'pharo2.0.x'}) (you can obtain this information doing | > \ct{ConfigurationOf project attributes}) and you have specified | > three sections such as \ct{#common}, \ct{#pharo} and | > \ct{#pharo2.0.x}, these sections will loaded one after the other. | > | > \begin{code}{} | > ConfigurationOfCoolBrowser>>baseline09: spec | > <version: '0.9-baseline'> | > | > !\textbf{spec for: \#common do: [}! | > spec blessing: #baseline. | > spec repository: 'http://www.example.com/CoolBrowser'. | > | > spec | > package: 'CoolBrowser-Core'; | > package: 'CoolBrowser-Tests' with: [ spec | > requires: 'CoolBrowser-Core' ]; | > package: 'CoolBrowser-Addons' with: [ spec | > requires: 'CoolBrowser-Core' ]; | > package: 'CoolBrowser-AddonsTests' with: [ | > spec requires: #('CoolBrowser-Addons' | > 'CoolBrowser-Tests' ) ]. | > spec | > group: 'default' with: #('CoolBrowser-Core' | > 'CoolBrowser-Addons' ); | > group: 'Core' with: #('CoolBrowser-Core' | > 'CoolBrowser-Platform' ); | > group: 'Extras' with: #('CoolBrowser-Addon'); | > group: 'Tests' with: #('CoolBrowser-Tests' | > 'CoolBrowser-AddonsTests' ); | > group: 'CompleteWithoutTests' with: #('Core', | > 'Extras' ); | > group: 'CompleteWithTests' with: | > #('CompleteWithoutTests', 'Tests' )]. | > | > !\textbf{spec for: \#gemstone do: [}! | > spec package: 'CoolBrowser-Platform' with: | > 'CoolBrowser-PlatformGemstone']. | > !\textbf{spec for: \#pharo do: [}! | > spec package: 'CoolBrowser-Platform' with: | > 'CoolBrowser-PlatformPharo']. | > !\textbf{spec for: \#pharo2.0.x do: [}! | > spec package: 'CoolBrowser-Addons' with: | > 'CoolBrowser-Core20']. | > | > \end{code} | > | > | | |
Ok thanks so what I wrote is correct and I should finish the configuration I'm writing - I got distracted by a bath tube that I had to destroy :) Stef
Stef,
Yes... the specifications from each section are merged in order to produce the final set of specifications:
for: #common do: [ spec: 'package' with: [ spec repository: 'http://example.com/repo' ]]. for: #pharo do: [ spec: 'package' with: [ spec file: 'package.pharo-dkh.1' ]]. for: #squeak do: [ spec: 'package' with: [ spec file: 'package.squeak-dkh.1' ]].
with the attributes #(common pharo) it resolves to:
spec: 'package' with: [ spec file: 'package.pharo-dkh.1'; repository: 'http://example.com/repo' ].
with the attributes #(common pharo) it resolves to:
spec: 'package' with: [ spec file: 'package.squeak-dkh.1'; repository: 'http://example.com/repo' ].
with the attributes #(common gemstone) it resolves to:
spec: 'package' with: [ spec repository: 'http://example.com/repo' ].
and so on...
Dale ----- Original Message ----- | From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> | To: Pharo-project@lists.gforge.inria.fr | Sent: Saturday, October 20, 2012 2:10:03 PM | Subject: Re: [Pharo-project] Group metacello question | | Hi dale | | it is correct that | | common | squeakcommon | pharo | then pharoxxx | sections are loaded all together? | | Stef | > I'm updating the chapter | > | > | > \paragraph{Loading order.} | > \sd{dale is it correct?} Notice that if you | > in a system where the platform attributes are (\ct{#common} | > \ct{#squeakCommon} \ct{#pharo} \ct{#'pharo2.x'} | > \ct{#'pharo2.0.x'}) (you can obtain this information doing | > \ct{ConfigurationOf project attributes}) and you have specified | > three sections such as \ct{#common}, \ct{#pharo} and | > \ct{#pharo2.0.x}, these sections will loaded one after the other. | > | > \begin{code}{} | > ConfigurationOfCoolBrowser>>baseline09: spec | > <version: '0.9-baseline'> | > | > !\textbf{spec for: \#common do: [}! | > spec blessing: #baseline. | > spec repository: 'http://www.example.com/CoolBrowser'. | > | > spec | > package: 'CoolBrowser-Core'; | > package: 'CoolBrowser-Tests' with: [ spec | > requires: 'CoolBrowser-Core' ]; | > package: 'CoolBrowser-Addons' with: [ spec | > requires: 'CoolBrowser-Core' ]; | > package: 'CoolBrowser-AddonsTests' with: [ | > spec requires: #('CoolBrowser-Addons' | > 'CoolBrowser-Tests' ) ]. | > spec | > group: 'default' with: #('CoolBrowser-Core' | > 'CoolBrowser-Addons' ); | > group: 'Core' with: #('CoolBrowser-Core' | > 'CoolBrowser-Platform' ); | > group: 'Extras' with: #('CoolBrowser-Addon'); | > group: 'Tests' with: #('CoolBrowser-Tests' | > 'CoolBrowser-AddonsTests' ); | > group: 'CompleteWithoutTests' with: #('Core', | > 'Extras' ); | > group: 'CompleteWithTests' with: | > #('CompleteWithoutTests', 'Tests' )]. | > | > !\textbf{spec for: \#gemstone do: [}! | > spec package: 'CoolBrowser-Platform' with: | > 'CoolBrowser-PlatformGemstone']. | > !\textbf{spec for: \#pharo do: [}! | > spec package: 'CoolBrowser-Platform' with: | > 'CoolBrowser-PlatformPharo']. | > !\textbf{spec for: \#pharo2.0.x do: [}! | > spec package: 'CoolBrowser-Addons' with: | > 'CoolBrowser-Core20']. | > | > \end{code} | > | > | | |
On Oct 19, 2012, at 11:29 PM, Dale Henrichs wrote:
----- Original Message ----- | From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> | To: "Pharo Development" <Pharo-project@lists.gforge.inria.fr> | Sent: Friday, October 19, 2012 1:51:38 PM | Subject: [Pharo-project] Group metacello question | | Hi dale | | Q1: | can I have | group: 'Pharo' | | | group: 'Pharo2.0.x' | | will Pharo2.0.x only gets executed and not Pharo? when I load from | 2.0?
Groups are not loaded unless you reference them in a load statement:
load: #( 'Pharo2.0.x')
oops sorry I was too tired. I meant not groups but tags like common, squeak common, pharo1.4.x
or reference the group name in a `requires:` ... they are intended to be shortcuts or aliases for sets of packages like using the 'Tests' group for collecting all of the test packages.
You _can_ use groups for naming sets of packages that refer to a platform, but the groups are _not_ automtically loaded ...
| | Q2: | separated question | and how can I share spec between let say 1.4 and 2.0 | | group: 'Pharo1.4.x' | | self common: spec | the rest for 1.4 | | group: 'Pharo2.0.x | self common: spec | the rest for 2.0 |
You should be using the for:do: for conditional stuff:
spec for: #'pharo1.4.x' do: [ common specs for 1.4 ]. spec for: #'pharo2.0.x' do: [ common specs for 2.0 ].
ok then I deduce that for 1.4 and 2.0 this is disjoint but if I have pharo and pharo 2.0.x then there will be loaded in order? an OrderedCollection(#common #squeakCommon #pharo #'pharo2.x' #'pharo2.0.x')
If you want to know the exact platform atributes available then execute the following in an image:
(ConfigurationOfYourProject) project attributes
The attributes that apply: #pharo #pharo1.x, will be listed. Dale
participants (2)
-
Dale Henrichs -
Stéphane Ducasse