Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
support for repos other than GitHub
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Patrick Mueller  
View profile  
 More options Sep 6 2012, 12:15 pm
From: Patrick Mueller <pmue...@gmail.com>
Date: Thu, 6 Sep 2012 09:15:25 -0700 (PDT)
Local: Thurs, Sep 6 2012 12:15 pm
Subject: support for repos other than GitHub

First of all, awesome.  Love to see folks playing with new angles on this.

Based on my experience with node/npm, I'd like to see the following
capabilities for specifying a "repo" for a component:

- in the component.json, I should be able to specify a repo per component;
I will likely want to pull some components from GitHub, but others from a
private or otherwise different repo.  

- in some cases, I'm developing multiple packages (npm) (now components) at
the same time.  npm provides "link" capabilities so I can cross-link
dependencies, but this isn't great.  Since dependencies aren't bundled (I
don't think) when you download them from a repo, I think the most
straight-forward thing to do in this case is to allow me to stub out a
component with a pointer to what I want to use at development time.

re: first point - howsabout the current key in the dependencies object be a
URL instead of a :user/:repo string?  The default, scheme-less URL, could
continue to point to GitHub, but if I used "my-repo://foo-blatz":
<some-version-string>, then that would mean "resolve using the my-repo"
repo handler.  You would of course have to have a repo handler installed in
some fashion (and then here comes the chicken-and-egg question :-) ).
 Would also need to figure out what this means with this gnarly mess of
aliasing that's going on - I think at runtime you don't want to see the
repo's, just more of a :something-:something-else scheme.

re: second point - the example here would be that I'm developing an app
that uses a component which I would also like to publish as an consumable
component.  Say, I'm developing App A that uses Component B, and I also
want to publish Component B for other people to use in their own apps.  

npm solves this with "npm link", but it's a bit of a pain to set up.  In
the example case, what I'd like to do is structure my source code like this:

project/
- app.A
- component.B

where app.A and component.B are both components (both use component.json to
access other components).  In this case, app.A needs a reference to
component.B.  I would expect app.A's component.json to look something like
this:

    dependencies: {
        ...
        "myRepo://component.B": "*",
        ...
    }

But I don't really want to "install", at development time, component.B in
app.A/component.  What I really want is a "link".  I think I'd prefer some
kind of actual file, instead of file system link.  So, say, I create a
directory "linked-dependencies", and in there I plop a file "component.B",
in some kind of resolvable name, which has a file reference to the actual
component.  In this case, it would be "../component.B".  Then whenever some
code tries to resolve "component.B" - at "component install"time AND at
build time / run time, it's resolved as the linked-to directory.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vision media [ Tj Holowaychuk ]  
View profile  
 More options Sep 6 2012, 12:38 pm
From: "vision media [ Tj Holowaychuk ]" <t...@vision-media.ca>
Date: Thu, 6 Sep 2012 09:38:25 -0700
Local: Thurs, Sep 6 2012 12:38 pm
Subject: Re: support for repos other than GitHub

IMO a decent way to go about it would justbe to specify that you have a dep
of "foo/bar" you set up in ~/.component.json config that you want to check
an internal "registry" first, so even regular deps like "component/tip"
*could* resolve to your private fork if you liked, without change. To me
this is cleaner than explicitly specifying entire repo urls


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrick Mueller  
View profile  
 More options Sep 6 2012, 1:05 pm
From: Patrick Mueller <pmue...@gmail.com>
Date: Thu, 6 Sep 2012 13:05:19 -0400
Local: Thurs, Sep 6 2012 1:05 pm
Subject: Re: support for repos other than GitHub

On Thu, Sep 6, 2012 at 12:38 PM, vision media [ Tj Holowaychuk ] <

t...@vision-media.ca> wrote:
> IMO a decent way to go about it would justbe to specify that you have a
> dep of "foo/bar" you set up in ~/.component.json config that you want to
> check an internal "registry" first, so even regular deps like
> "component/tip" *could* resolve to your private fork if you liked, without
> change. To me this is cleaner than explicitly specifying entire repo urls

