News for hackers. Stuff that matters.
Re:Abandon your DVCS and return to sanity by angersock on Tuesday March 03, 2015 @12:19PM (#9138930)
Why are you putting build artifacts into source control?
Re:Abandon your DVCS and return to sanity by Xylakant on Tuesday March 03, 2015 @12:21PM (#9138955)
Because they're intermediary steps of a process, regenerating them takes an hour and I don't feel like setting up everybody's environment to build them. Most people don't need the capability, but they need the result.

Why are you asking?

Re:Abandon your DVCS and return to sanity by namdnay on Tuesday March 03, 2015 @12:42PM (#9139152)
I think the question asked was closer to "why aren't you using an artifact repository?"

Nexus is pretty good, but if the language you are using isn't integrated well with gradle/maven you can always just use a shared drive fed by jenkins builds.

Re:Abandon your DVCS and return to sanity by TeMPOraL on Tuesday March 03, 2015 @12:57PM (#9139276)
> Nexus is pretty good, but if the language you are using isn't integrated well with gradle/maven you can always just use a shared drive fed by jenkins builds.

Here's where I start to have problems with contemporary development culture. You mentioned using Nexus, Gradle, Maven and Jenkins where the guy just want to keep some binaries along with the source code they're generated from.

We're complicating things beyond reason nowadays.

Re:Abandon your DVCS and return to sanity by jrochkind1 on Tuesday March 03, 2015 @04:10PM (#9140772)
To bring it back to the OP, this argument is in fact represented in the OP.

OP is arguing that these (having to use Nexus, Gradle, Maven, and Jenkins just to keep some binaries along with the source code they're generated from) are workarounds to limitations in git that ideally would not be there (and don't neccesarily have to be there, and aren't there in all VCS's), and the OP mentions that instead git fans want to claim "No, that's just the way git SHOULD work, you SHOULD need to go use an 'artifact repo' in addition to git to keep a few binaries with your source code" instead.

I tend to agree with the OP.

Re:Abandon your DVCS and return to sanity by angersock on Tuesday March 03, 2015 @01:54PM (#9139747)
Agreed.

That said--and this is without knowing the exact build and tooling environment, so I may well be giving advice inappropriate to the situation at hand!--the second part of that "keep some binaries along with the source files they're generated from" is kind of an antipattern.

If it takes too long to generate them from source, each time erry time, they need to fix that issue--least of all because slow builds mean slow testing, and slow testing means no testing.

That's why I spent two days earlier this year moving a 30-minute build down to a 2.5 minute build.

Re:Abandon your DVCS and return to sanity by Xylakant on Tuesday March 03, 2015 @02:29PM (#9140005)
Yes, your advice is sound for the general case but inapplicable in this specific incarnation of the problem.
Re:Abandon your DVCS and return to sanity by angersock on Tuesday March 03, 2015 @04:13PM (#9140794)
Out of curiosity, what is the gist of your setup? Why is this incarnation such a departure from the general case?
Re:Abandon your DVCS and return to sanity by Xylakant on Tuesday March 03, 2015 @05:10PM (#9141133)
The output of the build is basically a tool in itself. So most people don't need the build process, just the resulting tool. The input changes on pretty much a monthly basis and is not easily versioned. I could set up all dev machines to support the build and everybody could build it themselves from sources, but that would require me to

  * install all the required instruments for the ritual rain dance
  * teach the whole team how to do the ritual rain dance
  * support the people that break an arm or a leg doing the ritual rain dance
So I prefer perform the dance on my machine, collect the tool and point the main dev environment to the right location. It's all scripted, so I kick off the job and grab a coffee. However, I want to keep old instances around so I can track when bugs crept in, so I can't just go overwrite the result, so I need to adjust the pointer every time. If I could just check the tool in with the regular dev setup that would be much easier, but - since we're using git - that would blow up quite quickly and overwhelm my disk space. (And folks would kill me for filling up their disks as well - rightfully so). That's something SVN or another centralized VCS would handle much more gracefully. In a gist, I have a use-case for fairly stupid versioned file storage with a push/pull api. No complicated merging, no branching, nothing. git-annex could do, but is overkill.

There are some better solutions to what we're currently doing, but there's so many yaks to shave and so few razors.

Re:Abandon your DVCS and return to sanity by pyre on Tuesday March 03, 2015 @06:42PM (#9141591)
> That's something SVN or another centralized VCS would handle much more gracefully.

Subversion handles this gracefully because you don't download all of the repository's history to your machine. It's a trade-off that you're talking about here. Most people are ok with losing the ability to check in 500MB files in order to gain the decentralization of having a full copy of the repo (and not needing to query the server just to view history).

Re:Abandon your DVCS and return to sanity by gknoy on Tuesday March 03, 2015 @06:44PM (#9141606)
Thanks for such a good explanation. When I first saw artifacts of things generated by code in our repo, I had a big WTF moment, but it made a lot of sense once someone pointed out that it was Rather Handy for catching bugs in the code that does the generation.
Re:Abandon your DVCS and return to sanity by s73v3r on Tuesday March 03, 2015 @06:57PM (#9141691)
What if, instead of binary build artifacts, they were images?
Re:Abandon your DVCS and return to sanity by pyre on Tuesday March 03, 2015 @06:36PM (#9141570)
> We're complicating things beyond reason nowadays.

There isn't always a way to dumb things down to the level that people would like. It would be so much easier to get to work if I could fly in a straight line between work and home, but I don't complain that the world doesn't accommodate me.

Re:Abandon your DVCS and return to sanity by jsight on Tuesday March 03, 2015 @02:13PM (#9139888)
He also mentioned using a simple shared drive. It would have been difficult to know which of these solutions was the right level of complexity and capability without knowing more context (a point which he seemed to make clear).
Re:Abandon your DVCS and return to sanity by cssmoo on Tuesday March 03, 2015 @02:20PM (#9139938)
Shared drives are mutable which is a big problem with build output.
Re:Abandon your DVCS and return to sanity by Xylakant on Tuesday March 03, 2015 @02:48PM (#9140164)
No, I didnt. I mentioned a shared location. It's not an networked drive, I'm not insane.
Re:Abandon your DVCS and return to sanity by cssmoo on Tuesday March 03, 2015 @02:55PM (#9140226)
Fair point. Comment retracted. My apologies.
Re:Abandon your DVCS and return to sanity by Xylakant on Tuesday March 03, 2015 @12:47PM (#9139196)
Valid question: Because the tooling does not think in terms of artifacts that are versioned in repositories, but rather in terms of "files" that are in a given location. I'm using a shared location, but every build requires modifying another file to point to the now current version. It's all solvable, but the easiest solution would be to just version the result.

I could fix the tooling, but alas, I have other yaks to shave. It's an imperfect world.

Re:Abandon your DVCS and return to sanity by pyre on Tuesday March 03, 2015 @06:45PM (#9141611)
> but every build requires modifying another file to point to the now current version

If you could version the file in git, you would have to check in the new version of the file, so it's not like you're adding a step to have to update (e.g.) a symlink.

Re:Abandon your DVCS and return to sanity by Xylakant on Tuesday March 03, 2015 @07:15PM (#9141832)
But I have a lot of files lying in a shared location that are named build-<datetime> and I can accidentally break revisions in the repo by moving/renaming/deleting any of these. That may be a feature to some people, but that's something I consider a weak spot. It's brittle and prone to breakage and I dislike brittle.
Re:Abandon your DVCS and return to sanity by tedunangst on Tuesday March 03, 2015 @12:23PM (#9138983)
People get pretty religious about what should (or not) be checked in to version control.
Re:Abandon your DVCS and return to sanity by Xylakant on Tuesday March 03, 2015 @12:31PM (#9139057)
I can tell from the downvotes :)
Re:Abandon your DVCS and return to sanity by pyre on Tuesday March 03, 2015 @06:47PM (#9141615)
It's designed with a particular use-case in mind. When people complain that square pegs don't fit into round holes, it makes more sense for them to step back and evaluate what they are trying to accomplish, and the tools they are using the accomplish it.
Re:Abandon your DVCS and return to sanity by phkahler on Tuesday March 03, 2015 @01:12PM (#9139403)
>> Because they're intermediary steps of a process, regenerating them takes an hour and I don't feel like setting up everybody's environment to build them. Most people don't need the capability, but they need the result.

Put your build tools in a repo. It should be easy to set up a new developer with a complete build system by getting it from the a repo. Now use make or anything that can check dependencies so those things are not regenerated unless they need to be. Always check in a freshly generated file along with its source.

Re:Abandon your DVCS and return to sanity by Too on Tuesday March 03, 2015 @02:03PM (#9139813)
Setting up a build system can be a bitch. Not every developer needs to be able to build every obscure module of all your companies tooling. A .net developer shouldn't have to rebuild c++ boost just because he relies on a small native dll.

In some cases the tooling of one developer can even conflict with the one of another, one requires python 2.7 to be in your PATH while the other requires 3.3, etc.

I fully agree that it should be easy to set up but the reality is different, especially when you deal with legacy, rely on third party libraries or build open source projects from source.

Re:Abandon your DVCS and return to sanity by icefox on Tuesday March 03, 2015 @12:35PM (#9139094)
What is annoying is when build artifacts are checked into source control systems along side of the source. There is very little way to exclude them or only check out the binaries, you can only have both. This happens all too often and I don't care if you want to keep using subversion you really should stop doing this.

/src/foo.c /src/foo.o

Re:Abandon your DVCS and return to sanity by Gorkys on Tuesday March 03, 2015 @02:33PM (#9140032)
Not the OP, but in our product we have very large binaries that are the output of the product itself. Each time a change is made to the program, the output needs to be compared to the existing output first automatically and if the output isn't byte-by-byte identical then manually (visually).

So essentially, without large binaries in source control we'd lose testing.