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.html)
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