www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Different versions of same library with Deimos

reply Jens Mueller <jens.k.mueller gmx.de> writes:
Hello,

how is Deimos supposed to address different versions of a library?
In the case at hand, I have a Deimos repository for LLVM 3.1. Now I want
to add support for version 3.2. Should I create a different branch or
just a tag?

BTW I updated my documentation for creating Deimos repositories.
http://jkm.github.com/d-programming-language.org/deimos.html

Jens
Mar 25 2013
next sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 25 Mar 2013 13:50:37 +0100
Jens Mueller <jens.k.mueller gmx.de> wrote:

 Hello,
 
 how is Deimos supposed to address different versions of a library?
 In the case at hand, I have a Deimos repository for LLVM 3.1. Now I
 want to add support for version 3.2. Should I create a different
 branch or just a tag?
 
 BTW I updated my documentation for creating Deimos repositories.
 http://jkm.github.com/d-programming-language.org/deimos.html
 
 Jens
I've been meaning to bring up that question, too. It would make sense that each version of the target library would have its own branch in its Deimos repo, because that way you can update it if any problems are discovered. Tags would be a bad idea because of that. But the problem is, there doesn't seem to be a way to do a "pull branch" request.
Mar 25 2013
next sibling parent Jens Mueller <jens.k.mueller gmx.de> writes:
Nick Sabalausky wrote:
 On Mon, 25 Mar 2013 13:50:37 +0100
 Jens Mueller <jens.k.mueller gmx.de> wrote:
 
 Hello,
 
 how is Deimos supposed to address different versions of a library?
 In the case at hand, I have a Deimos repository for LLVM 3.1. Now I
 want to add support for version 3.2. Should I create a different
 branch or just a tag?
 
 BTW I updated my documentation for creating Deimos repositories.
 http://jkm.github.com/d-programming-language.org/deimos.html
 
 Jens
I've been meaning to bring up that question, too. It would make sense that each version of the target library would have its own branch in its Deimos repo, because that way you can update it if any problems are discovered. Tags would be a bad idea because of that. But the problem is, there doesn't seem to be a way to do a "pull branch" request.
Having different branches for each version seems like the right choice. What would be the role of the master branch then? The latest version? Jens
Mar 25 2013
prev sibling next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-03-25 13:59, Nick Sabalausky wrote:

 I've been meaning to bring up that question, too. It would make sense
 that each version of the target library would have its own branch in
 its Deimos repo, because that way you can update it if any problems are
 discovered. Tags would be a bad idea because of that. But the problem
 is, there doesn't seem to be a way to do a "pull branch" request.
I would say add a tag for each version. Keep the a couple of the latest versions as a branch, or for as long as a version is in use. -- /Jacob Carlborg
Mar 25 2013
parent reply Jens Mueller <jens.k.mueller gmx.de> writes:
Jacob Carlborg wrote:
 On 2013-03-25 13:59, Nick Sabalausky wrote:
 
I've been meaning to bring up that question, too. It would make sense
that each version of the target library would have its own branch in
its Deimos repo, because that way you can update it if any problems are
discovered. Tags would be a bad idea because of that. But the problem
is, there doesn't seem to be a way to do a "pull branch" request.
I would say add a tag for each version. Keep the a couple of the latest versions as a branch, or for as long as a version is in use.
You mean basically using both tags and branches. Because tags are easy to use to access a specific version. Can these be used across branches? Jens
Mar 25 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-03-25 15:01, Jens Mueller wrote:

 You mean basically using both tags and branches. Because tags are easy
 to use to access a specific version. Can these be used across branches?
Branches are only useful if you want to keep updating the code for a given version. If that's not the case, I think tags are better. -- /Jacob Carlborg
Mar 25 2013
parent Jens Mueller <jens.k.mueller gmx.de> writes:
Jacob Carlborg wrote:
 On 2013-03-25 15:01, Jens Mueller wrote:
 
You mean basically using both tags and branches. Because tags are easy
to use to access a specific version. Can these be used across branches?
Branches are only useful if you want to keep updating the code for a given version. If that's not the case, I think tags are better.
From my experience you don't always get right. So I think having the
branches is recommended. But we should use the tags for the version since one can update them. Jens
Mar 25 2013
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-03-25 13:59, Nick Sabalausky wrote:

 But the problem is, there doesn't seem to be a way to do a "pull branch"
request.
It doesn't make a different from which branch the new branch originated? -- /Jacob Carlborg
Mar 25 2013
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 25 Mar 2013 14:25:01 +0100
Jacob Carlborg <doob me.com> wrote:

 On 2013-03-25 13:59, Nick Sabalausky wrote:
 
 But the problem is, there doesn't seem to be a way to do a "pull
 branch" request.
It doesn't make a different from which branch the new branch originated?
Unless things have changed since the last time I tried, GitHub has no way to setup your pull request to mean "Please pull this new branch XXXX *as* a new branch." No matter what the source branch is, GitHub only lets you request it to be pulled into a branch that *already* exists in the destination repo. Always seemed like a goofy limitation to me.
Mar 25 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-03-25 17:56, Nick Sabalausky wrote:

 Unless things have changed since the last time I tried, GitHub has no
 way to setup your pull request to mean "Please pull this new branch
 XXXX *as* a new branch." No matter what the source branch is, GitHub
 only lets you request it to be pulled into a branch that *already*
 exists in the destination repo.

 Always seemed like a goofy limitation to me.
