ev3dev / ev3dev-lang

(deprecated) language bindings for ev3dev sensors, motors, LEDs, etc.
GNU General Public License v2.0
56 stars 39 forks source link

Use submodules? #30

Closed dlech closed 9 years ago

dlech commented 9 years ago

I would like to use the vala bindings for ev3dev/ev3dev#169 (so you can expect a pull request to update it to the current kernel). It would be nice if each language had its own submodule so that I can clone only the language that I want to use instead of having to clone everything.

For now though, I am going to try this: http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/

dlech commented 9 years ago

Well, git subtree didn't do what I wanted. It still cloned the entire ev3dev-lang repo and I was not able to just get the subdirectory that I wanted.

WasabiFan commented 9 years ago

@dlech I don't see anything wrong with that (and it would make for easier separation, like you mentioned). Are you proposing that we create individual repos within the ev3dev org?

I'd welcome your input on the vala binding; you know much more about vala than I do, so having another set of eyes on it would be great.

P.S. I pushed a commit only a few minutes before you posted this that should bring the vala binding up to the most recent kernel.

dlech commented 9 years ago

Are you proposing that we create individual repos within the ev3dev org?

Technically speaking, the could be hosted anywhere. It might actually make more sense for the "owner" of each language to host it themselves, then they could manage their submodule(s) as they like and there would be less administrative work in the ev3dev org.

(and yes, saw the commit. :thumbsup:)

WasabiFan commented 9 years ago

OK, that makes sense (tell me if I am misunderstanding). We separate the individual languages in to their own repos (under each user individually) and then bring them back in to the main repo with submodules. Then we can have issues and the core spec in this repo, and everything else owned by the maintainer. I like that system; that also means that everyone has full control over their sections, but not over everything.

As I understand it, that is what subtree is made to do, so it shouldn't be too difficult (even for me! :wink: ).

Do you think that the auto-generation scripts should live in the main repo? I'd say 'yes' because it really isn't useful for anything else.

dlech commented 9 years ago

You got it. For example, I have already split out the vala subdirectory here and added it as a subdirectory here.

It was as easy as...

git subtree split --prefix vala -b vala
git remote add dlech git@github.com:dlech/ev3dev-lang-vala
git push dlech vala:master
rm -rf vala/
git add . -A
git submodule add git://github.com/dlech/ev3dev-lang-vala vala
git commit

And yes, it makes sense for the auto-generation scripts to live in the main ev3dev-lang repo. Maintainers would clone the whole ev3dev-lang repo so that they could use the autogen script, but regular users would just clone a submodule so that they could use the library for the language that they want.

WasabiFan commented 9 years ago

Did you want to use the repo that you created as "the repo", or should I create my own?

dlech commented 9 years ago

If you want me to take ownership of it, sure. I imagine I will be the primary consumer if I use it in brickman.

WasabiFan commented 9 years ago

I think vala is a great language; I find it sad how little support there is for it. Anyway, I merged the vala submodule from your PR and will submodule-ify my JavaScript folder as well.

WasabiFan commented 9 years ago

@dlech Should we disable issues on the individual repos to maintain all issues in one place, or keep instance-specific issues separate in their own repos?

dlech commented 9 years ago

I suppose it would be up to the maintainer of the submodule, but I think it makes sense to have issues enabled for each submodule so that the maintainer has full control over them.

WasabiFan commented 9 years ago

@bmegli I recommend that you submodule-ify your R binding as well. If you separate yours like @dlech and I did, you will have full control over your code and won't have to operate through pull requests.

WasabiFan commented 9 years ago

I think we can close this now -- we have transitioned a few of the libraries into submodules and they are serving their purpose well.