How to specify metacello package dependencies in a git world?
Hi - I am trying to specify a simple package dependency(NeoJSON) for a hello world type simple project and Iâm hitting problems. Iâve been reading the DeepIntoPharo chapter and have looked at the blog post by Uko (http://blog.yuriy.tymch.uk/2015/07/pharo-and-github-versioning-revision-2.ht... <http://blog.yuriy.tymch.uk/2015/07/pharo-and-github-versioning-revision-2.ht...>) But Iâm hitting some simple issues and Iâm hoping someone can put me straight. My first attempt was the following (my Package is âLambdaâ and has been versioned and put into GitHub using iceberg defaults). baseline: spec <baseline> spec for: #common do: [ spec package: 'Lambda' with: [ spec requires: 'NeoJSON' ]. spec project: 'NeoJSON' with: [ spec className: 'ConfigurationOfNeoJSON'; version: #stable; repository: 'https://github.com/svenvc/NeoJSON/tree/master/repository' ] ]. My first question is, what should the repository URL be? No-one seems to talk about this in the git world where the gitfile tree info can be in different places per project (some put it in the root of the repo, other src, others repository or packages etc.). Am I right in thinking this url should be where the .package file is located? When I try the above example by trying: (BaselineOfLambda project version: 'baseline') load. I get a talkback - Could not resolve: ConfigurationOfNeoJSON [ConfigurationOfNeoJSON] in /Users/macta/Dev/Smalltalk/Pharo/Pharo-6-60495-c/pharo-local/package-cache https://github.com/svenvc/NeoJSON/tree/master/repository <https://github.com/svenvc/NeoJSON/tree/master/repository> (Strangely, that file path is wrong as its pointing to some other directory on my filesystem - and Iâve posted a question about this on the thread about the working directory implementation, as it looks like MCCacheRepository uniqueInstance is getting the wrong default directory). Anyway - as the above didnât work, I tried to find an example of someone else using Neo and of course Sven had and example but his looks like this: baseline: spec <baseline> spec for: #common do: [ spec configuration: 'NeoJSON' with: [ spec versionString: #stable; repository: 'http://mc.stfx.eu/Neo' ]. spec package: 'Lambda' with: [ spec requires: 'NeoJSON' ]. ]. I danât seen anyone mention spec configuration before (is this a better way?) - although looking at this directory, it seems this is where normal Mcz files are, so is it because of that you use this other method? Anyway , when I try the above - I get a similar error to the above, but now it fails loading my Lambda package (presumably because if the filesystem error?). Am I on the right track with the above? Tim
Hi Tim, Le 09/07/2017 à 10:31, Tim Mackinnon a écrit :
Hi - I am trying to specify a simple package dependency(NeoJSON) for a hello world type simple project and Iâm hitting problems.
Iâve been reading the DeepIntoPharo chapter and have looked at the blog post by Uko (http://blog.yuriy.tymch.uk/2015/07/pharo-and-github-versioning-revision-2.ht...)
But Iâm hitting some simple issues and Iâm hoping someone can put me straight.
My first attempt was the following (my Package is âLambdaâ and has been versioned and put into GitHub using iceberg defaults).
baseline: spec <baseline>
spec for: #common do: [ spec package: 'Lambda' with: [ spec requires: 'NeoJSON' ]. spec project: 'NeoJSON' with: [ spec className: 'ConfigurationOfNeoJSON'; version: #stable; repository:
'https://github.com/svenvc/NeoJSON/tree/master/repository' ] ].
This url won't work: you can access a github repository either with a github: url, or a gitfiletree: url (or an iceberg url?) github://svenvc/NeoJSON:master/repository or: gitfiletree://github.com/svenvc/NeoJSON:master/repository (You may want to use a tag instead of master).
My first question is, what should the repository URL be? No-one seems to talk about this in the git world where the gitfile tree info can be in different places per project (some put it in the root of the repo, other src, others repository or packages etc.). Am I right in thinking this url should be where the .package file is located?
Yes. There are repositories where you have a directory with the main packages, and other directories with secondary packages. For example, FileTree has a main repository/ directory with the packages, and many secondary repositories with test packages. So you need to indicate where the .package are.
When I try the above example by trying:
(BaselineOfLambda project version: 'baseline') load.
I get a talkback - Could not resolve: ConfigurationOfNeoJSON [ConfigurationOfNeoJSON] in /Users/macta/Dev/Smalltalk/Pharo/Pharo-6-60495-c/pharo-local/package-cache https://github.com/svenvc/NeoJSON/tree/master/repository
(Strangely, that file path is wrong as its pointing to some other directory on my filesystem - and Iâve posted a question about this on the thread about the working directory implementation, as it looks like MCCacheRepository uniqueInstance is getting the wrong default directory).
I don't know, but maybe that could be linked. Would you have preferences pointing to the wrong place ?
Anyway - as the above didnât work, I tried to find an example of someone else using Neo and of course Sven had and example but his looks like this:
baseline: spec <baseline>
spec for: #common do: [ spec configuration: 'NeoJSON' with: [ spec versionString: #stable; repository: 'http://mc.stfx.eu/Neo' ]. spec package: 'Lambda' with: [ spec requires: 'NeoJSON' ]. ].
I danât seen anyone mention spec configuration before (is this a better way?) - although looking at this directory, it seems this is where normal Mcz files are, so is it because of that you use this other method?
Anyway , when I try the above - I get a similar error to the above, but now it fails loading my Lambda package (presumably because if the filesystem error?).
Am I on the right track with the above?
I think you are...
Tim
Regards, Thierry
Thanks Thierry - I hadnât noticed the subtle difference in URLâs - that got me further, but I think that actually the GitHub version of NeoJSON might not be totally up to date (it complains about missing version 13 on my platform - OS X. Iâve asked Sven - but I guess I should mirror what he does and load via an Mcz spec). I then think I have another problem in that my vm is the 7 version which is supposed to work with a 6 image - but I âm seeing strange working directory oddities, and I think this might be causing my other problems. Thanks, for unblocking me. Tim
On 9 Jul 2017, at 12:00, Thierry Goubier <thierry.goubier@gmail.com> wrote:
Hi Tim,
Le 09/07/2017 à 10:31, Tim Mackinnon a écrit :
Hi - I am trying to specify a simple package dependency(NeoJSON) for a hello world type simple project and Iâm hitting problems. Iâve been reading the DeepIntoPharo chapter and have looked at the blog post by Uko (http://blog.yuriy.tymch.uk/2015/07/pharo-and-github-versioning-revision-2.ht...) But Iâm hitting some simple issues and Iâm hoping someone can put me straight. My first attempt was the following (my Package is âLambdaâ and has been versioned and put into GitHub using iceberg defaults). baseline: spec <baseline> spec for: #common do: [ spec package: 'Lambda' with: [ spec requires: 'NeoJSON' ]. spec project: 'NeoJSON' with: [ spec className: 'ConfigurationOfNeoJSON'; version: #stable; repository: 'https://github.com/svenvc/NeoJSON/tree/master/repository' ] ].
This url won't work: you can access a github repository either with a github: url, or a gitfiletree: url (or an iceberg url?)
github://svenvc/NeoJSON:master/repository
or:
gitfiletree://github.com/svenvc/NeoJSON:master/repository
(You may want to use a tag instead of master).
My first question is, what should the repository URL be? No-one seems to talk about this in the git world where the gitfile tree info can be in different places per project (some put it in the root of the repo, other src, others repository or packages etc.). Am I right in thinking this url should be where the .package file is located?
Yes. There are repositories where you have a directory with the main packages, and other directories with secondary packages. For example, FileTree has a main repository/ directory with the packages, and many secondary repositories with test packages.
So you need to indicate where the .package are.
When I try the above example by trying: (BaselineOfLambda project version: 'baseline') load. I get a talkback - Could not resolve: ConfigurationOfNeoJSON [ConfigurationOfNeoJSON] in /Users/macta/Dev/Smalltalk/Pharo/Pharo-6-60495-c/pharo-local/package-cache https://github.com/svenvc/NeoJSON/tree/master/repository (Strangely, that file path is wrong as its pointing to some other directory on my filesystem - and Iâve posted a question about this on the thread about the working directory implementation, as it looks like MCCacheRepository uniqueInstance is getting the wrong default directory).
I don't know, but maybe that could be linked. Would you have preferences pointing to the wrong place ?
Anyway - as the above didnât work, I tried to find an example of someone else using Neo and of course Sven had and example but his looks like this: baseline: spec <baseline> spec for: #common do: [ spec configuration: 'NeoJSON' with: [ spec versionString: #stable; repository: 'http://mc.stfx.eu/Neo' ]. spec package: 'Lambda' with: [ spec requires: 'NeoJSON' ]. ]. I danât seen anyone mention spec configuration before (is this a better way?) - although looking at this directory, it seems this is where normal Mcz files are, so is it because of that you use this other method? Anyway , when I try the above - I get a similar error to the above, but now it fails loading my Lambda package (presumably because if the filesystem error?). Am I on the right track with the above?
I think you are...
Tim
Regards,
Thierry
participants (2)
-
Thierry Goubier -
Tim Mackinnon