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 <hilaire@drgeo.eu>:
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 <hilaire@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?
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 <hilaire@drgeo.eu>:
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 <hilaire@drgeo.eu>:
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 <baseline>
spec for: #'common' do: [ spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:working' ]. spec baseline: 'FileDialog' with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. spec package: 'Grace-Scope'. spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . 'Grace-Scope'} ]. spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'Grace-Scope'} ]. spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. spec package: 'Grace-IDE' with: [ spec requires: {'FileDialog' . 'Grace-Compiler'} ]. spec package: 'Grace-Compiler' with: [ spec requires: {'Grace-Parser' . 'Grace-Names'} ]. spec package: 'Grace-Tests' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. spec package: 'Grace-Types' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. spec package: 'Grace-TypeTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Types' } ]. spec package: 'Grace-Ast' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . 'Grace-Types'} ]. spec package: 'Grace-AstTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. ]
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:
baseline: spec <baseline>
spec for: #'common' do: [ spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:fglr' ]. spec baseline: 'FileDialog' with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. spec package: 'Grace-Scope'. spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . 'Grace-Scope'} ]. spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ]. spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. spec package: 'Grace-IDE' with: [ spec requires: {'FileDialog' . 'Grace-Compiler'} ]. spec package: 'Grace-Compiler' with: [ spec requires: {'Grace-Parser' . 'Grace-Names'} ]. spec package: 'Grace-Tests' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. spec package: 'Grace-Types' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. spec package: 'Grace-TypeTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Types' } ]. spec package: 'Grace-Ast' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . 'Grace-Types'} ]. spec package: 'Grace-AstTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. spec package: 'SmaCC-Reification'. ]
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]' <https://github.com/apblack/GraceInPharo.git%5Bmaster%5D'> 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
Sylvanite: ~/iceberg/apblack/SmaCC$ ls -d *Reif* SmaCC-Reification.package Sylvanite: ~/iceberg/apblack/SmaCC$
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
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 <apblack@pdx.edu> wrote:
I have a baselineOfGrace that has been working fine for some time:
baseline: spec <baseline>
spec for: #'common' do: [ spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:working' ]. spec baseline: 'FileDialog' with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. spec package: 'Grace-Scope'. spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . 'Grace-Scope'} ]. spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'Grace-Scope'} ]. spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. spec package: 'Grace-IDE' with: [ spec requires: {'FileDialog' . 'Grace-Compiler'} ]. spec package: 'Grace-Compiler' with: [ spec requires: {'Grace-Parser' . 'Grace-Names'} ]. spec package: 'Grace-Tests' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. spec package: 'Grace-Types' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. spec package: 'Grace-TypeTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Types' } ]. spec package: 'Grace-Ast' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . 'Grace-Types'} ]. spec package: 'Grace-AstTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. ]
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:
baseline: spec <baseline>
spec for: #'common' do: [ spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:fglr' ].
1) This is perfect.
spec baseline: 'FileDialog' with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. spec package: 'Grace-Scope'. spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . 'Grace-Scope'} ]. spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ].
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.
spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. spec package: 'Grace-IDE' with: [ spec requires: {'FileDialog' . 'Grace-Compiler'} ]. spec package: 'Grace-Compiler' with: [ spec requires: {'Grace-Parser' . 'Grace-Names'} ]. spec package: 'Grace-Tests' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. spec package: 'Grace-Types' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. spec package: 'Grace-TypeTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Types' } ]. spec package: 'Grace-Ast' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . 'Grace-Types'} ]. spec package: 'Grace-AstTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. spec package: 'SmaCC-Reification'.
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 spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ]. 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 spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'Grace-Scope'} ]. - 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 <guillermopolito@gmail.com> wrote:
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 <apblack@pdx.edu> wrote:
I have a baselineOfGrace that has been working fine for some time:
baseline: spec <baseline>
spec for: #'common' do: [ spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:working' ]. spec baseline: 'FileDialog' with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. spec package: 'Grace-Scope'. spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . 'Grace-Scope'} ]. spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'Grace-Scope'} ]. spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. spec package: 'Grace-IDE' with: [ spec requires: {'FileDialog' . 'Grace-Compiler'} ]. spec package: 'Grace-Compiler' with: [ spec requires: {'Grace-Parser' . 'Grace-Names'} ]. spec package: 'Grace-Tests' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. spec package: 'Grace-Types' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. spec package: 'Grace-TypeTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Types' } ]. spec package: 'Grace-Ast' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . 'Grace-Types'} ]. spec package: 'Grace-AstTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. ]
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:
baseline: spec <baseline>
spec for: #'common' do: [ spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:fglr' ].
1) This is perfect.
spec baseline: 'FileDialog' with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. spec package: 'Grace-Scope'. spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . 'Grace-Scope'} ]. spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ].
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.
spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. spec package: 'Grace-IDE' with: [ spec requires: {'FileDialog' . 'Grace-Compiler'} ]. spec package: 'Grace-Compiler' with: [ spec requires: {'Grace-Parser' . 'Grace-Names'} ]. spec package: 'Grace-Tests' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. spec package: 'Grace-Types' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. spec package: 'Grace-TypeTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Types' } ]. spec package: 'Grace-Ast' with: [ spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . 'Grace-Types'} ]. spec package: 'Grace-AstTests' with: [ spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. spec package: 'SmaCC-Reification'.
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
-- Guille Polito Research Engineer Centre de Recherche en Informatique, Signal et Automatique de Lille CRIStAL - UMR 9189 French National Center for Scientific Research - *http://www.cnrs.fr <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13
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:
BaselineOfSmaCC >> baseline: spec <baseline> spec for: #common do: [ spec blessing: #baseline. spec package: 'SmaCC-Source-Editing'; package: 'SmaCC-Runtime'; package: 'SmaCC-GLR-Runtime' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Debugging-Support' with: [ spec requires: 'SmaCC-Development' ]. spec package: 'SmaCC-Development' with: [ spec requires: 'SmaCC-GLR-Runtime' ]. spec for: #Alt do: [ spec package: 'SmaCC-Alt' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Development-UI' with: [ spec requires: #('SmaCC-Development' 'SmaCC-Alt' 'SmaCC-Debugging-Support') ] ]. spec for: #NoAlt do: [ spec package: 'SmaCC-Development-UI' with: [ spec requires: #('SmaCC-Development' 'SmaCC-Debugging-Support') ] ]. spec package: 'SmaCC-Tests' with: [ spec requires: 'SmaCC-Development' ]; package: 'SmaCC-Browser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Parse-Tree-Comparison' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Rewrite-Engine' with: [ spec requires: #('SmaCC-GLR-Runtime' 'SmaCC-Source-Editing' 'SmaCC-CSV-Parser') ]; package: 'SmaCC-Rewrite-Engine-Tests' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Rewrite-Engine-Command-Line' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Rewrite-Server'; package: 'SmaCC-Rewrite-Server-Worker' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Swift' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Smalltalk-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Generic-Smalltalk-Parser' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-C-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-CSV-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-CSharp' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Cucumber' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Javascript-Parser' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Java' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Python' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Python-Tests' with: [ spec requires: 'SmaCC-Python' ]; package: 'SmaCC-Line-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Delphi' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-DelphiForms' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-IDL' with: [ spec requires: 'SmaCC-Runtime' ]. spec group: 'default' with: #('Tools'); group: 'Runtime' with: #('SmaCC-GLR-Runtime'); group: 'Rewrite' with: #('SmaCC-Rewrite-Engine'); group: 'Rewrite-Server' with: #('SmaCC-Rewrite-Server-Worker' 'SmaCC-Rewrite-Server' 'Rewrite' 'SmaCC-Rewrite-Engine-Command-Line'); group: 'Tools' with: #('SmaCC-Development-UI' 'Examples' 'Rewrite' 'SmaCC-Parse-Tree-Comparison'); group: 'Debugging' with: #('SmaCC-Debugging-Support'); group: 'Examples' with: #('SmaCC-Smalltalk-Parser' 'SmaCC-C-Parser' 'SmaCC-Java' 'SmaCC-CSV-Parser' 'SmaCC-Line-Parser'); group: 'Examples-Extra' with: #('SmaCC-IDL' 'SmaCC-CSharp' 'SmaCC-Cucumber' 'SmaCC-Swift' 'SmaCC-Delphi' 'SmaCC-DelphiForms' 'SmaCC-Python' 'SmaCC-Javascript-Parser'); group: 'Tests' with: #('SmaCC-Tests' 'SmaCC-Rewrite-Engine-Tests' 'SmaCC-Python-Tests') ]
Should I add a new group, something like
spec group: 'Reification' with: #('SmaCC-Reification')
But then I must also specify the dependencies of the SmaCC-Reification package, so I need to add
spec package: 'SmaCC-Reification' with: [ spec requires: #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ]
(I assumed that this would go earlier in the method, with the other package specs. So I put it right after package: 'SmaCC-IDL') 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 git@github.com: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.
- 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' ) <> ].
This would go in the BaselineOfGrace package, right? Not in BaselineOfSmaCC
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 :)
Thanks for the help so far Andrew
Any more ideas o how to get this working? Andrew
On 11 Jul 2018, at 7:30, Andrew P. Black <apblack@pdx.edu> 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:
BaselineOfSmaCC >> baseline: spec <baseline> spec for: #common do: [ spec blessing: #baseline. spec package: 'SmaCC-Source-Editing'; package: 'SmaCC-Runtime'; package: 'SmaCC-GLR-Runtime' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Debugging-Support' with: [ spec requires: 'SmaCC-Development' ]. spec package: 'SmaCC-Development' with: [ spec requires: 'SmaCC-GLR-Runtime' ]. spec for: #Alt do: [ spec package: 'SmaCC-Alt' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Development-UI' with: [ spec requires: #('SmaCC-Development' 'SmaCC-Alt' 'SmaCC-Debugging-Support') ] ]. spec for: #NoAlt do: [ spec package: 'SmaCC-Development-UI' with: [ spec requires: #('SmaCC-Development' 'SmaCC-Debugging-Support') ] ]. spec package: 'SmaCC-Tests' with: [ spec requires: 'SmaCC-Development' ]; package: 'SmaCC-Browser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Parse-Tree-Comparison' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Rewrite-Engine' with: [ spec requires: #('SmaCC-GLR-Runtime' 'SmaCC-Source-Editing' 'SmaCC-CSV-Parser') ]; package: 'SmaCC-Rewrite-Engine-Tests' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Rewrite-Engine-Command-Line' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Rewrite-Server'; package: 'SmaCC-Rewrite-Server-Worker' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Swift' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Smalltalk-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Generic-Smalltalk-Parser' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-C-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-CSV-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-CSharp' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Cucumber' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Javascript-Parser' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Java' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Python' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Python-Tests' with: [ spec requires: 'SmaCC-Python' ]; package: 'SmaCC-Line-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Delphi' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-DelphiForms' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-IDL' with: [ spec requires: 'SmaCC-Runtime' ]. spec group: 'default' with: #('Tools'); group: 'Runtime' with: #('SmaCC-GLR-Runtime'); group: 'Rewrite' with: #('SmaCC-Rewrite-Engine'); group: 'Rewrite-Server' with: #('SmaCC-Rewrite-Server-Worker' 'SmaCC-Rewrite-Server' 'Rewrite' 'SmaCC-Rewrite-Engine-Command-Line'); group: 'Tools' with: #('SmaCC-Development-UI' 'Examples' 'Rewrite' 'SmaCC-Parse-Tree-Comparison'); group: 'Debugging' with: #('SmaCC-Debugging-Support'); group: 'Examples' with: #('SmaCC-Smalltalk-Parser' 'SmaCC-C-Parser' 'SmaCC-Java' 'SmaCC-CSV-Parser' 'SmaCC-Line-Parser'); group: 'Examples-Extra' with: #('SmaCC-IDL' 'SmaCC-CSharp' 'SmaCC-Cucumber' 'SmaCC-Swift' 'SmaCC-Delphi' 'SmaCC-DelphiForms' 'SmaCC-Python' 'SmaCC-Javascript-Parser'); group: 'Tests' with: #('SmaCC-Tests' 'SmaCC-Rewrite-Engine-Tests' 'SmaCC-Python-Tests') ]
Should I add a new group, something like
spec group: 'Reification' with: #('SmaCC-Reification')
But then I must also specify the dependencies of the SmaCC-Reification package, so I need to add
spec package: 'SmaCC-Reification' with: [ spec requires: #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ]
(I assumed that this would go earlier in the method, with the other package specs. So I put it right after package: 'SmaCC-IDL')
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 git@github.com: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.
- 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' ) <> ].
This would go in the BaselineOfGrace package, right? Not in BaselineOfSmaCC
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 :)
Thanks for the help so far
Andrew
Hi Andrew, Sorry for the late reply, On Wed, Jul 11, 2018 at 4:31 PM Andrew P. Black <apblack@pdx.edu> 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:
BaselineOfSmaCC >> baseline: spec <baseline> spec for: #common do: [ spec blessing: #baseline. spec package: 'SmaCC-Source-Editing'; package: 'SmaCC-Runtime'; package: 'SmaCC-GLR-Runtime' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Debugging-Support' with: [ spec requires: 'SmaCC-Development' ]. spec package: 'SmaCC-Development' with: [ spec requires: 'SmaCC-GLR-Runtime' ]. spec for: #Alt do: [ spec package: 'SmaCC-Alt' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Development-UI' with: [ spec requires: #('SmaCC-Development' 'SmaCC-Alt' 'SmaCC-Debugging-Support') ] ]. spec for: #NoAlt do: [ spec package: 'SmaCC-Development-UI' with: [ spec requires: #('SmaCC-Development' 'SmaCC-Debugging-Support') ] ]. spec package: 'SmaCC-Tests' with: [ spec requires: 'SmaCC-Development' ]; package: 'SmaCC-Browser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Parse-Tree-Comparison' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Rewrite-Engine' with: [ spec requires: #('SmaCC-GLR-Runtime' 'SmaCC-Source-Editing' 'SmaCC-CSV-Parser') ]; package: 'SmaCC-Rewrite-Engine-Tests' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Rewrite-Engine-Command-Line' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Rewrite-Server'; package: 'SmaCC-Rewrite-Server-Worker' with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; package: 'SmaCC-Swift' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Smalltalk-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Generic-Smalltalk-Parser' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-C-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-CSV-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-CSharp' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Cucumber' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Javascript-Parser' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Java' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-Python' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Python-Tests' with: [ spec requires: 'SmaCC-Python' ]; package: 'SmaCC-Line-Parser' with: [ spec requires: 'SmaCC-Runtime' ]; package: 'SmaCC-Delphi' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-DelphiForms' with: [ spec requires: 'SmaCC-GLR-Runtime' ]; package: 'SmaCC-IDL' with: [ spec requires: 'SmaCC-Runtime' ]. spec group: 'default' with: #('Tools'); group: 'Runtime' with: #('SmaCC-GLR-Runtime'); group: 'Rewrite' with: #('SmaCC-Rewrite-Engine'); group: 'Rewrite-Server' with: #('SmaCC-Rewrite-Server-Worker' 'SmaCC-Rewrite-Server' 'Rewrite' 'SmaCC-Rewrite-Engine-Command-Line'); group: 'Tools' with: #('SmaCC-Development-UI' 'Examples' 'Rewrite' 'SmaCC-Parse-Tree-Comparison'); group: 'Debugging' with: #('SmaCC-Debugging-Support'); group: 'Examples' with: #('SmaCC-Smalltalk-Parser' 'SmaCC-C-Parser' 'SmaCC-Java' 'SmaCC-CSV-Parser' 'SmaCC-Line-Parser'); group: 'Examples-Extra' with: #('SmaCC-IDL' 'SmaCC-CSharp' 'SmaCC-Cucumber' 'SmaCC-Swift' 'SmaCC-Delphi' 'SmaCC-DelphiForms' 'SmaCC-Python' 'SmaCC-Javascript-Parser'); group: 'Tests' with: #('SmaCC-Tests' 'SmaCC-Rewrite-Engine-Tests' 'SmaCC-Python-Tests') ]
Should I add a new group, something like
spec group: 'Reification'
with: #('SmaCC-Reification')
But then I must also specify the dependencies of the SmaCC-Reification package, so I need to add
spec package: 'SmaCC-Reification' with: [ spec requires: #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ]
(I assumed that this would go earlier in the method, with the other package specs. So I put it right after package: 'SmaCC-IDL')
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.
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 git@github.com:apblack/SmaCC.git[fglr]"
Why is it trying to load SmaCC-Reficiation? Did my changes to the baseline somehow change the default configuration too?
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...
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.
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.
- 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' ) ].
This would go in the BaselineOfGrace package, right? Not in BaselineOfSmaCC
yep.
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 :)
Thanks for the help so far
Andrew
-- Guille Polito Research Engineer Centre de Recherche en Informatique, Signal et Automatique de Lille CRIStAL - UMR 9189 French National Center for Scientific Research - *http://www.cnrs.fr <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13
> On 16 Jul 2018, at 07:27 , Guillermo Polito <guillermopolito@gmail.com> wrote:
>
> - 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...
Well, I thought that was what I did before. I tried this again, and â lo and behold â it worked! Thank you.
>
>
> 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.
>
> 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.
What still is not working is trying to reference SmaCC-Reficiation from baselineOfGrace.
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 git@github.com: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 can get SmaCC-Reification to load if I use the "load ...â menu in the Montecello extension menu to Iceberg â but only if I select the fglr branch manually. (this is reasonable, because that group is not on the working branch) I canât get SmaCC-Reification to load as a dependency for Grace-Parser. 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 git@github.com: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
Andrew P. Black wrote
I donât know what else to try!
From the error message: Could not resolve: BaselineOfSmaCC-Reification... in https://github.com/apblack/SmaCC.git[working]
I'm guessing that you can't load from two different branches of the same git repo. Can you fork the project and create a new branch that merges in the required changes from the 'working' and 'fglr' branches? ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
On 21 Jul 2018, at 08:22 , Sean P. DeNigris <sean@clipperadams.com> wrote:
Andrew P. Black wrote
I donât know what else to try!
From the error message: Could not resolve: BaselineOfSmaCC-Reification... in https://github.com/apblack/SmaCC.git[working]
I'm guessing that you can't load from two different branches of the same git repo. Can you fork the project and create a new branch that merges in the required changes from the 'working' and 'fglr' branches?
Good trysuggestion Sean. I think that there may indeed be some brokenness in the way that Pharo uses git, so that the branch spec in the baseline is not always obeyed. So I switched both of the dependencies to be on the same branch (fglr), and for good measure switched my local repo to also be on that branch.
spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:fglr' ]. spec baseline: 'SmaCC-Reification' with: [ spec repository: 'github://apblack/SmaCC:fglr' ].
The result? Nothing changes. I still get a complaint Could not resolve: BaselineOfSmaCC-Reification [BaselineOfSmaCC-Reification] in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace 33/pharo-local/package-cache git@github.com:apblack/SmaCC.git[fglr] In the git directory I can see
silverstone: ~/iceberg/apblack/SmaCC$ ls -d SmaCC-Reification.package/ SmaCC-Reification.package/ silverstone: ~/iceberg/apblack/SmaCC$ git br * fglr ...
Is it supposed to be looking for `BaselineOfSmaCC-Reification` rather than for `SmaCC-Reification`? There is no `BaselineOfSmaCC-Reification`, just a `BaselineOfSmaCC` that defines a group called `SmaCC-Refication`. (I did try replacing baseline: âSmaCC-Reificationâ by group: âSmaCC-Reificationâ , but that gave a different error.) Andrew
Andrew Black-2 wrote
spec baseline: 'SmaCC-Reification' with: [ spec repository: 'github://apblack/SmaCC:fglr' ].
This line will not work. What you're saying here is load a BaselineOfXyz where Xyz = 'SmaCC-Reification'. In fact you want to load the package. I think you can just change the keyword #basline: to #package:, although SmaCC has a 'Reification' group, which might be better. In any event, if you just want to make sure that the 'SmaCC-Reification' package is loaded when you load SmaCC, then I think what you're after is: spec baseline: 'SmaCC' with: [ spec loads: #('Reification' ) ] I think the above would replace both of your SmaCC-related lines (you can specify multiple entities in to #loads: if needed. NB. the preferred syntax in a baseline is literal arrays like above i.e. #() instead of curly-brace runtime arrays like {'Grace-Tests' . 'Grace-Ast'} ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
On 22 Jul 2018, at 19:35 , Sean P. DeNigris <sean@clipperadams.com> wrote:
Andrew Black-2 wrote
spec baseline: 'SmaCC-Reification' with: [ spec repository: 'github://apblack/SmaCC:fglr' ].
This line will not work. What you're saying here is load a BaselineOfXyz where Xyz = 'SmaCC-Reification'. In fact you want to load the package. I think you can just change the keyword #basline: to #package:, although SmaCC has a 'Reification' group, which might be better. In any event, if you just want to make sure that the 'SmaCC-Reification' package is loaded when you load SmaCC, then I think what you're after is: spec baseline: 'SmaCC' with: [ spec loads: #('Reification' ) ]
I think the above would replace both of your SmaCC-related lines (you can specify multiple entities in to #loads: if needed.
NB. the preferred syntax in a baseline is literal arrays like above i.e. #() instead of curly-brace runtime arrays like {'Grace-Tests' . 'Grace-Ast'}
Thanks for the suggestions. But now I am more confused than ever! Can you tell me what this line actually means. That is, what does the #baseline:with: method actually declare? Where should I put this statement? In baselineOfSmaCC, or baselineOfGrace? Why? Note that the SmaCC-Reification package is not part of the current normal load for SmaCC â thatâs why I have to specify it separately. Is this declaration saying the opposite? If not, what is it saying? Earlier, you wrote:
spec package: 'SmaCC-Reification' with: [ spec requires: #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ]
AFAICT this is not necessary because these dependencies are declared in BaselineOfSmaCC. These declarations are the very lines from baselineOfSmaCC that declare these dependencies â arenât they? If I take them out, how will Metacello know that loading SmaCC-Reification requires the three packages listed in the array? Iâm sorry if I sound frustrated â none of this makes any sense to me. There seems to be no documentation other than the very high-level stuff that describes th eoverall purpose of package dependencies â which I think that I understand. Andrew
Andrew Black-2 wrote
spec baseline: 'SmaCC' with: [ spec loads: #('Reification' ) ]
Can you tell me what this line actually means. That is, what does the #baseline:with: method actually declare?
It means load the 'Reification' group of the SmaCC project, as specified in BaselineOfSmaCC. The 'Reification' group includes the SmaCC-Reification package, and by extension its dependencies as specified by the baseline. Andrew Black-2 wrote
Where should I put this statement? In baselineOfSmaCC, or baselineOfGrace? Why?
baselineOfGrace. You're saying that SmaCC (specifically the Reification group) is a dependency of Grace. You should probably also add Smacc the the #requires: list of whatever (e.g. package(s)) requires it. Deep into Pharo (http://books.pharo.org/deep-into-pharo/) Chapter 9 gives a pretty good explanation of much of Metacello. Ignore the gopher stuff which has been replaced by the Metacello scripting API. Also, the book was written when baseline methods were in Configuration classes, whereas now for git they are reified into BaselineOf classes, but the API of the actual method is still the same so it should help clarify. ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Guillermo Polito wrote
But then I must also specify the dependencies of the SmaCC-Reification package, so I need to add
spec package: 'SmaCC-Reification' with: [ spec requires: #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ]
AFAICT this is not necessary because these dependencies are declared in BaselineOfSmaCC. In fact the whole point of Metacello is that you can refer just to the specific entity within a project you want to load and Metacello should take care of bringing along all its dependencies. ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
participants (7)
-
Andrew Black -
Andrew P. Black -
Guillermo Polito -
Hilaire -
Paul DeBruicker -
Sean P. DeNigris -
Thierry Goubier