krfkeith / metacello

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

Configurations with common base loaded incorrectly #178

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
see 
http://groups.google.com/group/metacello/browse_thread/thread/d9a2819134ea18e0

I also saw this while loading the Moose configuration

Original issue reported on code.google.com by henrichs...@gmail.com on 23 Feb 2012 at 7:59

GoogleCodeExporter commented 9 years ago
Here's the source for MetacelloGoferPackage>>matches: that looks like it fixes 
Mariano's ConfigurationOfNautilus problem and the Moose ConfigurationOfGlamour 
issue that I ran into (in retrospect, it looks like the Moose bug was a 
consequence of some additional changes I had made to the system for 
1.0-beta.32...):

matches: aLoadableReference
    "does Monticello-style #versionInfoFromVersionNamed: matching"

    | pFilename refName char |
    ((pFilename := self packageFilename) == nil or: [ self name = self packageFilename ])
        ifTrue: [ ^ super matches: aLoadableReference ].
    aLoadableReference name = pFilename
        ifTrue: [ ^ true ].
    (aLoadableReference name beginsWith: pFilename)
        ifFalse: [ ^ false ].
    refName := aLoadableReference packageName.
    refName = pFilename
        ifTrue: [ ^ true ].
    pFilename size < refName size
        ifTrue: [ 
            (refName beginsWith: pFilename)
                ifFalse: [ ^ false ].
            (char := pFilename at: pFilename size) ~= $-
                ifTrue: [ char := refName at: pFilename size + 1 ] ]
        ifFalse: [ 
            (pFilename beginsWith: refName)
                ifFalse: [ ^ false ].
            (char := refName at: refName size) ~= $-
                ifTrue: [ char := pFilename at: refName size + 1 ] ].
    ^ char = $. or: [ char = $- ]

The Metacello tests all pass (they didn't with the earlier patch), so this one 
should be safe to use ... I'll be working this into a release in the next day 
or so ...

Original comment by henrichs...@gmail.com on 24 Feb 2012 at 1:17

GoogleCodeExporter commented 9 years ago
The fix plus additional tests committed to an "issue178 branch":

  Metacello-MC.issue178-dkh.549
  Metacello-TestsMC.issue178-dkh.170

in http://seaside.gemstone.com/ss/metacello

Original comment by henrichs...@gmail.com on 24 Feb 2012 at 1:23

GoogleCodeExporter commented 9 years ago

Original comment by henrichs...@gmail.com on 19 May 2012 at 7:41