ZnPortNotANumber exception when loading from local clone dir (following Metacello Guide)
Hi, according to the Metacello quide on [1] in section "Prime Metacello registry" one can write | pathToPackageDirectory | "edit to match the path to your chosen package directory" pathToPackageDirectory := '/opt/git/Sample/packages'. Metacello new baseline: 'Sample'; repository: 'filetree://', pathToPackageDirectory; load. Adopting this for a Windows path I have: | pathToPackageDirectory | pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: 'filetree://', pathToPackageDirectory; load. But I get a ZnPortNotANumber exception, even when I use a diffent protocol like "client://". Tried this in Pharo 6.0 Latest update: #60233 What I want to do (on Windows) is to load all project packages from a local cloned git directory (not a remote GitHub) using the dependencies given in the Baseline. Did I miss something, is it just broken or the docu not up to date? If so is this a parsing issue on the Zinc URLs or an issue of Metacello API? Thanks T. [1] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStarte...
Hi Torsten, Just for the ZnUrl part, have a look at ZnFileUrlTests>>#testWindowsDriveNamesInFileUrl AFAIK, your example should be written as: ('filetree:///' , 'C:/ClonedRepo/packages') asZnUrl. Or maybe, (FileLocator C / 'ClonedRepo' / 'packages') asZnUrl. Sven
On 20 Sep 2016, at 20:30, Torsten Bergmann <astares@gmx.de> wrote:
Hi,
according to the Metacello quide on [1] in section "Prime Metacello registry" one can write
| pathToPackageDirectory | "edit to match the path to your chosen package directory" pathToPackageDirectory := '/opt/git/Sample/packages'. Metacello new baseline: 'Sample'; repository: 'filetree://', pathToPackageDirectory; load.
Adopting this for a Windows path I have:
| pathToPackageDirectory | pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: 'filetree://', pathToPackageDirectory; load.
But I get a ZnPortNotANumber exception, even when I use a diffent protocol like "client://". Tried this in Pharo 6.0 Latest update: #60233
What I want to do (on Windows) is to load all project packages from a local cloned git directory (not a remote GitHub) using the dependencies given in the Baseline.
Did I miss something, is it just broken or the docu not up to date? If so is this a parsing issue on the Zinc URLs or an issue of Metacello API?
Thanks T.
[1] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStarte...
Hi Sven, thanks. Did not notice that I need three instead of two slashes. So no need to explicitly convert to ZnUrl. So for the records this is what works: pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: ('gitfiletree:///', pathToPackageDirectory) ; load. Thanks T.
Gesendet: Dienstag, 20. September 2016 um 20:41 Uhr Von: "Sven Van Caekenberghe" <sven@stfx.eu> An: "Pharo Development List" <pharo-dev@lists.pharo.org> Betreff: Re: [Pharo-dev] ZnPortNotANumber exception when loading from local clone dir (following Metacello Guide)
Hi Torsten,
Just for the ZnUrl part, have a look at
ZnFileUrlTests>>#testWindowsDriveNamesInFileUrl
AFAIK, your example should be written as:
('filetree:///' , 'C:/ClonedRepo/packages') asZnUrl.
Or maybe,
(FileLocator C / 'ClonedRepo' / 'packages') asZnUrl.
Sven
On 20 Sep 2016, at 20:30, Torsten Bergmann <astares@gmx.de> wrote:
Hi,
according to the Metacello quide on [1] in section "Prime Metacello registry" one can write
| pathToPackageDirectory | "edit to match the path to your chosen package directory" pathToPackageDirectory := '/opt/git/Sample/packages'. Metacello new baseline: 'Sample'; repository: 'filetree://', pathToPackageDirectory; load.
Adopting this for a Windows path I have:
| pathToPackageDirectory | pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: 'filetree://', pathToPackageDirectory; load.
But I get a ZnPortNotANumber exception, even when I use a diffent protocol like "client://". Tried this in Pharo 6.0 Latest update: #60233
What I want to do (on Windows) is to load all project packages from a local cloned git directory (not a remote GitHub) using the dependencies given in the Baseline.
Did I miss something, is it just broken or the docu not up to date? If so is this a parsing issue on the Zinc URLs or an issue of Metacello API?
Thanks T.
[1] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStarte...
On 22 Sep 2016, at 00:19, Torsten Bergmann <astares@gmx.de> wrote:
Hi Sven,
thanks. Did not notice that I need three instead of two slashes. So no need to explicitly convert to ZnUrl.
So for the records this is what works:
pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: ('gitfiletree:///', pathToPackageDirectory) ; load.
So mixing back & forward slashes works ? Pretty weird ;-)
Thanks T.
Gesendet: Dienstag, 20. September 2016 um 20:41 Uhr Von: "Sven Van Caekenberghe" <sven@stfx.eu> An: "Pharo Development List" <pharo-dev@lists.pharo.org> Betreff: Re: [Pharo-dev] ZnPortNotANumber exception when loading from local clone dir (following Metacello Guide)
Hi Torsten,
Just for the ZnUrl part, have a look at
ZnFileUrlTests>>#testWindowsDriveNamesInFileUrl
AFAIK, your example should be written as:
('filetree:///' , 'C:/ClonedRepo/packages') asZnUrl.
Or maybe,
(FileLocator C / 'ClonedRepo' / 'packages') asZnUrl.
Sven
On 20 Sep 2016, at 20:30, Torsten Bergmann <astares@gmx.de> wrote:
Hi,
according to the Metacello quide on [1] in section "Prime Metacello registry" one can write
| pathToPackageDirectory | "edit to match the path to your chosen package directory" pathToPackageDirectory := '/opt/git/Sample/packages'. Metacello new baseline: 'Sample'; repository: 'filetree://', pathToPackageDirectory; load.
Adopting this for a Windows path I have:
| pathToPackageDirectory | pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: 'filetree://', pathToPackageDirectory; load.
But I get a ZnPortNotANumber exception, even when I use a diffent protocol like "client://". Tried this in Pharo 6.0 Latest update: #60233
What I want to do (on Windows) is to load all project packages from a local cloned git directory (not a remote GitHub) using the dependencies given in the Baseline.
Did I miss something, is it just broken or the docu not up to date? If so is this a parsing issue on the Zinc URLs or an issue of Metacello API?
Thanks T.
[1] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStarte...
On 09/22/2016 12:41 AM, Sven Van Caekenberghe wrote:
On 22 Sep 2016, at 00:19, Torsten Bergmann <astares@gmx.de> wrote:
Hi Sven,
thanks. Did not notice that I need three instead of two slashes. So no need to explicitly convert to ZnUrl.
So for the records this is what works:
pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: ('gitfiletree:///', pathToPackageDirectory) ; load. So mixing back & forward slashes works ? Pretty weird ;-) Yes that is interesting ... in Metacello for Pharo, `('/', pathToPackageDirectory ) asFileReference` (stripping the leading 'filetree://') is being used to create the FileTree repository from the repository description ... so apparently this is how FileSystem deals with windows pathnames ???
Oh wait, that is a gitfiletee url ... not sure how that is handles ... Dale
Thanks T.
Gesendet: Dienstag, 20. September 2016 um 20:41 Uhr Von: "Sven Van Caekenberghe" <sven@stfx.eu> An: "Pharo Development List" <pharo-dev@lists.pharo.org> Betreff: Re: [Pharo-dev] ZnPortNotANumber exception when loading from local clone dir (following Metacello Guide)
Hi Torsten,
Just for the ZnUrl part, have a look at
ZnFileUrlTests>>#testWindowsDriveNamesInFileUrl
AFAIK, your example should be written as:
('filetree:///' , 'C:/ClonedRepo/packages') asZnUrl.
Or maybe,
(FileLocator C / 'ClonedRepo' / 'packages') asZnUrl.
Sven
On 20 Sep 2016, at 20:30, Torsten Bergmann <astares@gmx.de> wrote:
Hi,
according to the Metacello quide on [1] in section "Prime Metacello registry" one can write
| pathToPackageDirectory | "edit to match the path to your chosen package directory" pathToPackageDirectory := '/opt/git/Sample/packages'. Metacello new baseline: 'Sample'; repository: 'filetree://', pathToPackageDirectory; load.
Adopting this for a Windows path I have:
| pathToPackageDirectory | pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: 'filetree://', pathToPackageDirectory; load.
But I get a ZnPortNotANumber exception, even when I use a diffent protocol like "client://". Tried this in Pharo 6.0 Latest update: #60233
What I want to do (on Windows) is to load all project packages from a local cloned git directory (not a remote GitHub) using the dependencies given in the Baseline.
Did I miss something, is it just broken or the docu not up to date? If so is this a parsing issue on the Zinc URLs or an issue of Metacello API?
Thanks T.
[1] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStarte...
Le 22/09/2016 à 20:53, Dale Henrichs a écrit :
On 09/22/2016 12:41 AM, Sven Van Caekenberghe wrote:
On 22 Sep 2016, at 00:19, Torsten Bergmann <astares@gmx.de> wrote:
Hi Sven,
thanks. Did not notice that I need three instead of two slashes. So no need to explicitly convert to ZnUrl.
So for the records this is what works:
pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: ('gitfiletree:///', pathToPackageDirectory) ; load. So mixing back & forward slashes works ? Pretty weird ;-) Yes that is interesting ... in Metacello for Pharo, `('/', pathToPackageDirectory ) asFileReference` (stripping the leading 'filetree://') is being used to create the FileTree repository from the repository description ... so apparently this is how FileSystem deals with windows pathnames ???
Oh wait, that is a gitfiletee url ... not sure how that is handles ...
GitFileTree has a copy(*) of the ZnUrl code for extracting file references out of urls, so it may differ from Filetree / Metacello (see MCFileTreeGitRepository>>#urlAsFileReference:). Oh, ok. FileTree has the same method, but with a correction for what must have been a bug in the GitFileTree method (need to have a look at that), however, Metacello does not use that method for a filetree:// url. Checked in Pharo 6. Thierry (*) Copy because extending ZnUrl wasn't possible without an override. I kind of agree with the Go philosophy there: sometimes, a little bit of copy/paste makes everything simpler.
Dale
Thanks T.
Gesendet: Dienstag, 20. September 2016 um 20:41 Uhr Von: "Sven Van Caekenberghe" <sven@stfx.eu> An: "Pharo Development List" <pharo-dev@lists.pharo.org> Betreff: Re: [Pharo-dev] ZnPortNotANumber exception when loading from local clone dir (following Metacello Guide)
Hi Torsten,
Just for the ZnUrl part, have a look at
ZnFileUrlTests>>#testWindowsDriveNamesInFileUrl
AFAIK, your example should be written as:
('filetree:///' , 'C:/ClonedRepo/packages') asZnUrl.
Or maybe,
(FileLocator C / 'ClonedRepo' / 'packages') asZnUrl.
Sven
On 20 Sep 2016, at 20:30, Torsten Bergmann <astares@gmx.de> wrote:
Hi,
according to the Metacello quide on [1] in section "Prime Metacello registry" one can write
| pathToPackageDirectory | "edit to match the path to your chosen package directory" pathToPackageDirectory := '/opt/git/Sample/packages'. Metacello new baseline: 'Sample'; repository: 'filetree://', pathToPackageDirectory; load.
Adopting this for a Windows path I have:
| pathToPackageDirectory | pathToPackageDirectory := 'C:\ClonedRepo\packages'. Metacello new baseline: 'MyProject'; repository: 'filetree://', pathToPackageDirectory; load.
But I get a ZnPortNotANumber exception, even when I use a diffent protocol like "client://". Tried this in Pharo 6.0 Latest update: #60233
What I want to do (on Windows) is to load all project packages from a local cloned git directory (not a remote GitHub) using the dependencies given in the Baseline.
Did I miss something, is it just broken or the docu not up to date? If so is this a parsing issue on the Zinc URLs or an issue of Metacello API?
Thanks T.
[1] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStarte...
participants (4)
-
Dale Henrichs -
Sven Van Caekenberghe -
Thierry Goubier -
Torsten Bergmann