Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
November 2014
- 1013 messages
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by Dale Henrichs
Kilon,
Regarding Pharo4.0 and Metacello, I just recently added Pharo4.0 support to
Metacello[1] and buildCI[2].
If you are using github, then you should checkout builderCI. BuilderCI
let's you hook into travis-ci[3] and run unit tests on every commit. It's
especially useful when you get a pull request, because the unit tests are
run against the MERGED version of the pull request (BEFORE you do the
merge), so you can be assured that when you do the merge, your tests will
be green ...
Let me know if the builderCI instructions[4] work for you...It's been
awhile since I've reviewed the docs:)
Dale
[1] https://groups.google.com/forum/#!topic/metacello/TVzfP8ZwPPE
[2] https://github.com/dalehenrich/builderCI
[3] https://travis-ci.org/
[4] https://github.com/dalehenrich/builderCI#using-builderci
On Sat, Nov 15, 2014 at 8:55 AM, kilon alios <kilon.alios(a)gmail.com> wrote:
> YESSSS!!!!
>
> thanks Dale, you are awesome, it works like a charm for me now.
>
> Yes you needed to download the Pharo3DarkTheme because the Theme is
> installed by default in Pharo 4 and I dont intent on supporting pharo 3
> with my project. If you tried Pharo 4 you would have no such issue.
>
> I would appreciate it if other people could spend just a minute getting
> latest Pharo 4 and trying this in a Workspace
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/nireas:master';
> get.
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/nireas:master';
> load.
>
> Then open a System Browser and make sure Nireas package exist and please
> report it here if its not much trouble. This solution is super easy for
> installing git repos and we could make a class to make it even easier with
> a single line command.
>
> Question: Why Pharo 4 has not got the latest Metacello ?
>
> On Sat, Nov 15, 2014 at 6:33 PM, Dale Henrichs <
> dale.henrichs(a)gemtalksystems.com> wrote:
>
>> Kilon,
>>
>> This code:
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> get;
>> load.
>>
>> does require a pretty recent version of Metacello ("chaining" the get and
>> load)[1]. I tried the following in a stock pharo3.0 and got an error about
>> requiring Pharo3DarkTheme, so I was able to load the package:
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> get.
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> load.
>>
>> Dale
>>
>> [1] https://github.com/dalehenrich/metacello-work#pharo30
>>
>> On Sat, Nov 15, 2014 at 3:13 AM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> ok after rereading your emails more carefully i realised that you meant
>>> that BaselineOf should go to its own package, so I moved the class to
>>> BaselineOfNireas package and now it does not report the same error but now
>>> it complain that project,baseline or configuration not specified.
>>>
>>> Is it mandatory to specify a configuration for my project , I though the
>>> baseline class was enough. Would love to hear more info on the subject, I
>>> am looking also at the Metacello chapter which by the way is in Deep Into
>>> Pharo and not PBE , I see loads of info on the subject but does not seem to
>>> mention anything about the BaselineOf class .
>>>
>>> Will love it if we can gave a simple way to load git repos to pharo 4.
>>>
>>> On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> small typo in my paste
>>>>
>>>> the actual code i used is
>>>>
>>>> Metacello new
>>>> baseline:'Nireas';
>>>> repository:'github://kilon/Nireas:master';
>>>> get;
>>>> load.
>>>>
>>>> any help is appreciated :)
>>>>
>>>> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
>>>> wrote:
>>>>
>>>>> hello Dale I tried your approach with a new project I created called
>>>>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>>>>> it complains that it cannot find the BaselineOfNireas
>>>>>
>>>>> This is the code I used
>>>>>
>>>>> Metacello new
>>>>> baseline:'Nireas';
>>>>> repository:'github://kilon/nireas:master';
>>>>> get;
>>>>> load.
>>>>>
>>>>> here is the repo
>>>>>
>>>>> https://github.com/kilon/Nireas
>>>>>
>>>>> and here is the error
>>>>>
>>>>>
>>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>>>> linearLoadPackageSpec: packageSpec gofer: gofer
>>>>> MetacelloPlatform current
>>>>> do: [
>>>>> | references nearestReference cachedReference externalReference
>>>>> mcVersion loadedVersionInfos |
>>>>> "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
>>>>> ] ]. "look up mcz file"
>>>>> references := self retryingResolvePackageSpecReferences: packageSpec
>>>>> gofer: gofer.
>>>>> nearestReference := references last
>>>>> asMetacelloCachingResolvedReference. "If the mcz is already in the
>>>>> cacheRepository, no need to copy"
>>>>> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
>>>>> name ])
>>>>> ifTrue: [
>>>>> "latest reference in repository matches cachedReference ... "
>>>>> ^ self scheduleFetchFor: packageSpec nearestReference:
>>>>> nearestReference ]. "If the mcz is already loaded into the image, no
>>>>> need to copy"
>>>>> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
>>>>> packageSpec) ~~ nil ])
>>>>> ifTrue: [
>>>>> loadedVersionInfos
>>>>> do: [ :info |
>>>>> info name = nearestReference name
>>>>> ifTrue: [ ^ 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 ]
>>>>> displaying: 'Fetching ' , packageSpec file in
>>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>>>>> linearLoadPackageSpec: packageSpec gofer: gofer...
>>>>> MetacelloPharo30Platform(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 linearLoadPackageSpecs: packageSpecs repos...etc...
>>>>> BlockClosure>>ensure:
>>>>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>>>>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>>>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>>>> MetacelloPackageSpec>>explicitLoadUsing:
>>>>> MetacelloPackageSpec>>load
>>>>> [
>>>>> self setDefaultsAndValidateProjectSpec.
>>>>> spec := self projectSpec.
>>>>> projectPackage := spec projectPackage.
>>>>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>>>>> createRepository flushForScriptGet ].
>>>>> projectPackage load.
>>>>> self root: (Smalltalk at: spec className asSymbol) project.
>>>>> MetacelloProjectRegistration
>>>>> registrationForProjectSpec: spec
>>>>> ifAbsent: [ :new | new registerProject ]
>>>>> ifPresent: [ :existing :new |
>>>>> existing
>>>>> copyOnWrite: [ :existingCopy |
>>>>> spec
>>>>> copyForRegistration: existingCopy
>>>>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>>>>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>>>>> MetacelloScriptEngine>>get in Block: [ ...
>>>>> BlockClosure>>ensure:
>>>>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>>>>> MetacelloScriptEngine>>get
>>>>> [ :projectSpec |
>>>>> | engine |
>>>>> engine := MetacelloScriptEngine new
>>>>> options: self options copy;
>>>>> projectSpec: projectSpec;
>>>>> yourself.
>>>>> engine perform: actionArg key withArguments: actionArg value.
>>>>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>>>>> :projectSpec | ...
>>>>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
>>>>> applyArgsToProjectSpec: projectSpec copy) ] ] in
>>>>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>>>>> projectSpec ifNotNil: [ projectSp...etc...
>>>>> Array(SequenceableCollection)>>do:
>>>>> MetacelloScriptApiExecutor>>executeString:do:
>>>>> ByteString(String)>>execute:against:
>>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>>>>> Metacello>>execute
>>>>> Metacello>>get
>>>>> UndefinedObject>>DoIt
>>>>> OpalCompiler>>evaluate
>>>>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thank you Dale very much , this is very clear :)
>>>>>>
>>>>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>>>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Thank you Dale, this is more simple than I expected.
>>>>>>>>
>>>>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>>>>> branch .Which in my case is master so it should be
>>>>>>>>
>>>>>>>> Metacello new
>>>>>>>> baseline: 'BaselineOfXXX';
>>>>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>>>>> get;
>>>>>>>> load.
>>>>>>>>
>>>>>>>> https://github.com/kilon/phEphestos
>>>>>>>>
>>>>>>>
>>>>>>> From looking at your repo on githug, the expression would be:
>>>>>>>
>>>>>>> Metacello new
>>>>>>> baseline: 'Ephestos';
>>>>>>> repository: 'github://kilon/phEphestos:master'
>>>>>>> get;
>>>>>>> load.
>>>>>>>
>>>>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>>>>> just the base name of the project.
>>>>>>>
>>>>>>> You also need to create a BaselineOfEphestos which specifies
>>>>>>> package load order. BaselineOfEphestos would be created as a subclass of
>>>>>>> BaselineOf and have a single method:
>>>>>>>
>>>>>>> baseline: spec
>>>>>>> <baseline>
>>>>>>> spec
>>>>>>> for: #pharo
>>>>>>> do: [
>>>>>>> spec package: 'Ephestos' ].
>>>>>>>
>>>>>>> Then the above expression would load the Epestos package.
>>>>>>>
>>>>>>> If you were to add another package, say EphestosTests, then you'd
>>>>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>>>>> loaded first you'd edit the baseline: method:
>>>>>>>
>>>>>>> baseline: spec
>>>>>>> <baseline>
>>>>>>> spec
>>>>>>> for: #pharo
>>>>>>> do: [
>>>>>>> spec
>>>>>>> package: 'Ephestos';
>>>>>>> package: 'EphestosTests' with: [ spec requires: #(
>>>>>>> 'Ephestos' ) ] ].
>>>>>>>
>>>>>>> You commit the BaselineOf along with the rest of the packages for
>>>>>>> your project ...
>>>>>>>
>>>>>>> For more information see the Metacello chapter in Pharo by Example...
>>>>>>>
>>>>>>> Dale
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by kilon alios
YESSSS!!!!
thanks Dale, you are awesome, it works like a charm for me now.
Yes you needed to download the Pharo3DarkTheme because the Theme is
installed by default in Pharo 4 and I dont intent on supporting pharo 3
with my project. If you tried Pharo 4 you would have no such issue.
I would appreciate it if other people could spend just a minute getting
latest Pharo 4 and trying this in a Workspace
Metacello new
baseline:'Nireas';
repository:'github://kilon/nireas:master';
get.
Metacello new
baseline:'Nireas';
repository:'github://kilon/nireas:master';
load.
Then open a System Browser and make sure Nireas package exist and please
report it here if its not much trouble. This solution is super easy for
installing git repos and we could make a class to make it even easier with
a single line command.
Question: Why Pharo 4 has not got the latest Metacello ?
On Sat, Nov 15, 2014 at 6:33 PM, Dale Henrichs <
dale.henrichs(a)gemtalksystems.com> wrote:
> Kilon,
>
> This code:
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/Nireas:master';
> get;
> load.
>
> does require a pretty recent version of Metacello ("chaining" the get and
> load)[1]. I tried the following in a stock pharo3.0 and got an error about
> requiring Pharo3DarkTheme, so I was able to load the package:
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/Nireas:master';
> get.
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/Nireas:master';
> load.
>
> Dale
>
> [1] https://github.com/dalehenrich/metacello-work#pharo30
>
> On Sat, Nov 15, 2014 at 3:13 AM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> ok after rereading your emails more carefully i realised that you meant
>> that BaselineOf should go to its own package, so I moved the class to
>> BaselineOfNireas package and now it does not report the same error but now
>> it complain that project,baseline or configuration not specified.
>>
>> Is it mandatory to specify a configuration for my project , I though the
>> baseline class was enough. Would love to hear more info on the subject, I
>> am looking also at the Metacello chapter which by the way is in Deep Into
>> Pharo and not PBE , I see loads of info on the subject but does not seem to
>> mention anything about the BaselineOf class .
>>
>> Will love it if we can gave a simple way to load git repos to pharo 4.
>>
>> On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> small typo in my paste
>>>
>>> the actual code i used is
>>>
>>> Metacello new
>>> baseline:'Nireas';
>>> repository:'github://kilon/Nireas:master';
>>> get;
>>> load.
>>>
>>> any help is appreciated :)
>>>
>>> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> hello Dale I tried your approach with a new project I created called
>>>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>>>> it complains that it cannot find the BaselineOfNireas
>>>>
>>>> This is the code I used
>>>>
>>>> Metacello new
>>>> baseline:'Nireas';
>>>> repository:'github://kilon/nireas:master';
>>>> get;
>>>> load.
>>>>
>>>> here is the repo
>>>>
>>>> https://github.com/kilon/Nireas
>>>>
>>>> and here is the error
>>>>
>>>>
>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>>> linearLoadPackageSpec: packageSpec gofer: gofer
>>>> MetacelloPlatform current
>>>> do: [
>>>> | references nearestReference cachedReference externalReference
>>>> mcVersion loadedVersionInfos |
>>>> "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 ]
>>>> ]. "look up mcz file"
>>>> references := self retryingResolvePackageSpecReferences: packageSpec
>>>> gofer: gofer.
>>>> nearestReference := references last asMetacelloCachingResolvedReference. "If
>>>> the mcz is already in the cacheRepository, no need to copy"
>>>> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
>>>> name ])
>>>> ifTrue: [
>>>> "latest reference in repository matches cachedReference ... "
>>>> ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference
>>>> ]. "If the mcz is already loaded into the image, no need to copy"
>>>> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
>>>> packageSpec) ~~ nil ])
>>>> ifTrue: [
>>>> loadedVersionInfos
>>>> do: [ :info |
>>>> info name = nearestReference name
>>>> ifTrue: [ ^ 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
>>>> ]
>>>> displaying: 'Fetching ' , packageSpec file in
>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>>>> linearLoadPackageSpec: packageSpec gofer: gofer...
>>>> MetacelloPharo30Platform(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 linearLoadPackageSpecs: packageSpecs repos...etc...
>>>> BlockClosure>>ensure:
>>>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>>>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>>> MetacelloPackageSpec>>explicitLoadUsing:
>>>> MetacelloPackageSpec>>load
>>>> [
>>>> self setDefaultsAndValidateProjectSpec.
>>>> spec := self projectSpec.
>>>> projectPackage := spec projectPackage.
>>>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>>>> createRepository flushForScriptGet ].
>>>> projectPackage load.
>>>> self root: (Smalltalk at: spec className asSymbol) project.
>>>> MetacelloProjectRegistration
>>>> registrationForProjectSpec: spec
>>>> ifAbsent: [ :new | new registerProject ]
>>>> ifPresent: [ :existing :new |
>>>> existing
>>>> copyOnWrite: [ :existingCopy |
>>>> spec
>>>> copyForRegistration: existingCopy
>>>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>>>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>>>> MetacelloScriptEngine>>get in Block: [ ...
>>>> BlockClosure>>ensure:
>>>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>>>> MetacelloScriptEngine>>get
>>>> [ :projectSpec |
>>>> | engine |
>>>> engine := MetacelloScriptEngine new
>>>> options: self options copy;
>>>> projectSpec: projectSpec;
>>>> yourself.
>>>> engine perform: actionArg key withArguments: actionArg value.
>>>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>>>> :projectSpec | ...
>>>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
>>>> applyArgsToProjectSpec: projectSpec copy) ] ] in
>>>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>>>> projectSpec ifNotNil: [ projectSp...etc...
>>>> Array(SequenceableCollection)>>do:
>>>> MetacelloScriptApiExecutor>>executeString:do:
>>>> ByteString(String)>>execute:against:
>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>>>> Metacello>>execute
>>>> Metacello>>get
>>>> UndefinedObject>>DoIt
>>>> OpalCompiler>>evaluate
>>>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>>>
>>>>
>>>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>>>> wrote:
>>>>
>>>>> Thank you Dale very much , this is very clear :)
>>>>>
>>>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Thank you Dale, this is more simple than I expected.
>>>>>>>
>>>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>>>> branch .Which in my case is master so it should be
>>>>>>>
>>>>>>> Metacello new
>>>>>>> baseline: 'BaselineOfXXX';
>>>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>>>> get;
>>>>>>> load.
>>>>>>>
>>>>>>> https://github.com/kilon/phEphestos
>>>>>>>
>>>>>>
>>>>>> From looking at your repo on githug, the expression would be:
>>>>>>
>>>>>> Metacello new
>>>>>> baseline: 'Ephestos';
>>>>>> repository: 'github://kilon/phEphestos:master'
>>>>>> get;
>>>>>> load.
>>>>>>
>>>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>>>> just the base name of the project.
>>>>>>
>>>>>> You also need to create a BaselineOfEphestos which specifies package
>>>>>> load order. BaselineOfEphestos would be created as a subclass of BaselineOf
>>>>>> and have a single method:
>>>>>>
>>>>>> baseline: spec
>>>>>> <baseline>
>>>>>> spec
>>>>>> for: #pharo
>>>>>> do: [
>>>>>> spec package: 'Ephestos' ].
>>>>>>
>>>>>> Then the above expression would load the Epestos package.
>>>>>>
>>>>>> If you were to add another package, say EphestosTests, then you'd
>>>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>>>> loaded first you'd edit the baseline: method:
>>>>>>
>>>>>> baseline: spec
>>>>>> <baseline>
>>>>>> spec
>>>>>> for: #pharo
>>>>>> do: [
>>>>>> spec
>>>>>> package: 'Ephestos';
>>>>>> package: 'EphestosTests' with: [ spec requires: #(
>>>>>> 'Ephestos' ) ] ].
>>>>>>
>>>>>> You commit the BaselineOf along with the rest of the packages for
>>>>>> your project ...
>>>>>>
>>>>>> For more information see the Metacello chapter in Pharo by Example...
>>>>>>
>>>>>> Dale
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by Dale Henrichs
Kilon,
This code:
Metacello new
baseline:'Nireas';
repository:'github://kilon/Nireas:master';
get;
load.
does require a pretty recent version of Metacello ("chaining" the get and
load)[1]. I tried the following in a stock pharo3.0 and got an error about
requiring Pharo3DarkTheme, so I was able to load the package:
Metacello new
baseline:'Nireas';
repository:'github://kilon/Nireas:master';
get.
Metacello new
baseline:'Nireas';
repository:'github://kilon/Nireas:master';
load.
Dale
[1] https://github.com/dalehenrich/metacello-work#pharo30
On Sat, Nov 15, 2014 at 3:13 AM, kilon alios <kilon.alios(a)gmail.com> wrote:
> ok after rereading your emails more carefully i realised that you meant
> that BaselineOf should go to its own package, so I moved the class to
> BaselineOfNireas package and now it does not report the same error but now
> it complain that project,baseline or configuration not specified.
>
> Is it mandatory to specify a configuration for my project , I though the
> baseline class was enough. Would love to hear more info on the subject, I
> am looking also at the Metacello chapter which by the way is in Deep Into
> Pharo and not PBE , I see loads of info on the subject but does not seem to
> mention anything about the BaselineOf class .
>
> Will love it if we can gave a simple way to load git repos to pharo 4.
>
> On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> small typo in my paste
>>
>> the actual code i used is
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> get;
>> load.
>>
>> any help is appreciated :)
>>
>> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> hello Dale I tried your approach with a new project I created called
>>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>>> it complains that it cannot find the BaselineOfNireas
>>>
>>> This is the code I used
>>>
>>> Metacello new
>>> baseline:'Nireas';
>>> repository:'github://kilon/nireas:master';
>>> get;
>>> load.
>>>
>>> here is the repo
>>>
>>> https://github.com/kilon/Nireas
>>>
>>> and here is the error
>>>
>>>
>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>> linearLoadPackageSpec: packageSpec gofer: gofer
>>> MetacelloPlatform current
>>> do: [
>>> | references nearestReference cachedReference externalReference
>>> mcVersion loadedVersionInfos |
>>> "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 ]
>>> ]. "look up mcz file"
>>> references := self retryingResolvePackageSpecReferences: packageSpec
>>> gofer: gofer.
>>> nearestReference := references last asMetacelloCachingResolvedReference. "If
>>> the mcz is already in the cacheRepository, no need to copy"
>>> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
>>> name ])
>>> ifTrue: [
>>> "latest reference in repository matches cachedReference ... "
>>> ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference
>>> ]. "If the mcz is already loaded into the image, no need to copy"
>>> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
>>> packageSpec) ~~ nil ])
>>> ifTrue: [
>>> loadedVersionInfos
>>> do: [ :info |
>>> info name = nearestReference name
>>> ifTrue: [ ^ 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 ]
>>> displaying: 'Fetching ' , packageSpec file in
>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>>> linearLoadPackageSpec: packageSpec gofer: gofer...
>>> MetacelloPharo30Platform(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 linearLoadPackageSpecs: packageSpecs repos...etc...
>>> BlockClosure>>ensure:
>>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>> MetacelloPackageSpec>>explicitLoadUsing:
>>> MetacelloPackageSpec>>load
>>> [
>>> self setDefaultsAndValidateProjectSpec.
>>> spec := self projectSpec.
>>> projectPackage := spec projectPackage.
>>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>>> createRepository flushForScriptGet ].
>>> projectPackage load.
>>> self root: (Smalltalk at: spec className asSymbol) project.
>>> MetacelloProjectRegistration
>>> registrationForProjectSpec: spec
>>> ifAbsent: [ :new | new registerProject ]
>>> ifPresent: [ :existing :new |
>>> existing
>>> copyOnWrite: [ :existingCopy |
>>> spec
>>> copyForRegistration: existingCopy
>>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>>> MetacelloScriptEngine>>get in Block: [ ...
>>> BlockClosure>>ensure:
>>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>>> MetacelloScriptEngine>>get
>>> [ :projectSpec |
>>> | engine |
>>> engine := MetacelloScriptEngine new
>>> options: self options copy;
>>> projectSpec: projectSpec;
>>> yourself.
>>> engine perform: actionArg key withArguments: actionArg value.
>>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>>> :projectSpec | ...
>>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
>>> applyArgsToProjectSpec: projectSpec copy) ] ] in
>>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>>> projectSpec ifNotNil: [ projectSp...etc...
>>> Array(SequenceableCollection)>>do:
>>> MetacelloScriptApiExecutor>>executeString:do:
>>> ByteString(String)>>execute:against:
>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>>> Metacello>>execute
>>> Metacello>>get
>>> UndefinedObject>>DoIt
>>> OpalCompiler>>evaluate
>>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>>
>>>
>>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> Thank you Dale very much , this is very clear :)
>>>>
>>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thank you Dale, this is more simple than I expected.
>>>>>>
>>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>>> branch .Which in my case is master so it should be
>>>>>>
>>>>>> Metacello new
>>>>>> baseline: 'BaselineOfXXX';
>>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>>> get;
>>>>>> load.
>>>>>>
>>>>>> https://github.com/kilon/phEphestos
>>>>>>
>>>>>
>>>>> From looking at your repo on githug, the expression would be:
>>>>>
>>>>> Metacello new
>>>>> baseline: 'Ephestos';
>>>>> repository: 'github://kilon/phEphestos:master'
>>>>> get;
>>>>> load.
>>>>>
>>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>>> just the base name of the project.
>>>>>
>>>>> You also need to create a BaselineOfEphestos which specifies package
>>>>> load order. BaselineOfEphestos would be created as a subclass of BaselineOf
>>>>> and have a single method:
>>>>>
>>>>> baseline: spec
>>>>> <baseline>
>>>>> spec
>>>>> for: #pharo
>>>>> do: [
>>>>> spec package: 'Ephestos' ].
>>>>>
>>>>> Then the above expression would load the Epestos package.
>>>>>
>>>>> If you were to add another package, say EphestosTests, then you'd
>>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>>> loaded first you'd edit the baseline: method:
>>>>>
>>>>> baseline: spec
>>>>> <baseline>
>>>>> spec
>>>>> for: #pharo
>>>>> do: [
>>>>> spec
>>>>> package: 'Ephestos';
>>>>> package: 'EphestosTests' with: [ spec requires: #(
>>>>> 'Ephestos' ) ] ].
>>>>>
>>>>> You commit the BaselineOf along with the rest of the packages for your
>>>>> project ...
>>>>>
>>>>> For more information see the Metacello chapter in Pharo by Example...
>>>>>
>>>>> Dale
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
[NB] NativeBoost and optCoerceNilToNull
by Max Leske
Once again Iâm struggling with NativeBoost. Iâm trying to use optCoerceNilToNull with this function:
^self call: #(LGitReturnCodeEnum git_commit_create(
LGitId * theCommitId,
LGitRepository repo,
String update_ref,
LGitSignature * theAuthor,
LGitSignature * theCommitter,
String message_encoding,
String theMessage,
LGitTree theTree,
int parent_count,
LGitCommit * parentsPointer)) options: #( optCoerceNilToNull )
The last argument can be NULL, per documentation, (no parents).
LGitCommit is a subclass of NBExternalObject and apparently NBExternalObjctType>>pushAsPointer: does *not* use the optCoerceNilToNull option (the super implementation in NBExternalType>>pushAsPointer: however does). The upshot of course is that the call fails with âan instance of LGitCommit expectedâ.
My questions:
- The documentation says:
"#optCoerceNilToNull"
"passing nil as a pointer-type argument, converts it to C NULL â
but apparently this doesnât apply to every pointer type. Should the documentation be updated?
- Why does NBExternlObjectType not use optCoerceNilToNull? I donât want to use tricks to pass null if I donât have to.
- Related: there are instances where even non-pointer arguments are allowed to be NULL. Why does optCoerceNilToNull only work for pointer types?
Igor! Help! :)
Cheers,
Max
Nov. 15, 2014
How to refresh the pharo window manually
by kilon alios
Hello guys I am making a theme manager and I have observed that when I
choose a background color for pharo windows it does not update properly.
How I can force the whole pharo window to update ? I have found
DisplayScreen and WorldMorph but no idea how to use them.
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by kilon alios
The tricky part here is that I want to avoid Smalltalkhub , I want to use
Github only. I also dont care about creating versions, I prefer git
branches a lot more. So that means that experimental stuff will be
committed to separate branches and master will contain only the latest
stable code.
On Sat, Nov 15, 2014 at 1:18 PM, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
> This is how I use all that magic
> http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo…
>
> On 21 Oct 2014, at 20:33, kilon alios <kilon.alios(a)gmail.com> wrote:
>
> So I am so happy with how Pharo works with Github, that I decided to even
> port my configurations there and I also decided to create a small
> configuration browser which will subclass the existing configuration
> browser for installing tools for my project Ephestos so I dont have to
> pollute the existing configuration projects with all my sub-projects.
>
> In sort I want to host configurations to Github similarly to how MetaRepos
> are host in Smalltalkhub. I want the user to be able to install those
> configurations without a need to install git
>
> I asked this I think before and I was told how to, but it was part of
> another thread and it got lost inside my email abyss.
>
> So How I do that ?
>
>
>
Nov. 15, 2014
[NB] Undocumented NativeBoost options
by Max Leske
I got a bit frustrated and ended up searching the source for â[\w]opt[[:upper]]â to find all NativeBoost options. Some of those options are in fact undocumented:
optMayGC
optProxyLabels
optCdecl
optReturnNullAsNil
optStdcall
optNonMovable
optReserveCallgateSpace
optDebug
optNoAlignment
optEmitCall
optNoCleanup
optCheckFailOnEveryArgument
optStringOrNull
WinUnicode
NBFFICallout>>defaultOptions documents most options but refers to NBFFICallout>>allOptions, wich does not exist. Most of the above options can be considered internal, I guess, but the one option I needed (âoptStringOrNullâ) isnât documented anywhere. I had to step through the execution to find out why my function call wasnât working (because I was trying to use âoptCoerceNilToNullâ and didnât know that strings need a special option).
Iâd be very thankful if these options would be included in the documentation.
Note: âWinUnicodeâ is used by the Windows code in a couple of places, even though the option name is not valid, according to NBNativeCodeGen>>parseOptions:
Cheers,
Max
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by Yuriy Tymchuk
This is how I use all that magic http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo… <http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo…>
> On 21 Oct 2014, at 20:33, kilon alios <kilon.alios(a)gmail.com> wrote:
>
> So I am so happy with how Pharo works with Github, that I decided to even port my configurations there and I also decided to create a small configuration browser which will subclass the existing configuration browser for installing tools for my project Ephestos so I dont have to pollute the existing configuration projects with all my sub-projects.
>
> In sort I want to host configurations to Github similarly to how MetaRepos are host in Smalltalkhub. I want the user to be able to install those configurations without a need to install git
>
> I asked this I think before and I was told how to, but it was part of another thread and it got lost inside my email abyss.
>
> So How I do that ?
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by kilon alios
ok after rereading your emails more carefully i realised that you meant
that BaselineOf should go to its own package, so I moved the class to
BaselineOfNireas package and now it does not report the same error but now
it complain that project,baseline or configuration not specified.
Is it mandatory to specify a configuration for my project , I though the
baseline class was enough. Would love to hear more info on the subject, I
am looking also at the Metacello chapter which by the way is in Deep Into
Pharo and not PBE , I see loads of info on the subject but does not seem to
mention anything about the BaselineOf class .
Will love it if we can gave a simple way to load git repos to pharo 4.
On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com> wrote:
> small typo in my paste
>
> the actual code i used is
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/Nireas:master';
> get;
> load.
>
> any help is appreciated :)
>
> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> hello Dale I tried your approach with a new project I created called
>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>> it complains that it cannot find the BaselineOfNireas
>>
>> This is the code I used
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/nireas:master';
>> get;
>> load.
>>
>> here is the repo
>>
>> https://github.com/kilon/Nireas
>>
>> and here is the error
>>
>>
>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>> linearLoadPackageSpec: packageSpec gofer: gofer
>> MetacelloPlatform current
>> do: [
>> | references nearestReference cachedReference externalReference mcVersion
>> loadedVersionInfos |
>> "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 ] ]. "look
>> up mcz file"
>> references := self retryingResolvePackageSpecReferences: packageSpec
>> gofer: gofer.
>> nearestReference := references last asMetacelloCachingResolvedReference. "If
>> the mcz is already in the cacheRepository, no need to copy"
>> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
>> name ])
>> ifTrue: [
>> "latest reference in repository matches cachedReference ... "
>> ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference ]. "If
>> the mcz is already loaded into the image, no need to copy"
>> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
>> packageSpec) ~~ nil ])
>> ifTrue: [
>> loadedVersionInfos
>> do: [ :info |
>> info name = nearestReference name
>> ifTrue: [ ^ 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 ]
>> displaying: 'Fetching ' , packageSpec file in
>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>> linearLoadPackageSpec: packageSpec gofer: gofer...
>> MetacelloPharo30Platform(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 linearLoadPackageSpecs: packageSpecs repos...etc...
>> BlockClosure>>ensure:
>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>> MetacelloPackageSpec>>explicitLoadUsing:
>> MetacelloPackageSpec>>load
>> [
>> self setDefaultsAndValidateProjectSpec.
>> spec := self projectSpec.
>> projectPackage := spec projectPackage.
>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>> createRepository flushForScriptGet ].
>> projectPackage load.
>> self root: (Smalltalk at: spec className asSymbol) project.
>> MetacelloProjectRegistration
>> registrationForProjectSpec: spec
>> ifAbsent: [ :new | new registerProject ]
>> ifPresent: [ :existing :new |
>> existing
>> copyOnWrite: [ :existingCopy |
>> spec
>> copyForRegistration: existingCopy
>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>> MetacelloScriptEngine>>get in Block: [ ...
>> BlockClosure>>ensure:
>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>> MetacelloScriptEngine>>get
>> [ :projectSpec |
>> | engine |
>> engine := MetacelloScriptEngine new
>> options: self options copy;
>> projectSpec: projectSpec;
>> yourself.
>> engine perform: actionArg key withArguments: actionArg value.
>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>> :projectSpec | ...
>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
>> applyArgsToProjectSpec: projectSpec copy) ] ] in
>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>> projectSpec ifNotNil: [ projectSp...etc...
>> Array(SequenceableCollection)>>do:
>> MetacelloScriptApiExecutor>>executeString:do:
>> ByteString(String)>>execute:against:
>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>> Metacello>>execute
>> Metacello>>get
>> UndefinedObject>>DoIt
>> OpalCompiler>>evaluate
>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>
>>
>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> Thank you Dale very much , this is very clear :)
>>>
>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com>
>>>> wrote:
>>>>
>>>>> Thank you Dale, this is more simple than I expected.
>>>>>
>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>> branch .Which in my case is master so it should be
>>>>>
>>>>> Metacello new
>>>>> baseline: 'BaselineOfXXX';
>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>> get;
>>>>> load.
>>>>>
>>>>> https://github.com/kilon/phEphestos
>>>>>
>>>>
>>>> From looking at your repo on githug, the expression would be:
>>>>
>>>> Metacello new
>>>> baseline: 'Ephestos';
>>>> repository: 'github://kilon/phEphestos:master'
>>>> get;
>>>> load.
>>>>
>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>> just the base name of the project.
>>>>
>>>> You also need to create a BaselineOfEphestos which specifies package
>>>> load order. BaselineOfEphestos would be created as a subclass of BaselineOf
>>>> and have a single method:
>>>>
>>>> baseline: spec
>>>> <baseline>
>>>> spec
>>>> for: #pharo
>>>> do: [
>>>> spec package: 'Ephestos' ].
>>>>
>>>> Then the above expression would load the Epestos package.
>>>>
>>>> If you were to add another package, say EphestosTests, then you'd
>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>> loaded first you'd edit the baseline: method:
>>>>
>>>> baseline: spec
>>>> <baseline>
>>>> spec
>>>> for: #pharo
>>>> do: [
>>>> spec
>>>> package: 'Ephestos';
>>>> package: 'EphestosTests' with: [ spec requires: #( 'Ephestos'
>>>> ) ] ].
>>>>
>>>> You commit the BaselineOf along with the rest of the packages for your
>>>> project ...
>>>>
>>>> For more information see the Metacello chapter in Pharo by Example...
>>>>
>>>> Dale
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by kilon alios
small typo in my paste
the actual code i used is
Metacello new
baseline:'Nireas';
repository:'github://kilon/Nireas:master';
get;
load.
any help is appreciated :)
On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com> wrote:
> hello Dale I tried your approach with a new project I created called
> Nireas, its a theme manager for pharo 4. I followed your instructions and
> it complains that it cannot find the BaselineOfNireas
>
> This is the code I used
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/nireas:master';
> get;
> load.
>
> here is the repo
>
> https://github.com/kilon/Nireas
>
> and here is the error
>
>
> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
> linearLoadPackageSpec: packageSpec gofer: gofer
> MetacelloPlatform current
> do: [
> | references nearestReference cachedReference externalReference mcVersion
> loadedVersionInfos |
> "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 ] ]. "look
> up mcz file"
> references := self retryingResolvePackageSpecReferences: packageSpec
> gofer: gofer.
> nearestReference := references last asMetacelloCachingResolvedReference. "If
> the mcz is already in the cacheRepository, no need to copy"
> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
> name ])
> ifTrue: [
> "latest reference in repository matches cachedReference ... "
> ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference ]. "If
> the mcz is already loaded into the image, no need to copy"
> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
> packageSpec) ~~ nil ])
> ifTrue: [
> loadedVersionInfos
> do: [ :info |
> info name = nearestReference name
> ifTrue: [ ^ 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 ]
> displaying: 'Fetching ' , packageSpec file in
> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
> linearLoadPackageSpec: packageSpec gofer: gofer...
> MetacelloPharo30Platform(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 linearLoadPackageSpecs: packageSpecs repos...etc...
> BlockClosure>>ensure:
> MetacelloLoaderPolicy>>pushLoadDirective:during:
> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
> MetacelloPackageSpec>>explicitLoadUsing:
> MetacelloPackageSpec>>load
> [
> self setDefaultsAndValidateProjectSpec.
> spec := self projectSpec.
> projectPackage := spec projectPackage.
> projectPackage repositorySpecs do: [ :repoSpec | repoSpec createRepository
> flushForScriptGet ].
> projectPackage load.
> self root: (Smalltalk at: spec className asSymbol) project.
> MetacelloProjectRegistration
> registrationForProjectSpec: spec
> ifAbsent: [ :new | new registerProject ]
> ifPresent: [ :existing :new |
> existing
> copyOnWrite: [ :existingCopy |
> spec
> copyForRegistration: existingCopy
> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
> MetacelloScriptEngine>>get in Block: [ ...
> BlockClosure>>ensure:
> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
> MetacelloScriptEngine>>get
> [ :projectSpec |
> | engine |
> engine := MetacelloScriptEngine new
> options: self options copy;
> projectSpec: projectSpec;
> yourself.
> engine perform: actionArg key withArguments: actionArg value.
> engine root ifNotNil: [ :root | self roots add: root ] ] in
> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
> :projectSpec | ...
> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
> applyArgsToProjectSpec: projectSpec copy) ] ] in
> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
> projectSpec ifNotNil: [ projectSp...etc...
> Array(SequenceableCollection)>>do:
> MetacelloScriptApiExecutor>>executeString:do:
> ByteString(String)>>execute:against:
> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
> Metacello>>execute
> Metacello>>get
> UndefinedObject>>DoIt
> OpalCompiler>>evaluate
> RubSmalltalkEditor>>evaluateSelectionAndDo:
>
>
> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> Thank you Dale very much , this is very clear :)
>>
>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>> dale.henrichs(a)gemtalksystems.com> wrote:
>>
>>>
>>>
>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> Thank you Dale, this is more simple than I expected.
>>>>
>>>> From what you linked it looks like by [:comitish] you mean the git
>>>> branch .Which in my case is master so it should be
>>>>
>>>> Metacello new
>>>> baseline: 'BaselineOfXXX';
>>>> repository: 'github://kilon/phEphestos:master/'
>>>> get;
>>>> load.
>>>>
>>>> https://github.com/kilon/phEphestos
>>>>
>>>
>>> From looking at your repo on githug, the expression would be:
>>>
>>> Metacello new
>>> baseline: 'Ephestos';
>>> repository: 'github://kilon/phEphestos:master'
>>> get;
>>> load.
>>>
>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>> just the base name of the project.
>>>
>>> You also need to create a BaselineOfEphestos which specifies package
>>> load order. BaselineOfEphestos would be created as a subclass of BaselineOf
>>> and have a single method:
>>>
>>> baseline: spec
>>> <baseline>
>>> spec
>>> for: #pharo
>>> do: [
>>> spec package: 'Ephestos' ].
>>>
>>> Then the above expression would load the Epestos package.
>>>
>>> If you were to add another package, say EphestosTests, then you'd update
>>> the baseline to declare that EphestosTests requires Ephestos to be loaded
>>> first you'd edit the baseline: method:
>>>
>>> baseline: spec
>>> <baseline>
>>> spec
>>> for: #pharo
>>> do: [
>>> spec
>>> package: 'Ephestos';
>>> package: 'EphestosTests' with: [ spec requires: #( 'Ephestos'
>>> ) ] ].
>>>
>>> You commit the BaselineOf along with the rest of the packages for your
>>> project ...
>>>
>>> For more information see the Metacello chapter in Pharo by Example...
>>>
>>> Dale
>>>
>>>
>>>
>>>
>>>
>>
>
Nov. 15, 2014