Howto BaselineOf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 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