Platforms with Multiple Dimensions

1 view
Skip to first unread message

Sean DeNigris

unread,
Dec 31, 2021, 4:18:34 PM12/31/21
to Metacello
Let's say I develop in Pharo 9 and use Traits. When I deploy, it's to a minimal P9 image without Traits, so the Traits are flattened and the flattened version is packaged separately. I now have, not only squeak vs. P8 vs. P9, but P9-with-traits and P9-without-traits.

The example could also be given of GT. Previous versions were on P8 and now it's on P9. You might want to do a different thing for each of the four scenarios: P8, P9, P8+GT or P9+GT.

A list argument to #for:do: ORs the platforms, but I want something to AND them i.e. only load this if ALL listed platforms are relevant.

What's the best way to handle this with Metacello?

Dale Henrichs

unread,
Dec 31, 2021, 6:46:00 PM12/31/21
to meta...@googlegroups.com
Sean,

You can nest #for:do: in a baseline to AND attributes together:
spec for: #'P8' do: [ 
  spec for: #'GT' do: [  ] ].
spec for: #'P9' do: [
  spec for: #'GT' do: [  ] ].
If you need #NotGT for things to go into P8 when GI isn't present ... This is assuming that GT is using custom attribute for their variant of P9 and P8 ... if they aren't then you would need to create custom project attributes (ConfigurationOf>>customProjectAttributes) to create an appropriate attribute ...

Dale

--
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 metacello+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metacello/2879b927-e3fe-4d03-8681-b20dbcd72236n%40googlegroups.com.

Sean DeNigris

unread,
Jan 1, 2022, 9:37:38 AM1/1/22
to Metacello
Thank you, that seems perfect.

Screen Shot 2022-01-01 at 9.36.17 AM.png

Dale Henrichs

unread,
Jan 1, 2022, 1:02:19 PM1/1/22
to meta...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages