> Am 29.12.2017 um 10:35 schrieb Cyril Ferlicot D. <[email protected]>: > > Hi, > > In order to improve the usage of Pharo and the git integration there is > some discussions around Metacello in order to be able to: > > - Load a private git project from Metacello API > - Load a project hosted on a private server from Metacello API > - Load a project hosted on a private server with non default ssh port > from Metacello API > - Depend on a private git project in a baseline > - Depend on a project hosted on a private server in a baseline > - Depend on a project hosted on a private server with non default ssh > port in a baseline > > To achieve this, Metacello needs to be able to manage urls like: > > - '[email protected]:Projet/Bazard.git' > - 'ssh://[email protected]:3456/Projet/Bazard.git' > > and many others. > > Dale wants to use Zinc to manage urls's in Pharo. > > It works great for this url: > > 'ssh://[email protected]:3456/Projet/Bazard.git' asUrl > > It gives an instance of ZnUrl of the ssh scheme, gitlab.ferlicot.fr as > host, 3456 as port, git as username and #('Project' 'Bazard.git') as > segments. > > Now the problem is that it does not work well for this url: > > '[email protected]:Projet/Bazard.git' asUrl > > It gives an instance of ZnUrl with #('[email protected]:Projet' > 'Bazard.git') as segments. > > What do you think guys about this issue? Could the flexibility of ZnUrls > be improved in order to be able to use it? Should Metacello use another way? > Why ZnURL should be flexible to treat something that is not a URI? An URI is something like
<some ascii chars>:<some arbitrary stuff> The important part is the colon. If you split on it then the first part is addressing a name that can be resolved to get an entity that can digest the second part. That‘s it! A locator is just a special form of URI that cheats by saying that the second part can be used directly to locate the resource (that‘s the difference by identifiable resources and locatable resources meaning the ones that really exist) So I cannot see how this can work. But nobody says you need to fold this into ZnURL. A Client is free to do something like if it starts with git I prepend that with ssh:// or git:// or git+ssh:// So the point is that if your model is the URI (it does not have to) then you should create valid URLs by adding missing stuff. Otherwise just have a model that treats URLs and your special cases. Norbert > To see the full discussions: > - Github issue: https://github.com/Metacello/metacello/issues/474 > - Metacello group discussion: > https://groups.google.com/forum/#!topic/metacello/QbpngL6Jhg8 > > Have a nice day :) > > -- > Cyril Ferlicot > https://ferlicot.fr > > http://www.synectique.eu > 2 rue Jacques Prévert 01, > 59650 Villeneuve d'ascq France >
