Dale taught me something helpful (and maybe a little obscure) while fixing ConfigurationOfXtreams... Problem: Say you have a platform attribute #pharo4.x, and a #customProjectAttribute #FileSystem. The problem is that the FileSystem-related packages required for #pharo4.x are different than those for the default cases. spec for: #'pharo4.x' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem.pharo40-SeanDeNigris.4' ]. ... spec for: #FileSystem do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem-nice.1'. ] Solution: Nest a "spec for: #FileSystem do:" inside the "spec for: #pharo4.x do:" declaring the #pharo4.x-specifics spec for: #'pharo4.x' do: [ spec for: #'FileSystem' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem.pharo40-SeanDeNigris.4' ]. Why it works: Per Dale, "The spec:for:do: blocks are evaluated in attribute order (ConfigurationOfX project attributes) with top-level blocks evaluated before nested blocks ... second level blocks are evaluated in top-level block order after the first level block evaluation ... so having #FileSystem nested inside of #pharo4.x and given that #FileSystem follows #pharo4.x in attribute order means that the nested #FileSystem block inside of #pharo4.x is evaluated after to top-level #FileSystem block allowing you to do #pharo4.x specific overrides" ----- Cheers, Sean -- View this message in context: http://forum.world.st/Metacello-Resolving-Conflicting-Attributes-tp4817683.h... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Hi Sean, I wish I had more time to dive into this. Before I do, where did you publish the corrections? Only in meta repo for Pharo4? I also maintain a copy at Xtreams http://www.squeaksource.com/Xtreams and another at http://www.squeaksource.com/MetacelloRepository. Sometimes, I also backport to meta repo for Pharo3... If you think your corrections are solid enough and backward compatible, maybe you could push them in these repos too. In all cases, thanks for your contribution. cheers Nicolas 2015-04-05 16:20 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com>:
Dale taught me something helpful (and maybe a little obscure) while fixing ConfigurationOfXtreams...
Problem: Say you have a platform attribute #pharo4.x, and a #customProjectAttribute #FileSystem. The problem is that the FileSystem-related packages required for #pharo4.x are different than those for the default cases. spec for: #'pharo4.x' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem.pharo40-SeanDeNigris.4' ]. ... spec for: #FileSystem do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem-nice.1'. ]
Solution: Nest a "spec for: #FileSystem do:" inside the "spec for: #pharo4.x do:" declaring the #pharo4.x-specifics spec for: #'pharo4.x' do: [ spec for: #'FileSystem' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem.pharo40-SeanDeNigris.4' ].
Why it works: Per Dale, "The spec:for:do: blocks are evaluated in attribute order (ConfigurationOfX project attributes) with top-level blocks evaluated before nested blocks ... second level blocks are evaluated in top-level block order after the first level block evaluation ... so having #FileSystem nested inside of #pharo4.x and given that #FileSystem follows #pharo4.x in attribute order means that the nested #FileSystem block inside of #pharo4.x is evaluated after to top-level #FileSystem block allowing you to do #pharo4.x specific overrides"
----- Cheers, Sean -- View this message in context: http://forum.world.st/Metacello-Resolving-Conflicting-Attributes-tp4817683.h... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Nicolas Cellier wrote
If you think your corrections are solid enough and backward compatible, maybe you could push them in these repos too.
IIRC the changes were pretty straightforward - just remove FileUrl extensions. I followed the apparent Xtreams convention of creating a pharo40 branch of the effected packages. Config copied to sqs/Xtreams and sqs/MetacelloRepository ----- Cheers, Sean -- View this message in context: http://forum.world.st/Metacello-Resolving-Conflicting-Attributes-tp4817683p4... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (2)
-
Nicolas Cellier -
Sean P. DeNigris