krfkeith / metacello

Automatically exported from code.google.com/p/metacello
0 stars 0 forks source link

unrecognized SystemVersion results in assuming system is on #gemstone... #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
see 
http://forum.world.st/Seaside-3-0-Metacello-Configuration-broken-for-Squeak-td37
20943.html for more details.

Here's the method in MetacelloPlatform:

  defaultPlatformAttributes
    | versionString |
    Smalltalk at: #SystemVersion ifPresent: [:cl |
        versionString := cl current version.
        (versionString beginsWith: 'Pharo')
            ifTrue: [ ^ #(#squeakCommon #pharo ) ].
        (versionString beginsWith: 'Squeak')
            ifTrue: [^ #(#squeakCommon #squeak )]].
    ^ #(#gemstone )

I'm pretty sure that the logic is "required" for the system to bootstrap in 
GemStone, but the fact that SystemVersion should preclude answering #gemstone 
... guessing wrong ends up with surprising results, so should throw an error if 
the versionString doesn't begin with 'Pharo' or 'Squeak'...should have a solid 
test for GemStone as well so that an error can be thrown as well ...

Original issue reported on code.google.com by henrichs...@gmail.com on 7 Aug 2011 at 8:42

GoogleCodeExporter commented 9 years ago
Note that I've been thinking that the base system should implement a 
#defaultPlatformAttributes method, so I wouldn't have to poke around in various 
places to guess what the attributes should be ... same thing goes for the 
version-specific attributes (like #gemstone3.x or squeak4.2 or #pharo1.3) since 
I'd rather not have to ship a new version Metacello to do the additional tests 
... don't know if I can get across the board adoption...

Original comment by henrichs...@gmail.com on 7 Aug 2011 at 8:48

GoogleCodeExporter commented 9 years ago
Tell us what would make your life easier. For me I would love to have a simple 
class that avoid all the duplication :)

Original comment by stephane...@gmail.com on 8 Aug 2011 at 7:19

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/pharo/issues/detail?id=4613 is open for collecting 
input ... I can make a similar addition for GemStone ....

Original comment by henrichs...@gmail.com on 9 Aug 2011 at 8:34

GoogleCodeExporter commented 9 years ago
took care of both problems: extra checks for match before throwing an error and 
use SmalltalkImage>>metacelloPlatformAttributes for attributes, if present

Metacello 1.0-beta.30 (dkh.627)

Original comment by henrichs...@gmail.com on 8 Sep 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Issue 142 has been merged into this issue.

Original comment by henrichs...@gmail.com on 18 Jan 2012 at 6:28