In my pharo 6.1 image I have currentVersion | cacheKey cv | cacheKey := self configuration class. ^ MetacelloPlatform current stackCacheFor: #currentVersion at: cacheKey doing: [ :cache | cv := self currentVersionAgainst: nil. ^ cache at: cacheKey put: cv ] And we do not change the code that Dale release and he is making sure that old code is working so this is strange. Stef On Mon, Apr 2, 2018 at 3:03 PM, Hilaire <hilaire@drgeo.eu> wrote:
Hello,
I use to do perform this code to get the installed version from a ConfigurationOfDrGeo:
drgeoVersion ^ 'Installed version: ', ConfigurationOfDrGeo new project currentVersion versionNumber versionString
It does not work anymore, and produce the following error stack
Any idea?
Hilaire
MetacelloMCVersionSpec(Object)>>error: [ ^ self error: 'Name not found: ' , aString ] in MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpec:forLoad:forMap:packages: in Block: [ ^ self error: 'Name not found: ' , aString ] [ (self importArray notNil or: [ self import notNil ]) ifTrue: [ "expect the 'missing' name to be satisfied within context of imported project" importArray ifNotNil: [ importArray do: [ :assoc | ((assoc value includes: aString) and: [ map includesKey: assoc key ]) ifTrue: [ importSpec := (map at: assoc key) mergeImportLoads: {aString}; yourself ] ]. importSpec ifNotNil: [ ^ importSpec ] ]. (importSpec isNil and: [ self import notNil ]) ifTrue: [ ^ (map at: self import ifAbsent: absentBlock) mergeImportLoads: {aString}; yourself ] ]. (aString = 'default' or: [ aString = 'ALL' ]) ifTrue: [ self project groupSpec name: aString; includes: self packageNames; yourself ] ifFalse: [ absentBlock value ] ] in MetacelloMCVersionSpec(MetacelloVersionSpec)>>packageNamed:forLoad:forMap:ifAbsent: in Block: [ (self importArray notNil or: [ self import notNi...etc... Dictionary>>at:ifAbsent: MetacelloMCVersionSpec(MetacelloVersionSpec)>>packageNamed:forLoad:forMap:ifAbsent: MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpec:forLoad:forMap:packages: [ :req | (self resolveToLoadableSpec: req forLoad: forLoad forMap: map packages: packageMap) do: [ :loadableSpec | newReqd addAll: loadableSpec requires. newReqd addAll: loadableSpec includes ] ] in MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:forLoad:map: in Block: [ :req | ... Set>>do: MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:forLoad:map: MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs: [ :cache | names := (self resolveToLoadableSpecs: nameList) collect: [ :spec | spec name ]. cache at: cacheKey put: names ] in MetacelloMCVersionSpec(MetacelloVersionSpec)>>expandToLoadableSpecNames: in Block: [ :cache | ... [ :dict | | cache | cache := dict at: cacheName ifAbsent: [ ]. cache ~~ nil ifTrue: [ | value hasEntry | hasEntry := true. value := cache at: key ifAbsent: [ hasEntry := false ]. hasEntry ifTrue: [ ^ value ] ] ifFalse: [ cache := cacheClass new. dict at: cacheName put: cache ]. ^ aBlock value: cache ] in IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing: in Block: [ :dict | ... [ ^ aBlock value: dict ] in IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary: in Block: [ ^ aBlock value: dict ] BlockClosure>>on:do: IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary: IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing: IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:at:doing: MetacelloMCVersionSpec(MetacelloVersionSpec)>>expandToLoadableSpecNames: MetacelloMCVersionSpec>>isPartiallyCurrent [ :version | | status matchBlock | status := resolvedPackageAndProjectNames isNil ifTrue: [ version spec isPartiallyCurrent ] ifFalse: [ version spec isPartiallyCurrentAgainst: resolvedPackageAndProjectNames ]. matchBlock := [ :matchStatus | cv := version copy. cv versionStatus: matchStatus. ^ cache at: cacheKey put: cv ]. status isAllLoadedToSpec: matchBlock. status isLoadedToSpec: matchBlock. status isLoadedMatchConstraints: matchBlock. status isSomethingLoaded: [ :matchStatus | latestSomethingLoaded isNil ifTrue: [ cv := version copy. cv versionStatus: matchStatus. latestSomethingLoaded := cv ] ] ] in [ :cache | | cv versions latestSomethingLoaded | cv := nil. versions := self sortedAndFilteredVersions. versions do: [ :version | | status matchBlock | status := resolvedPackageAndProjectNames isNil ifTrue: [ version spec isPartiallyCurrent ] ifFalse: [ version spec isPartiallyCurrentAgainst: resolvedPackageAndProjectNames ]. matchBlock := [ :matchStatus | cv := version copy. cv versionStatus: matchStatus. ^ cache at: cacheKey put: cv ]. status isAllLoadedToSpec: matchBlock. status isLoadedToSpec: matchBlock. status isLoadedMatchConstraints: matchBlock. status isSomethingLoaded: [ :matchStatus | latestSomethingLoaded isNil ifTrue: [ cv := version copy. cv versionStatus: matchStatus. latestSomethingLoaded := cv ] ] ]. latestSomethingLoaded ifNotNil: [ ^ cache at: cacheKey put: latestSomethingLoaded ]. ^ cache at: cacheKey put: nil ] in MetacelloMCProject(MetacelloProject)>>currentVersionAgainst: in Block: [ :version | ... Array(SequenceableCollection)>>do: [ :cache | | cv versions latestSomethingLoaded | cv := nil. versions := self sortedAndFilteredVersions. versions do: [ :version | | status matchBlock | status := resolvedPackageAndProjectNames isNil ifTrue: [ version spec isPartiallyCurrent ] ifFalse: [ version spec isPartiallyCurrentAgainst: resolvedPackageAndProjectNames ]. matchBlock := [ :matchStatus | cv := version copy. cv versionStatus: matchStatus. ^ cache at: cacheKey put: cv ]. status isAllLoadedToSpec: matchBlock. status isLoadedToSpec: matchBlock. status isLoadedMatchConstraints: matchBlock. status isSomethingLoaded: [ :matchStatus | latestSomethingLoaded isNil ifTrue: [ cv := version copy. cv versionStatus: matchStatus. latestSomethingLoaded := cv ] ] ]. latestSomethingLoaded ifNotNil: [ ^ cache at: cacheKey put: latestSomethingLoaded ]. ^ cache at: cacheKey put: nil ] in MetacelloMCProject(MetacelloProject)>>currentVersionAgainst: in Block: [ :cache | ... [ :dict | | cache | cache := dict at: cacheName ifAbsent: [ ]. cache ~~ nil ifTrue: [ | value hasEntry | hasEntry := true. value := cache at: key ifAbsent: [ hasEntry := false ]. hasEntry ifTrue: [ ^ value ] ] ifFalse: [ cache := cacheClass new. dict at: cacheName put: cache ]. ^ aBlock value: cache ] in IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing: in Block: [ :dict | ... [ ^ aBlock value: dict ] in IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary: in Block: [ ^ aBlock value: dict ] BlockClosure>>on:do: IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary: IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing: IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:at:doing: MetacelloMCProject(MetacelloProject)>>currentVersionAgainst: [ :cache | cv := self currentVersionAgainst: nil. ^ cache at: cacheKey put: cv ] in MetacelloMCProject(MetacelloProject)>>currentVersion in Block: [ :cache | ...
-- Dr. Geo http://drgeo.eu