Howto BaselineOf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Howto BaselineOf

HilaireFernandes
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


BaselineOfDrGeo.class.st (1K) Download Attachment
PharoDebug.log (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

Thierry Goubier
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
>

Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

HilaireFernandes
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



Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

HilaireFernandes
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



Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

HilaireFernandes
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



Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

Thierry Goubier
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
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

HilaireFernandes
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



Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

Thierry Goubier
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
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

HilaireFernandes
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



Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

Thierry Goubier
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
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Howto BaselineOf

HilaireFernandes
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



Reply | Threaded
Open this post in threaded view
|

Changing a BaselineOf... to include one more package

Andrew P. Black
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: '<a href="github://apblack/SmaCC:working'" class="">github://apblack/SmaCC:working' ].
spec
baseline: 'FileDialog'
with: [ spec repository: '<a href="github://peteruhnak/file-dialog/repository'" class="">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: '<a href="github://apblack/SmaCC:fglr'" class="">github://apblack/SmaCC:fglr' ].
spec
baseline: 'FileDialog'
with: [ spec repository: '<a href="github://peteruhnak/file-dialog/repository'" class="">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]'

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




Reply | Threaded
Open this post in threaded view
|

Re: Changing a BaselineOf... to include one more package

Paul DeBruicker
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

Reply | Threaded
Open this post in threaded view
|

Re: Changing a BaselineOf... to include one more package

Guillermo Polito
In reply to this post by Andrew P. Black
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:
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
Reply | Threaded
Open this post in threaded view
|

Re: Changing a BaselineOf... to include one more package

Guillermo Polito
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'

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 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:
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


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: Changing a BaselineOf... to include one more package

Andrew P. Black
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 [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.

- If SmaCC-Reification is in a non-default group, you probably want to add 

spec
    baseline: 'SmaCC-Reification'


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

Reply | Threaded
Open this post in threaded view
|

Re: Changing a BaselineOf... to include one more package

Andrew P. Black
Any more ideas o how to get this working?

Andrew

On 11 Jul 2018, at 7:30, Andrew P. Black <[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:

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 [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.

- If SmaCC-Reification is in a non-default group, you probably want to add 

spec
    baseline: 'SmaCC-Reification'


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


Reply | Threaded
Open this post in threaded view
|

Re: Changing a BaselineOf... to include one more package

Guillermo Polito
In reply to this post by Andrew P. Black
Hi Andrew,

Sorry for the late reply,

On Wed, Jul 11, 2018 at 4:31 PM Andrew P. Black <[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:

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 [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?  

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'


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


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13