Administrator
|
The configuration of Xtreams was using a custom #FileSystem attribute to automatically load FS extensions if it's present.
Here's what happened: 1. For Pharo 4.0, which doesn't have FileUrl any more, I had to branch 'Xtreams-TerminalsFileSystem' via: spec for: #'pharo4.x' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: [ spec file: 'Xtreams-TerminalsFileSystem.pharo40'; 2. But, the #FileSystem attribute is still active in Pharo 4.0. In the baseline: spec for: #FileSystem do: [ spec package: 'Xtreams-TerminalsFileSystem' with: [ spec requires: 'Xtreams-Terminals']; And in the version: spec for: #FileSystem do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem-nice.1'. So to get the #FileSystem to stop overriding my pharo.4.x spec, I had to do this ugly check: customProjectAttributes Smalltalk globals at: #FileSystems ifPresent: [:ignored | | isNotPharo40 | isNotPharo40 := MetacelloPharo30Platform current defaultPlatformAttributes includes: #'pharo4.x'. isNotPharo40 ifTrue: [ ^#(#FileSystem)] ]. Any suggestions how to make this cleaner? Thanks.
Cheers,
Sean |
Sean,
Can you supply the entire baseline method ... I have some ideas but it may involve a bit more restructuring, so I want to see the whole context before I get too far into it ... Dale On 03/31/2015 08:21 PM, Sean P. DeNigris wrote: > The configuration of Xtreams was using a custom #FileSystem attribute to > automatically load FS extensions if it's present. > > Here's what happened: > > 1. For Pharo 4.0, which doesn't have FileUrl any more, I had to branch > 'Xtreams-TerminalsFileSystem' via: > spec for: #'pharo4.x' do: [ > spec > package: 'Xtreams-TerminalsFileSystem' with: [ > spec > file: 'Xtreams-TerminalsFileSystem.pharo40'; > > 2. But, the #FileSystem attribute is still active in Pharo 4.0. > In the baseline: > spec for: #FileSystem do: [ > spec > package: 'Xtreams-TerminalsFileSystem' with: [ spec requires: > 'Xtreams-Terminals']; > And in the version: > spec for: #FileSystem do: [ > spec > package: 'Xtreams-TerminalsFileSystem' with: > 'Xtreams-TerminalsFileSystem-nice.1'. > > So to get the #FileSystem to stop overriding my pharo.4.x spec, I had to do > this ugly check: > customProjectAttributes > Smalltalk globals at: #FileSystems ifPresent: [:ignored | | > isNotPharo40 | > isNotPharo40 := MetacelloPharo30Platform current defaultPlatformAttributes > includes: #'pharo4.x'. > isNotPharo40 ifTrue: [ ^#(#FileSystem)] ]. > > Any suggestions how to make this cleaner? Thanks. > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/Xtreams-Pharo-4-0-Other-FileSystem-Images-tp4816537.html > Sent from the Metacello mailing list archive at Nabble.com. > -- 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. |
Administrator
|
Can you supply the entire baseline methodSure... baseline131: spec <version: '1.3.1-baseline'> spec for: #common do: [ spec blessing: #baseline. spec repository: 'http://www.squeaksource.com/Xtreams'. spec package: 'Xtreams-Support'; package: 'Xtreams-Core' with: [ spec requires: 'Xtreams-Support' ]; package: 'Xtreams-Terminals'; package: 'Xtreams-Transforms'; package: 'Xtreams-Substreams'; package: 'Xtreams-CoreTests' with: [ spec requires: 'Xtreams-Core' ]; package: 'Xtreams-TerminalsTests' with: [ spec requires: 'Xtreams-Terminals' ]; package: 'Xtreams-TransformsTests' with: [ spec requires: 'Xtreams-Transforms' ]; package: 'Xtreams-SubstreamsTests' with: [ spec requires: 'Xtreams-Substreams' ]. spec group: 'default' with: #('Full Tests'); group: 'Core' with: #( 'Xtreams-Support' 'Xtreams-Core' 'Xtreams-Terminals' 'Xtreams-Transforms' 'Xtreams-Substreams' ); group: 'Tests' with: #( 'Xtreams-CoreTests' 'Xtreams-TerminalsTests' 'Xtreams-TransformsTests' 'Xtreams-SubstreamsTests' ); group: 'Full' with: #('Core'); group: 'Full Tests' with: #('Full' 'Tests') ]. spec for: #squeakCommon do: [ spec project: 'FFI' with: [ spec className: 'ConfigurationOfFFI'; repository: '<a href="http://www.squeaksource.com/MetacelloRepository']">http://www.squeaksource.com/MetacelloRepository']. spec package: 'Xtreams-Parsing'; package: 'Xtreams-ParsingTests' with: [ spec requires: 'Xtreams-Parsing']; package: 'Xtreams-Xtras' with: [ spec requires: #('FFI') ]; package: 'Xtreams-XtrasTests' with: [ spec requires: 'Xtreams-Xtras' ]. spec group: 'Core' with: #('Xtreams-Parsing'); group: 'Tests' with: #('Xtreams-ParsingTests'); group: 'Full' with: #('Xtreams-Xtras'); group: 'Full Tests' with: #('Xtreams-XtrasTests') ]. spec for: #'pharo3.x' do: [ "No Xtras until there is a valid FFI available - spec removeProject: 'FFI'." spec group: 'default' overrides: #('Core Tests'); group: 'Core Tests' with: #('Core' 'Tests').]. spec for: #'pharo4.x' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: [ spec file: 'Xtreams-TerminalsFileSystem.pharo40'; requires: 'Xtreams-Terminals' ]; package: 'Xtreams-TerminalsFileSystemTests' with: [ spec requires: 'Xtreams-TerminalsTests']; package: 'Xtreams-Terminals' with: 'Xtreams-Terminals.pharo40'. "No Xtras until there is a valid FFI available - spec removeProject: 'FFI'." spec group: 'Core' with: #('Xtreams-TerminalsFileSystem'); group: 'Tests' with: #('Xtreams-TerminalsFileSystemTests'); group: 'default' overrides: #('Core Tests'); group: 'Core Tests' with: #('Core' 'Tests').]. spec for: #gemstone do: [ spec package: 'Xtreams-Support' with: [ spec file: 'Xtreams-Support.gemstone']; package: 'Xtreams-Terminals' with: [ spec file: 'Xtreams-Terminals.gemstone']; package: 'Xtreams-TerminalsTests' with: [ spec file: 'Xtreams-TerminalsTests.gemstone']; yourself. ]. spec for: #squeak do: [ spec package: 'Xtreams-Xtras' with: [ spec requires: #('FFI'); preLoadDoIt: #preLoadSqueakEnsureGlobalUnderscoreSelectors; postLoadDoIt: #postLoadSqueakRestoreGlobalUnderscoreSelectors ] ]. spec for: #FileDirectory do: [ spec package: 'Xtreams-TerminalsFileDirectory' with: [ spec requires: 'Xtreams-Terminals']; package: 'Xtreams-TerminalsFileDirectoryTests' with: [ spec requires: 'Xtreams-TerminalsTests']. spec group: 'Core' with: #('Xtreams-TerminalsFileDirectory'); group: 'Tests' with: #('Xtreams-TerminalsFileDirectoryTests') ]. spec for: #FileSystem do: [ spec package: 'Xtreams-TerminalsFileSystem' with: [ spec requires: 'Xtreams-Terminals']; package: 'Xtreams-TerminalsFileSystemTests' with: [ spec requires: 'Xtreams-TerminalsTests']. spec group: 'Core' with: #('Xtreams-TerminalsFileSystem'); group: 'Tests' with: #('Xtreams-TerminalsFileSystemTests') ].
Cheers,
Sean |
Sean,
I'm afraid that you copy came across as http and when you pasted the urls where automatically transformed into <a href="..."> .... so I'm having to hand edit the spec ... Dale On 04/01/2015 10:25 AM, Sean P.
DeNigris wrote:
-- 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. |
Administrator
|
> I'm afraid that you copy came across as http and when you pasted the urls where automatically transformed into <a href="..."> .... so I'm having to hand edit the spec ...
oops! I was wondering about the weird formatting in my mail app :) Try again... baseline131: spec <version: '1.3.1-baseline'> spec for: #common do: [ spec blessing: #baseline. spec repository: 'http://www.squeaksource.com/Xtreams'. spec package: 'Xtreams-Support'; package: 'Xtreams-Core' with: [ spec requires: 'Xtreams-Support' ]; package: 'Xtreams-Terminals'; package: 'Xtreams-Transforms'; package: 'Xtreams-Substreams'; package: 'Xtreams-CoreTests' with: [ spec requires: 'Xtreams-Core' ]; package: 'Xtreams-TerminalsTests' with: [ spec requires: 'Xtreams-Terminals' ]; package: 'Xtreams-TransformsTests' with: [ spec requires: 'Xtreams-Transforms' ]; package: 'Xtreams-SubstreamsTests' with: [ spec requires: 'Xtreams-Substreams' ]. spec group: 'default' with: #('Full Tests'); group: 'Core' with: #( 'Xtreams-Support' 'Xtreams-Core' 'Xtreams-Terminals' 'Xtreams-Transforms' 'Xtreams-Substreams' ); group: 'Tests' with: #( 'Xtreams-CoreTests' 'Xtreams-TerminalsTests' 'Xtreams-TransformsTests' 'Xtreams-SubstreamsTests' ); group: 'Full' with: #('Core'); group: 'Full Tests' with: #('Full' 'Tests') ]. spec for: #squeakCommon do: [ spec project: 'FFI' with: [ spec className: 'ConfigurationOfFFI'; repository: 'http://www.squeaksource.com/MetacelloRepository']. spec package: 'Xtreams-Parsing'; package: 'Xtreams-ParsingTests' with: [ spec requires: 'Xtreams-Parsing']; package: 'Xtreams-Xtras' with: [ spec requires: #('FFI') ]; package: 'Xtreams-XtrasTests' with: [ spec requires: 'Xtreams-Xtras' ]. spec group: 'Core' with: #('Xtreams-Parsing'); group: 'Tests' with: #('Xtreams-ParsingTests'); group: 'Full' with: #('Xtreams-Xtras'); group: 'Full Tests' with: #('Xtreams-XtrasTests') ]. spec for: #'pharo3.x' do: [ "No Xtras until there is a valid FFI available - spec removeProject: 'FFI'." spec group: 'default' overrides: #('Core Tests'); group: 'Core Tests' with: #('Core' 'Tests').]. spec for: #'pharo4.x' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: [ spec file: 'Xtreams-TerminalsFileSystem.pharo40'; requires: 'Xtreams-Terminals' ]; package: 'Xtreams-TerminalsFileSystemTests' with: [ spec requires: 'Xtreams-TerminalsTests']; package: 'Xtreams-Terminals' with: 'Xtreams-Terminals.pharo40'. "No Xtras until there is a valid FFI available - spec removeProject: 'FFI'." spec group: 'Core' with: #('Xtreams-TerminalsFileSystem'); group: 'Tests' with: #('Xtreams-TerminalsFileSystemTests'); group: 'default' overrides: #('Core Tests'); group: 'Core Tests' with: #('Core' 'Tests').]. spec for: #gemstone do: [ spec package: 'Xtreams-Support' with: [ spec file: 'Xtreams-Support.gemstone']; package: 'Xtreams-Terminals' with: [ spec file: 'Xtreams-Terminals.gemstone']; package: 'Xtreams-TerminalsTests' with: [ spec file: 'Xtreams-TerminalsTests.gemstone']; yourself. ]. spec for: #squeak do: [ spec package: 'Xtreams-Xtras' with: [ spec requires: #('FFI'); preLoadDoIt: #preLoadSqueakEnsureGlobalUnderscoreSelectors; postLoadDoIt: #postLoadSqueakRestoreGlobalUnderscoreSelectors ] ]. spec for: #FileDirectory do: [ spec package: 'Xtreams-TerminalsFileDirectory' with: [ spec requires: 'Xtreams-Terminals']; package: 'Xtreams-TerminalsFileDirectoryTests' with: [ spec requires: 'Xtreams-TerminalsTests']. spec group: 'Core' with: #('Xtreams-TerminalsFileDirectory'); group: 'Tests' with: #('Xtreams-TerminalsFileDirectoryTests') ]. spec for: #FileSystem do: [ spec package: 'Xtreams-TerminalsFileSystem' with: [ spec requires: 'Xtreams-Terminals']; package: 'Xtreams-TerminalsFileSystemTests' with: [ spec requires: 'Xtreams-TerminalsTests']. spec group: 'Core' with: #('Xtreams-TerminalsFileSystem'); group: 'Tests' with: #('Xtreams-TerminalsFileSystemTests') ].
Cheers,
Sean |
got it:)
On 04/01/2015 11:00 AM, Sean P.
DeNigris wrote:
baseline131: spec -- 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. |
In reply to this post by Sean P. DeNigris
I guess I need to see the version spec as well ...
Dale On 04/01/2015 11:00 AM, Sean P.
DeNigris wrote:
> I'm afraid that you copy came across as http and when you pasted the urls where automatically transformed into <a href="..."> .... so I'm having to hand edit the spec ... -- 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. |
Administrator
|
> I guess I need to see the version spec as well ...
version131: spec <version: '1.3.1' imports: #('1.3.1-baseline')> spec for: #common do: [ spec blessing: #release. spec author: 'Sean DeNigris'. spec description: 'A stable release' ]. spec for: #squeakCommon do: [ spec project: 'FFI' with: '1.5'. spec package: 'Xtreams-Support' with: 'Xtreams-Support-nice.11'; package: 'Xtreams-Core' with: 'Xtreams-Core-nice.20'; package: 'Xtreams-Terminals' with: 'Xtreams-Terminals-nice.31'; package: 'Xtreams-Transforms' with: 'Xtreams-Transforms-nice.23'; package: 'Xtreams-Substreams' with: 'Xtreams-Substreams-nice.19'; package: 'Xtreams-Parsing' with: 'Xtreams-Parsing-Martin Kobetic.2'. spec package: 'Xtreams-CoreTests' with: 'Xtreams-CoreTests-nice.20'; package: 'Xtreams-TerminalsTests' with: 'Xtreams-TerminalsTests-nice.17'; package: 'Xtreams-TransformsTests' with: 'Xtreams-TransformsTests-nice.14'; package: 'Xtreams-SubstreamsTests' with: 'Xtreams-SubstreamsTests-nice.13'; package: 'Xtreams-ParsingTests' with: 'Xtreams-ParsingTests-nice.1'. spec package: 'Xtreams-Xtras' with: 'Xtreams-Xtras-MartinKobetic.23'; package: 'Xtreams-XtrasTests' with: 'Xtreams-XtrasTests-MartinKobetic.3' ]. spec for: #'pharo4.x' do: [ spec package: 'Xtreams-Terminals' with: 'Xtreams-Terminals.pharo40-SeanDeNigris.32'; package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem.pharo40-SeanDeNigris.4' ]. spec for: #FileDirectory do: [ spec package: 'Xtreams-TerminalsFileDirectory' with: 'Xtreams-TerminalsFileDirectory-nice.2'. spec package: 'Xtreams-TerminalsFileDirectoryTests' with: 'Xtreams-TerminalsFileDirectoryTests-nice.1' ]. spec for: #FileSystem do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem-nice.1'. spec package: 'Xtreams-TerminalsFileSystemTests' with: 'Xtreams-TerminalsFileSystemTests-nice.1' ]
Cheers,
Sean |
In reply to this post by Dale Henrichs-3
The reason I need to see the version is that in my experiments
(using GemStone and the most recent Metacello), the baseline ends up
resolving the Xtreams-TerminalsFileSystem package to use the
"correct file name": Xtreams-TerminalsFileSystem.pharo40:
(class)@ -> MetacelloPackageSpec (oop)@ -> 224521473 answers@ -> anArray( ) file@ -> 'Xtreams-TerminalsFileSystem.pharo40' goferPackage@ -> nil includes@ -> anArray( ) loader@ -> nil mutable@ -> nil name@ -> 'Xtreams-TerminalsFileSystem' postLoadDoIt@ -> nil preLoadDoIt@ -> nil project@ -> BaselineOfXXX(baseline [BaselineOfXXX], ) repositories@ -> spec requires@ -> anArray( 'Xtreams-Terminals', 'Xtreams-Terminals') The #FileSystem attribute in the baseline is just defining dependencies, so if you are actually loading the wrong file/package version, the root cause must be in the version specification ... Dale On 04/01/2015 11:30 AM, Dale Henrichs
wrote:
I guess I need to see the version spec as well ... -- 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. |
Administrator
|
If it helps, the full config is available at http://smalltalkhub.com/#!/~Pharo/MetaRepoForPharo40
Cheers,
Sean |
Sean,
The new version spec is included below ... basically the solution is to use a nested for:do: block: spec for: #'pharo4.x' do: [ spec for: #'FileSystem' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem.pharo40-SeanDeNigris.4' ]. spec package: 'Xtreams-Terminals' with: 'Xtreams-Terminals.pharo40-SeanDeNigris.32' ]. 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 neexted 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 ... When you nest attributes, only the n+1...m attributes (where n is the attribute index of of the outer attribute and m is the number of attributes) Anyway, let me know if this works for you ... as I said, I'm testing things in GemStone using the latest Metacello... Dale --------------------------- version131: spec <version: '1.3.1' imports: #('1.3.1-baseline')> spec for: #'common' do: [ spec blessing: #'release'. spec author: 'Sean DeNigris'. spec description: 'A stable release' ]. spec for: #'squeakCommon' do: [ spec project: 'FFI' with: '1.5'. spec package: 'Xtreams-Support' with: 'Xtreams-Support-nice.11'; package: 'Xtreams-Core' with: 'Xtreams-Core-nice.20'; package: 'Xtreams-Terminals' with: 'Xtreams-Terminals-nice.31'; package: 'Xtreams-Transforms' with: 'Xtreams-Transforms-nice.23'; package: 'Xtreams-Substreams' with: 'Xtreams-Substreams-nice.19'; package: 'Xtreams-Parsing' with: 'Xtreams-Parsing-Martin Kobetic.2'. spec package: 'Xtreams-CoreTests' with: 'Xtreams-CoreTests-nice.20'; package: 'Xtreams-TerminalsTests' with: 'Xtreams-TerminalsTests-nice.17'; package: 'Xtreams-TransformsTests' with: 'Xtreams-TransformsTests-nice.14'; package: 'Xtreams-SubstreamsTests' with: 'Xtreams-SubstreamsTests-nice.13'; package: 'Xtreams-ParsingTests' with: 'Xtreams-ParsingTests-nice.1'. spec package: 'Xtreams-Xtras' with: 'Xtreams-Xtras-MartinKobetic.23'; package: 'Xtreams-XtrasTests' with: 'Xtreams-XtrasTests-MartinKobetic.3' ]. spec for: #'pharo4.x' do: [ spec for: #'FileSystem' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem.pharo40-SeanDeNigris.4' ]. spec package: 'Xtreams-Terminals' with: 'Xtreams-Terminals.pharo40-SeanDeNigris.32' ]. spec for: #'FileDirectory' do: [ spec package: 'Xtreams-TerminalsFileDirectory' with: 'Xtreams-TerminalsFileDirectory-nice.2'. spec package: 'Xtreams-TerminalsFileDirectoryTests' with: 'Xtreams-TerminalsFileDirectoryTests-nice.1' ]. spec for: #'FileSystem' do: [ spec package: 'Xtreams-TerminalsFileSystem' with: 'Xtreams-TerminalsFileSystem-nice.1'. spec package: 'Xtreams-TerminalsFileSystemTests' with: 'Xtreams-TerminalsFileSystemTests-nice.1' ] -- 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. |
Administrator
|
Thanks! I'll try it out :)
Cheers,
Sean |
Administrator
|
In reply to this post by Dale Henrichs-3
It worked! Thanks, Dale :)
Cheers,
Sean |
Free forum by Nabble | Edit this page |