I'd really like to indicate on the component dependency name, or value, the
repo that should be accessed to retrieve the dependency.  I already know
which components I want to get from which registry, and I don't really want
to "accidently" pick up a dependency from the wrong repo.  Alternatively, a
separate key in the component.json that mapped component names to
registries:

    {
        "component-registries": {
            "foo/bar": "some://url/here/?version=:version"
        },
        "dependencies": {
            "foo/bar": "*"
        },
    }

Default registry being GitHub.

That would solve the issue of "mapping" some foreign component into the
"component name space" (ie, :user-:repo) as well.

This could be in a separate side file in your project, I suppose, but that
seems like overkill and the information is now shared across files, when
it's nice to have all this info in one single place. "component install"
would be groping around for this separate file all the time.

I like the idea of being able to have a component.json being fully
self-describable, in terms of where to get it's dependencies from.  There
may be some magic "dependency url resolver" which "obtains" components
somehow, which you have to have installed in your project in order for the
URL in the component.json to make sense.

The problem with the current npm story in this regard is that you can only
ever point to one repo - the default npmjs.org, or overridable via
command-line/env-var.  This is problematic to get set up correctly for
users.  Asking developers to "hand-install" (if it can't be automated) a
foreign component resolver is much less of a problem.  Do it once, you're
done, and you can keep this hand-installed resolver IN your
development-time project's SCM.  No command-line/env-var madness.  No
wondering WHICH repo you got a dependency from (in the case of a
list/hierarchy of repos).

--
Patrick Mueller
http://muellerware.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vision media [ Tj Holowaychuk ]  
View profile  
 More options Sep 6 2012, 1:18 pm
From: "vision media [ Tj Holowaychuk ]" <t...@vision-media.ca>
Date: Thu, 6 Sep 2012 10:18:22 -0700
Local: Thurs, Sep 6 2012 1:18 pm
Subject: Re: support for repos other than GitHub

I like the idea of stating the registries in the main component.json rather
than some ~/, I'll add that to the issue.

I don't think though that we really need to "map" to these registries, it's
pretty east to have an app (
https://github.com/component/server/blob/master/app.js) that serves up
`/:user/:proj/:version` etc like github


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrick Mueller  
View profile  
 More options Sep 7 2012, 1:15 am
From: Patrick Mueller <pmue...@gmail.com>
Date: Fri, 7 Sep 2012 01:15:50 -0400
Local: Fri, Sep 7 2012 1:15 am
Subject: Re: support for repos other than GitHub

Thanks for noting that in
https://github.com/component/component/issues/6(for future reference
for myself).

So, if all the repo access follows github "raw" naming conventions, I think
all I'd want to do is supply you an http:// url prefix in front of
:user/:proj/:version , or whatever.  My current thoughts are to store
things not at GiHub on a plain old http file server, and so it should be
straight-forward to publish in that way.  I was already planning on doing
that with npm, using http:// urls as my dependencies.

I wonder if at some point, though, you're going to want to venture into
Github API territory (starting here? -
https://github.com/component/component/blob/master/lib/component.js ), in
which case things get a little more complicated.

On Thu, Sep 6, 2012 at 1:18 PM, vision media [ Tj Holowaychuk ] <

t...@vision-media.ca> wrote:
> I like the idea of stating the registries in the main component.json
> rather than some ~/, I'll add that to the issue.

> I don't think though that we really need to "map" to these registries,
> it's pretty east to have an app (
> https://github.com/component/server/blob/master/app.js) that serves up
> `/:user/:proj/:version` etc like github

--
Patrick Mueller
http://muellerware.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vision media [ Tj Holowaychuk ]  
View profile  
 More options Sep 7 2012, 11:37 am
From: "vision media [ Tj Holowaychuk ]" <t...@vision-media.ca>
Date: Fri, 7 Sep 2012 08:37:41 -0700
Local: Fri, Sep 7 2012 11:37 am
Subject: Re: support for repos other than GitHub

eventually we might use github's API for some things, for example sniffing
out projects that have a component.json to populate our search, but that
wouldn't have too much of an effect on private stuff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »