Le 17/04/2016 17:17, Damien Pollet a écrit :
On 17 April 2016 at 16:47, Thierry Goubier <thierry.goub...@gmail.com
<mailto:thierry.goub...@gmail.com>> wrote:

    In fact it is there, but indirect (you can give a $WHERE when you
    create a remote git repository with Monticello: it's the name
    parameter).


But I'd have to somehow create the monticello repo then pass it to
metacello?

No. When GitFileTree prepares for a clone, it already manipulates a $WHERE (which is, by default, the repository name, i.e. filetree) and checks a few things about it (does it exists, is it a git repo?) before calling git clone $WHERE.

    But, if we focus on the $WHERE more directly, what would you like?

    - A per-url/per-project SWHERE? It could make the url syntax a bit
    hard (there is already a $: to indicate branch and, implicitely,
    subdirectory inside the git repo) but there is nothing forbidding
    it. Something like:
    
'gitfiletree://github.com/dalehenrich/filetree:pharo5.0/repository/?where=/home/username/project/filetree
    
<http://github.com/dalehenrich/filetree:pharo5.0/repository/?where=/home/username/project/filetree>'
    (is that a correct url syntax?)


Yes, per-project.

My use-case is I often clone repos with a different name than they have
on github (e.g. I took the convention that my github repos are named
pharo-something so that they stand out, but locally I don't care too
much about the pharo- prefix. I could also imagine a
myproject/dependencies/ subdirectory, where all clones of accessory
projects would go.

Ok.

About the URL, I'm not sure the colon used for branch/subdir is really
correct; usually that's the role of the fragment, no?
https://url.spec.whatwg.org/#url-syntax

Hum: one could use a fragment, but we'd be limited to one? The current syntax is the one used in github:// urls, so this is one we're quite familiar with.

Does this have to be specified in the URL? Conceptually, the monticello
repo that should be created/used is gitfiletree://imageDirectory/$WHERE.
Metacello does have to know from which git remote URL to do the clone,
but that's not the same thing as the filetree repo per se.

The problem is that Metacello doesn't clone; it is delegated to Monticello(GitFileTree) (which allows for a clean extension of Metacello). This is different from the implementation of github/bitbucket urls (and even in thoses, Metacello sees only a "repository" spec).

       - Note that I have a procedure for having the Pharo build
    environment integrated inside the git, if you'd like (i.e. git clone
    download also the build command for the right Pharo image: this is
    my professional setup).


In fact my current project is trying to do exactly that: a command-line
tool that knows which base image to get, which VM to run it with, which
baselines to get / load, etc. — and as a preemptive heads-up, I already
have a name for it: fari (italian for "lighthouses" and esperanto for
"to do"; fari.st <http://fari.st> would even look like faristo = maker

Oh. I just use makefiles and `pwd` to recover where is the gitfiletree repo (and download the right image and setup everything). I even have a Makefile that detects that you are either within git or inside a release, and toggles appropriately between GitFileTree and FileTree.

What was important to me was to version the Makefile within the project. And to be able to be multi-language: build a C library and a Pharo image, in a project mixing C and Smalltalk.

Thierry

Reply via email to