cornelius / inqlude-data

Library meta data for independent Qt library archive
48 stars 54 forks source link

Can url/vcs always points to a true VCS repo ? #63

Open oliviermaridat opened 9 years ago

oliviermaridat commented 9 years ago

Hi there!

I am wondering about the content of the field url/vcs of the manifest files. I though it would contain a link to a usable VCS repository (to be able to do "git clone url" for example), but apparently it depends of the projects.

For example:

Is it on purpose?

cornelius commented 9 years ago

The idea is to have this field link to a web page with information about how the repository can be accessed. In some cases this can double as the actual clone URL (in the case of GitHub for example), but in general the page should be accessible by a browser.

Adding information about how a version control can check out the code might be nice to add, but this would need a little bit more structure, especially to support the generic case of different version control systems.

oliviermaridat commented 9 years ago

Ok thanks, I understand better your vision here. I suppose that the "inqlude-client" is only using source URL ("packages/source"), and this is why it does not have any issue with that. Am I wrong?

If you intend to add this information, one solution may be to add a new "git"/"svn"/"hg" field in "packages". For example with Git:

 "packages": {
    "source": "https://github.com/lastfm/liblastfm/archive/1.0.8.tar.gz",
    "git": "https://github.com/lastfm/liblastfm"
  }

Or with SVN (some additional fields may be required for some project, because SVN does not support branch, tags, etc natively)

 "packages": {
    "source": "https://svnhub.com/lastfm/liblastfm/archive/1.0.8.tar.gz",
    "svn": "https://svnhub.com/lastfm/liblastfm",
    "trunk-path": "Trunk",
    "branches-path": "Branches",
    "tags-path": "Tags"
  }

Actually, it is usually possible to guess the VSC type (Git, SVN, ...) using the URL (github, ...). So a "vcs" field could be the default one, and for some project "git", "svn" or any other can be used instead.

What do you think?

cornelius commented 9 years ago

Yes, I think we need some explicit fields for the version control system. There actually is an item in the todo list for that: https://github.com/cornelius/inqlude/blob/master/TODO#L24

Figuring out what the best structure is needs a little bit more thought. Maybe we need an extra section as it's neither links to web pages nor actual packages.