Aha, I didn't understood you talked about new branches. -- /Jacob Carlborg
Mar 25 2013
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 3/25/2013 5:50 AM, Jens Mueller wrote:
 how is Deimos supposed to address different versions of a library?
 In the case at hand, I have a Deimos repository for LLVM 3.1. Now I want
 to add support for version 3.2. Should I create a different branch or
 just a tag?
I think a branch for older versions would work best. "master" would be for the newest version.
Mar 25 2013
parent reply "David Nadlinger" <see klickverbot.at> writes:
On Monday, 25 March 2013 at 22:11:23 UTC, Walter Bright wrote:
 On 3/25/2013 5:50 AM, Jens Mueller wrote:
 how is Deimos supposed to address different versions of a 
 library?
 In the case at hand, I have a Deimos repository for LLVM 3.1. 
 Now I want
 to add support for version 3.2. Should I create a different 
 branch or
 just a tag?
I think a branch for older versions would work best. "master" would be for the newest version.
Or just not have a "master" branch at all. You can select the default branch in the GitHub repo admin settings. David
Mar 25 2013
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 3/25/2013 4:36 PM, David Nadlinger wrote:
 On Monday, 25 March 2013 at 22:11:23 UTC, Walter Bright wrote:
 On 3/25/2013 5:50 AM, Jens Mueller wrote:
 how is Deimos supposed to address different versions of a library?
 In the case at hand, I have a Deimos repository for LLVM 3.1. Now I want
 to add support for version 3.2. Should I create a different branch or
 just a tag?
I think a branch for older versions would work best. "master" would be for the newest version.
Or just not have a "master" branch at all. You can select the default branch in the GitHub repo admin settings.
What's the point of that?
Mar 25 2013
next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Monday, 25 March 2013 at 23:49:22 UTC, Walter Bright wrote:
 On 3/25/2013 4:36 PM, David Nadlinger wrote:
 On Monday, 25 March 2013 at 22:11:23 UTC, Walter Bright wrote:
 I think a branch for older versions would work best. "master" 
 would be for the
 newest version.
Or just not have a "master" branch at all. You can select the default branch in the GitHub repo admin settings.
What's the point of that?
Not having to worry about what the master branch should be. ;) David
Mar 25 2013
prev sibling parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Monday, March 25, 2013 16:49:22 Walter Bright wrote:
 On 3/25/2013 4:36 PM, David Nadlinger wrote:
 On Monday, 25 March 2013 at 22:11:23 UTC, Walter Bright wrote:
 On 3/25/2013 5:50 AM, Jens Mueller wrote:
 how is Deimos supposed to address different versions of a library?
 In the case at hand, I have a Deimos repository for LLVM 3.1. Now I want
 to add support for version 3.2. Should I create a different branch or
 just a tag?
I think a branch for older versions would work best. "master" would be for the newest version.
Or just not have a "master" branch at all. You can select the default branch in the GitHub repo admin settings.
What's the point of that?
Well, since all the deimos stuff is is wrappers around released software, it would make sense that its version numbers always match the released software, in which case, master wouldn't really make sense unless it wrapped the currently developed version of the C library, which I wouldn't expect it to be doing in most cases. - Jonathan M Davis
Mar 25 2013
prev sibling parent reply "Moritz Maxeiner" <moritz ucworks.org> writes:
On Monday, 25 March 2013 at 12:50:49 UTC, Jens Mueller wrote:
 Hello,

 how is Deimos supposed to address different versions of a 
 library?
 In the case at hand, I have a Deimos repository for LLVM 3.1. 
 Now I want
 to add support for version 3.2. Should I create a different 
 branch or
 just a tag?

 BTW I updated my documentation for creating Deimos repositories.
 http://jkm.github.com/d-programming-language.org/deimos.html

 Jens
We talked about that previously, but I'll say it here again for reference: You could use version identifiers and CTFE (the way I did with llvm-d). That way someone just has to download the deimos project and doesn't have to worry about getting the right branch every time he is on a different system. It also reduces the amount of redundant code as most of the code across different versions of the same library (for the C API anyway) will be the same and if you find a bug you don't have to look at all the other branches to see if it also needs to be fixed there. Reading the rest of the posts here it doesn't seem like anyone favours it particularily, though, which is a pity. Moritz
Mar 25 2013
parent 1100110 <0b1100110 gmail.com> writes:
 We talked about that previously, but I'll say it here again for
 reference: You could use version identifiers and CTFE (the way I did
 with llvm-d). That way someone just has to download the deimos project
 and doesn't have to worry about getting the right branch every time he
 is on a different system. It also reduces the amount of redundant code
 as most of the code across different versions of the same library (for
 the C API anyway) will be the same and if you find a bug you don't have
 to look at all the other branches to see if it also needs to be fixed
 there.

 Reading the rest of the posts here it doesn't seem like anyone favours
 it particularly, though, which is a pity.

 Moritz
+1 Having used both, I favor it.
Mar 26 2013