Hi,
I have this enclosed BaselineOfDrGeo which I think contains mostly all I need. How should I load it? This code bellow does not work: (BaselineOfDrGeo project version: #development) load. By the way the PharoDebug log file is not recorded along the image, but at the user root directory. Is it wished? ... -- Dr. Geo http://drgeo.eu |
Hi Hilaire,
try Metacello new baseline: 'DrGeo'; repository: 'tonel://', SmalltalkImage current imageDirectory pathString, '/src'; load Thierry 2018-04-03 10:34 GMT+02:00 Hilaire <[hidden email]>: > Hi, > > I have this enclosed BaselineOfDrGeo which I think contains mostly all I > need. > > How should I load it? This code bellow does not work: > > (BaselineOfDrGeo project version: #development) load. > > By the way the PharoDebug log file is not recorded along the image, but at > the user root directory. Is it wished? > > ... > > > -- > Dr. Geo > http://drgeo.eu > |
Hi Thierry,
Does not work either. PharoDebug.log is not updated with this error. I paste bellow the stack from the debugger (but there is a no attribute values). Hilaire MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer: [ | references nearestReference cachedReference externalReference mcVersion loadedVersionInfos | cachedReference := nil. packageSpec searchCacheRepositoryForPackage: [ "check to see if mcz file is already in cacheRepository" cachedReference := self resolvePackageSpec: packageSpec cachedGofer: self loaderPolicy cacheGofer. (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ]) ifTrue: [ cachedReference name = packageSpec file ifTrue: [ "exact match between packageSpec file and cache" ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference ] ] ]. references := self retryingResolvePackageSpecReferences: packageSpec gofer: gofer. "look up mcz file" nearestReference := references last asMetacelloCachingResolvedReference. (cachedReference ~~ nil and: [ cachedReference name = nearestReference name ]) ifTrue: [ "latest reference in repository matches cachedReference ... " ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference ]. (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor: packageSpec) ~~ nil ]) ifTrue: [ "If the mcz is already loaded into the image, no need to copy" loadedVersionInfos do: [ :info | info name = nearestReference name ifTrue: [ | spc | spc := packageSpec copy. spc file: info name. (MetacelloIgnorePackageLoaded signal: spc) ifFalse: [ ^ self ] ] ] ]. externalReference := (references select: [ :ref | ref name = nearestReference name ]) first asMetacelloCachingResolvedReference. self repositoryMap at: externalReference name put: externalReference repository. (self resolveDependencies: externalReference nearest: nearestReference into: (OrderedCollection with: nearestReference)) do: [ :reference | | pSpec l | mcVersion := reference version. (l := (GoferVersionReference name: reference name) resolveAllWith: self loaderPolicy cacheGofer) isEmpty ifTrue: [ self cacheRepository storeVersion: mcVersion. reference == nearestReference ifTrue: [ pSpec := packageSpec ] ifFalse: [ pSpec := packageSpec project packageSpec. pSpec name: mcVersion package name ]. self loadData addVersion: mcVersion versionInfo: mcVersion info resolvedReference: reference packageSpec: pSpec ] ]. self scheduleFetchFor: packageSpec externalReference: externalReference ] in MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block: [ | references nearestReference cachedReference ex...etc... IceMetacelloPharoPlatform(MetacelloPlatform)>>do:displaying: MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: MetacelloPackageSpec>>loadUsing:gofer: [ :pkg | pkg loadUsing: self gofer: gofer ] in MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories: in Block: [ :pkg | pkg loadUsing: self gofer: gofer ] Array(SequenceableCollection)>>do: MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories: [ super linearLoadPackageSpecs: packageSpecs repositories: repositories ] in MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories: in Block: [ super... BlockClosure>>ensure: MetacelloLoaderPolicy>>pushLoadDirective:during: MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for: MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories: MetacelloPackageSpec>>explicitLoadUsing: MetacelloPackageSpec>>load [ spec projectPackage load ] in MetacelloScriptEngine>>getBaselineUnconditionalLoad: in Block: [ spec projectPackage load ] BlockClosure>>on:do: MetacelloScriptEngine>>getBaselineUnconditionalLoad: MetacelloScriptEngine>>getBaselineProjectUnconditionalLoad: MetacelloMCBaselineProject>>projectForScriptEngine:unconditionalLoad: MetacelloMCBaselineProject(MetacelloProject)>>projectForScriptEngine: MetacelloMCBaselineOfProjectSpec(MetacelloMCProjectSpec)>>versionForScriptEngine: [ | version loadedSpec | self setDefaultsAndValidateProjectSpec. [ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade do: [ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ]. version := loadedSpec versionForScriptEngine: self. self root: (required isEmpty ifTrue: [ version load ] ifFalse: [ version load: required ]) loadDirective. loadedSpec loads: required. MetacelloProjectRegistration registrationForProjectSpec: loadedSpec ifAbsent: [ :new | new loadedInImage: true; registerProject ] ifPresent: [ :existing :new | existing copyOnWrite: [ :existingCopy | existingCopy loadedInImage: true; merge: new ] ] ] in [ self handleNotificationsForAction: [ | version loadedSpec | self setDefaultsAndValidateProjectSpec. [ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade do: [ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ]. version := loadedSpec versionForScriptEngine: self. self root: (required isEmpty ifTrue: [ version load ] ifFalse: [ version load: required ]) loadDirective. loadedSpec loads: required. MetacelloProjectRegistration registrationForProjectSpec: loadedSpec ifAbsent: [ :new | new loadedInImage: true; registerProject ] ifPresent: [ :existing :new | existing copyOnWrite: [ :existingCopy | existingCopy loadedInImage: true; merge: new ] ] ] ] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: in Block: [ | version loadedSpec |... BlockClosure>>on:do: [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] in [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] on: MetacelloAllowLockedProjectChange do: [ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: in Block: [ actionBlock... BlockClosure>>on:do: [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] on: MetacelloAllowLockedProjectChange do: [ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: in Block: [ [ actionBlock... BlockClosure>>on:do: [ [ [ actionBlock on: MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad , MetacelloProjectSpecLoadedNotification , MetacelloScriptEnsureProjectLoadedForDevelopment , MetacelloLookupBaselineSpecForEnsureLoad do: [ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade , MetacelloAllowConflictingProjectUpgrade do: [ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] on: MetacelloAllowLockedProjectChange do: [ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: in Block: [ [ [ actionBlock... BlockClosure>>on:do: Le 03/04/2018 à 10:51, Thierry Goubier a écrit : > Hi Hilaire, > > try > > Metacello new > baseline: 'DrGeo'; > repository: 'tonel://', SmalltalkImage current imageDirectory > pathString, '/src'; > load > > Thierry -- Dr. Geo http://drgeo.eu |
Moving the BaselineOfDrGeo out of the ConfigurationOfDrGeo package in
the file based tonel helps to get over this error. More error followed but need to be examined. Le 03/04/2018 à 11:42, Hilaire a écrit : > Does not work either. > > PharoDebug.log is not updated with this error. I paste bellow the > stack from the debugger (but there is a no attribute values). -- Dr. Geo http://drgeo.eu |
Ok, adding the package names was needed in the baseline and resolved the
remaining errors: spec package: 'DrGeoII-core'; package: 'DrGeoII-Polymorph'; etc. Now I would like to insert in the BaselineOf a version number more meaningfull than <baseline> I want to extract from 'BaselineOfDrGeo project version' an object with a DrGeo release number (aka 18.06, etc.) How can I insert it in the BaselineOfDrGeo? Le 03/04/2018 à 12:20, Hilaire a écrit : > Moving the BaselineOfDrGeo out of the ConfigurationOfDrGeo package in > the file based tonel helps to get over this error. More error followed > but need to be examined. -- Dr. Geo http://drgeo.eu |
Hi Hilaire,
2018-04-03 12:40 GMT+02:00 Hilaire <[hidden email]>: > Ok, adding the package names was needed in the baseline and resolved the > remaining errors: > > spec package: 'DrGeoII-core'; package: 'DrGeoII-Polymorph'; etc. > > Now I would like to insert in the BaselineOf a version number more > meaningfull than <baseline> > > I want to extract from 'BaselineOfDrGeo project version' an object with a > DrGeo release number (aka 18.06, etc.) > > How can I insert it in the BaselineOfDrGeo? Normally, you should do it via the repository url. If you use tags in your repository management and integration into Monticello (like filetree and gitfiletree), you can retrieve a branch or tag name by scanning the repository url: for example, github://XX/DrGeo:18.06/src. Thierry > > > Le 03/04/2018 à 12:20, Hilaire a écrit : >> >> Moving the BaselineOfDrGeo out of the ConfigurationOfDrGeo package in the >> file based tonel helps to get over this error. More error followed but need >> to be examined. > > > -- > Dr. Geo > http://drgeo.eu > > > |
I don't use github. I will just use a class method returning a version
number. Le 03/04/2018 à 14:14, Thierry Goubier a écrit : > Normally, you should do it via the repository url. If you use tags in > your repository management and integration > into Monticello (like filetree and gitfiletree), you can retrieve a > branch or tag name by scanning the repository > url: for example, github://XX/DrGeo:18.06/src. -- Dr. Geo http://drgeo.eu |
2018-04-03 15:25 GMT+02:00 Hilaire <[hidden email]>:
> I don't use github. I will just use a class method returning a version > number. Couldn't you call a bazaar routine to get that information? Writing a specific method with the version number on each release is a bit of a pain, to have practised that before. Unless you write a release command that adds the code and do the necessary stuff to package the release. Thierry > > Le 03/04/2018 à 14:14, Thierry Goubier a écrit : >> >> Normally, you should do it via the repository url. If you use tags in >> your repository management and integration >> into Monticello (like filetree and gitfiletree), you can retrieve a >> branch or tag name by scanning the repository >> url: for example, github://XX/DrGeo:18.06/src. > > > -- > Dr. Geo > http://drgeo.eu > > > |
Probably, but my hands are already full.
Le 03/04/2018 à 15:52, Thierry Goubier a écrit : > Couldn't you call a bazaar routine to get that information? > > Writing a specific method with the version number on each release is a > bit of a pain, to have practised that before. > Unless you write a release command that adds the code and do the > necessary stuff to package the release. > > Thierry -- Dr. Geo http://drgeo.eu |
2018-04-03 16:31 GMT+02:00 Hilaire <[hidden email]>:
> Probably, but my hands are already full. Mine as well :( I still believe a "release" kind of script could help, associated with a project: update the baselineOf, save everything with a nice commit, tag the commit, done. I would need one for OSProcess, and for the GitFileTree-MergeDriver. But it's kind of specific to the way you package DrGeo, so no single command would fit. Thierry > > > > Le 03/04/2018 à 15:52, Thierry Goubier a écrit : >> >> Couldn't you call a bazaar routine to get that information? >> >> Writing a specific method with the version number on each release is a >> bit of a pain, to have practised that before. >> Unless you write a release command that adds the code and do the >> necessary stuff to package the release. >> >> Thierry > > > -- > Dr. Geo > http://drgeo.eu > > > |
I think doing something à la M4, to process macro in the BaselineOf
files, but it will add confusion to the confusion. Now, in the bazaar repo I don't have release version number either. Le 03/04/2018 à 16:57, Thierry Goubier a écrit : > Mine as well:( > > I still believe a "release" kind of script could help, associated with > a project: update the baselineOf, save everything with a nice commit, > tag the commit, done. > > I would need one for OSProcess, and for the GitFileTree-MergeDriver. > > But it's kind of specific to the way you package DrGeo, so no single > command would fit. > > Thierry -- Dr. Geo http://drgeo.eu |
I have a baselineOfGrace that has been working fine for some time:
baseline: spec Now I have added a dependency from the package ‘Grace-Parser’ on the package 'SmaCC-Reification’. The latter exists only within the branch SmaCC called ‘fglr’. So I have changed my baseline to the following:
Notice that I have changed the branch of SmaCC, added the dependency to ‘Grace-Parser’, and added a spec package" statement for ‘SmaCC-Reification’ This does not work. I get a MetacelloPackageSpecResolutionError: 'Could not resolve: SmaCC-Reification [SmaCC-Reification] in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace 0.34/pharo-local/package-cache https://github.com/apblack/GraceInPharo.git[master]' This is not surprising, because there is nothing in that package-cache. I have configured iceberg to use a shared directory (~/iceberg), and SmaCC has been cloned there — including the 'SmaCC-Reification’ package
What is going wrong, and how can I get this configured to work correctly? Thanks to all! Andrew |
Seems like its not looking in your iceberg directory/subdirectories for the
SmaCC-Reification package. Just the package-cache and on github. Did you try adding a SmaCC-Reification specific repository declaration yet to your baseline? e.g. spec package: 'SmaCC-Reification' with:[ spec repository:'/my/full/path/iceberg/apblack/SmaCC'] I'm definitely in the "fiddle around with stuff until it works" level of competency on Baselines so there may be a better (correct :) ) way. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html |
In reply to this post by AndrewBlack
Hi Andrew,
I'd say you got almost everything right. Let me try to guide you to fix what's not so well and see if you can make it work. On Sun, Jul 8, 2018 at 4:19 PM Andrew P. Black <[hidden email]> wrote:
1) This is perfect.
2) This... It depends: Does the BaselineOfSmaCC export a package/group with that name? When you import another project, you should think a baseline as a kind of black box, where the only things you can import are those declared in the baseline. If that baseline loads other stuff you don't care. In other words, this means that the BaselineOfSmaCC that lives in the `fglr` branch needs to have a `spec package: 'SmaCC-Reification'` expression to work.
3) And this is wrong :). You don't need to specify external packages like this. It's not up to your baseline to load SmaCC stuff. Your baseline describes things in your grace repository. It's up to SmaCC's baseline to describe every loadable unit (package, group...) that you can depend on. So in summary, you should do 1) and 2) in BaselineOfGrace and make sure that 3) is done in BaselineOfSmacc. Keep us posted! Guille |
To give a bit more of insight (and fill some holes in my explanation because I couldn't finish my coffee yet :)), actually, your baseline does not work because in the metacello spec you're saying that 'SmaCC-Reification' resides in Grace's repository, which is wrong I assume. So metacello will try to load that dependency (and fail) and so, it will fail to load Grace-Parser (transitivity...). And now that I think it better, even putting
Is wrong. - First thing is to see if SmaCC exports SmaCC-Reification by default or in a separate group. - If SmaCC-Reification is downloaded by default, you just need - If SmaCC-Reification is in a non-default group, you probably want to add spec baseline: 'SmaCC-Reification' with: [ spec repository: 'github://apblack/SmaCC:working'; loads: #( 'NAME-OF-YOUR-REIFICATION-GROUP' ) ]. And then your packages can depend on it. - IF SmaCC-Reification is not in the SmaCC baseline, then, there is nothing you can do, but to add it :) On Mon, Jul 9, 2018 at 9:29 AM Guillermo Polito <[hidden email]> wrote:
|
Hi Guillermo,
Thanks for the explanation. I guess that I really don't have much idea how this baseline stuff is supposed to work, so when it fails, I don't know where to look. My initial question was about why iceberg (or Metacello?) was looking in the wrong directory, but that seems to have been the wrong question. So, you are right; the BaselineOfSmaCC has not been updated to include the SmaCC-Reification package, which is new (and experimental). So it seems that I have to add it. Here is the current baseline:
Should I add a new group, something like spec group: 'Reification' with: #('SmaCC-Reification') spec package: 'SmaCC-Reification' with: [ spec requires: #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ] Once I've done that, I tried to load the BaselineOfSmaCC again, and I find that I've broken it. I get a walkback with the message "Could not resolve: SmaCC-Reification [SmaCC-Reification] in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace 0.34/pharo-local/package-cache [hidden email]:apblack/SmaCC.git[fglr]" Why is it trying to load SmaCC-Reficiation? Did my changes to the baseline somehow change the default configuration too? Moreover, my original problem is still there — it's looking in a nonexistent package cache, rather than on github, or in my ~/iceberg/apblack/SmaCC clone of github.
Thanks for the help so far Andrew |
Any more ideas o how to get this working?
Andrew
|
In reply to this post by AndrewBlack
Hi Andrew,
Sorry for the late reply, On Wed, Jul 11, 2018 at 4:31 PM Andrew P. Black <[hidden email]> wrote:
Yep. You must do both :). Also, I think the order is not important, they are just declarations, the engine takes care of calculating the order later.
By default, if you don't specify anything, a baseline will load **all described packages**. If you want to override that behaviour, AFAIR you need to override the #default group spec group: 'default' with: #( .... ) Actually, I've cloned your project and see that default is defined as download tools. So, how are you loading your project. Moreover, I've just tried it and it worked, so there is something else to it: - I've cloned SmaCC - I've checked out the flgr branch - I've loaded the baseline and added spec package: 'SmaCC-Reification' with: [ spec requires: #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ]- then, I've done right click on the iceberg project and selected Metacello -> load baseline... => then inserted SmaCC-Reification and I got that package + dependencies loaded...
I don't think this is quite like that... Metacello will try to lookup the package in several places. And it will check at last the package cache. So it fails because it was not able to found that package in any of your repositories, but the last it checked was the package cache.
yep.
|
In `baselineOfGrace` I’ve put: spec package: 'Grace-Parser' with: [
spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ] but I still get the walkback > Could not resolve: BaselineOfSmaCC-Reification [BaselineOfSmaCC-Reification] in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace 32/pharo-local/package-cache [hidden email]:apblack/SmaCC.git[fglr] I took that message to mean that it was listing all the places that it had looked: first the non-existant package cache, and then githib. Is that wrong? Is it actually looking in my shared iceberg directory, but just not saying so? Does this only work after I have pushed everything to github? I like to get it working before I push. Andrew |
I’ve spent another couple of hours on this, and here is where I stand.
I’ve tried pushing everything back to github. I’ve tried temporarily moving my git repos into the image directory (i.e., I’ve turned off the Iceberg setting to use a shared iceberg directory.) I still get > Could not resolve: BaselineOfSmaCC-Reification [BaselineOfSmaCC-Reification] in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace 33/pharo-local/package-cache [hidden email]:apblack/SmaCC.git[fglr] I get this message even after I have loaded SmaCC-Reification by hand. I don’t know what else to try! My repo is on github: apblack/GraceInPharo. I’m stranded until I can get this working. Andrew |
Free forum by Nabble | Edit this page |