231 points · by xkarga00 · 11y ago · 263 comments
--------------
It seems like these people simply don't understand Github very well.
Can only view diffs on a single page (can be very slow).
Cannot compare differences between patch sets.
Accepting a patch creates a "merge commit" (ugly repo history).
Don't use the merge button, just add the requester's repo as a remote to yours and use your familiar tools. If possible and done, a fast-forward merge + push will also close the PR. Comments are sent as they are written; you cannot "draft" comments.
How is that different from pull requests via emails? (Also, on the website itself the comments can be edited.) To create a patch one must fork the repository publicly
(weird and unnecessary).
What exactly is weird about that? It makes it possible for the requestor to craft their changes with full control, without requiring upstream to give them write access. This point is just entirely nonsensical. In general, pull request culture is not about code review.
A strong claim, but one without any justification, and which is, in my experience, as far from the truth as possible.Edit:
In light of their complaints about the need to fork, i have to say that their current contribution process can in its entirety be described as weird, unnecessary and baroque:
Actually, you don't need to do that. GitHub provides a special pulls remote "namespace" on the upstream repo, so you can add it as a fetch pattern to your .git/config like so:
[remote "upstream"]
url = https://github.com/neovim/neovim.git
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/pull/upstream/*
Then when you `git fetch --all`, you will have ALL pull requests available in your local repo in the local pull/ namespace. To check out PR #42: git checkout -b foo refs/pull/upstream/42It's interesting that other systems has a nicer implementation for it.
In Phabricator, it's:
$ arc patch D12345
and it checks out revision 12345 into an appropriately named branch.Thank you :D
With github PRs, notifications are sent as soon as you write your first comment; in systems like gerrit and rietveld (and email) they are not sent until the reviewer chooses to send them. This leads to either awkward interactions if you start replying to comments while the reviewer is still reviewing, or unresponsiveness if everyone introduces hysteresis to avoid this situation.
This is IMHO the biggest problem with Github PRs; I don't necessarily agree with the Go team's decision to abandon the PR system but on smaller projects I have pushed for rietveld over PRs for this reason.
1:12pm line 33: Why are you doing this?
1:13pm line 33: I see, sorry, ignore my earlier comment.
A system that lets you draft comments and then send them out in a batch can avoid a bunch of noise. On the other hand, though, people who aren't expecting it can get stuck with draft comments they don't send out.Imho, the end user should be able to choose between live commenting vs draft+send.
On the contributor instructions: note that if you just want to use plain git (and not our git-codereview tool) then you can stop at "Register with Gerrit."
We created the tool to provide a more familiar review process for the people that used our previous system.
If we took your advice and used offline diff tools, etc, we would need a similar page explaining how to do all of that. None of this convenience comes without an up front cost.
My issues are two-fold:
You could have just said on that slide: "We want a central code review system, so people do not have to learn Git. Github isn't terrible, but Gerrit is much better."
Instead you ended up putting up a list of points that make github seem like some kind of fatally flawed thing, while frankly putting people off with inaccuracies/subjectivities.
Secondly, by not allowing things by github you're forcing people to learn something else. Most developers experienced with Git will also be very familiar with Github. You're telling those people to instead go and learn something else. That will result in some people deciding it's not worth the trouble. I'm fully aware it's up to you to decide whether you're willing to pay that price, but personally i find it a bit odd that you can't simply do both.
And as for, apparently, most of the documentation on your contribute page being safely ignorable: If that is truly the case, i recommend rewriting that to make it obvious, because right now it's anything but. :)
If the last bit is the only good thing that comes out of this, then i'll be happy.
I have no idea what they specifically mean, but I can tell you, that the github requirement of pr to come from public repositories on github is something that bothers me occasionally. There are lots of reasons why I may not want my github fork to be public or I don't want to have a github fork at all but do want to contribute to a repo hosted there. This is a distributed version control system we are talking about after all.
As for their claim about pull request culture, again I'm not sure what they specifically mean, but I find the github code review tools to be very rudimentary and suspect that lots of other people with experience with more sophisticated code review workflows feel the same way. Github is a great service for some things but it certainly is not centrally about code review.
There are lots of reasons why I may not want my github
fork to be public or I don't want to have a github fork
at allIt's difficult for me to explain why I feel this way. The original stigma of 'fork' is definitely part of it, but most of it is just my distaste for visibility: it feels horribly immodest to associate myself with a project with which I probably have only a passing association. I can't defend my attitude, but it's probably worth noting that people like me (and apparently the author of the Go article) will be dissuaded if public affiliation is a requirement.
I just ran into this issue the other day when I was using Node with a lot of dependencies that still haven't been patched for issues that cropped up in OSX Yosemite.
There are lots of reasons why I may not want my github
fork to be public or I don't want to have a github fork
at all
The authors of the Lua language develop in private. They like to experiment freely with ideas, many of which never see the light of day.They said if people saw what they were doing in real time, it would probably cause mass panic among the community. (Oh no! You're removing feature X?)
This is the smell of git plumbing again. Don't use the obvious UX that's been presented to you, do some other workflow that doesn't appear in the documentation.
(Does this really need to be said?)
As a funny aside, when Github breaks the thing to say is "I wish one day someone would invent a decentralized version control system" ;-)
(But I am entirely sympathetic to the opinion that git itself exposes too much plumbing and has a pretty baroque end-user interface for doing certain things. And it's also certainly legit to wish or suggest that _github_'s UI worked differently than it does, although the merge commits don't really bother me, and some people prefer them, it's a point of some contention).
Looking back at arguments people make about how to "do it properly", it looks like something is broken. Git is broken, maybe Github is broken, documentation, UI, marketing. Something is though. When an obvious UI element is there, seemingly designed to do merges, and then everyone says "no, no, do this other thing", like send emails, then rebase here on top of that, make a ref pattern in your ~/.gitconfig ...
Fwiw, of the six bullets, I see three which are clearly subjective, one which is a clear advantage of gerrit, and two which I don't really know enough about to refute.
When it comes down to build systems, I think it's very easy to spend a lot of time moving sideways or backwards - and if the tool you're moving to has deficiencies compared with what you had before, it can be very frustrating. Certainly, if the tool people want you to move to offers few advantages over your current infrastructure, a quick dismissal is reasonable.
Getting set up with their current contribution system might seem a little clunky, but I don't think it's particularly hard to do, and definitely seems like a 'run-once' thing. Once it's set up, it seems to integrate into a workflow well.
Their contributors will have their current workflows set up nicely - and unless github's issues system has compelling advantages, it's definitely not worth them switching due to the temporary loss in productivity.
It does a few cute and clever things, but I totally agree with this slide deck's gripes. Email and GitHub are not really compatible.
When you live with that assumption, things like merge commits and pull requests seem silly and overkill since you live in the "patch is developed/reviewed in isolation" world.
Everything about the language screams of coming from minds who stopped learning new things in the late 90s.
Happy to engage in a discussion about modern software engineering.
Are you?
What do you think would happen if there was a slide that mentioned that the culture around UTF was mainly about misogyny so they weren't going to support it?
Out of context these comments read like they're in response to a poorly written article with an inflammatory title like "Why GitHub sucks".
Drafting comments... if you want to draft comments, can't you do that in a separate editor? Better than relying on the browser as an editor.
I agree, though, the public repository requirement for making a PR is a bit awkward.
Rust has an integration robot that does all the merges into master, that records who reviewed it, what the link to the PR (and the code review on that PR! it exists!) was, etc. It was a little weird as a complete newcomer not to see humans in the `git log --first-parent` view, but I really like it now, because if I want to know why some commit was merged the way it was, that discussion is recorded nicely. (The merge commit has the subject/body of the PR, which doesn't need to match the subject/body of any commit in the PR.) Compare with, like, the Linux kernel, where the best you can do is Google for LKML threads with the same subject line. There's even a convention of [PATCH 0/10] for summaries, but those summaries are nowhere to be seen in the git repository.
A pretty history is extremely important when you need to attract new contributors to your repository. I've maintained extremely clean git logs and extremely nasty ones too. New contributors are immediately turned off in the latter case, because a good developer will generally git log extremely early when discovering a new project.
That's cool, but it's still constraining a flexible system away from someone else's preferences. I prefer "--no-ff" myself too, but think that's irrelevant.
If you pull rebase, then that merge commit will be whatever the author of the commit decides it should be.
If they currently have ten files open, the merge commit will be ten files, regardless of how connected these files are, which is a lot of noise. With a pull-rebase, when they are ready to commit, they will decide to break it down nicely in 2+3+3+2 files.
The only person who should decide how to merge their files should be the person that modified these files, not git.
"Can only view diffs on a single page"
You don't need to use GitHub to view diffs.
"To create a patch one must fork the repository publicly (weird and unnecessary)."
I don't think it's weird.
"Accepting a patch creates a "merge commit" (ugly repo history)."
You don't need to have a merge commit, although I don't think that creates an ugly repo history.
"In general, pull request culture is not about code review."
I have no idea what this means.
Companies/organizations have different requirements for code reviews. Yes you can review code in pull requests, but in my opinion, it was not built for code reviews. In my previous company, we had a very rigorous code review process, which includes pre and post commit code reviews. We used Collaborator[1] and ReviewBoard[2] for code reviews and I totally understand why the Go team would use Gerrit over pull requests for code review.
[1] http://smartbear.com/product/collaborator/overview/ [2] https://www.reviewboard.org/
Me either. To me, the entire point of pull requests is about triggering (code) reviews. If I don't want to bother with review, why not just grant direct push access and skip the rubber stamp ceremony?
If I don't trust someone enough to grant write access to my repo, I certainly don't trust them enough to rubber stamp their pull requests.
Although I agree, I don't think merge commits are ugly. I think people coming from SVN/CVS where history is strictly linear have this obsession with keeping it that way.
In fact I find lots of developers just have an obsession with "clean" history, and fetishes for particular tools. It baffles me.
This has absolutely nothing to do with those, especially since they didn't even allow cleaning up histories. There is one very simple reason for why some developers prefer a linear history of master:
It makes debugging very easy.
With branch merges, especially when the branch lines cross, or the merge is an octopus merge, the complexity of the code necessitating inspection to find the root cause of a bug straight-up explodes. Meanwhile with a linear history it's not only easy, but automatable to find a commit that breaks a thing.
I do realize that you may not have had the displeasure yet to be in the situation to learn these things. Please feel free to consider yourself fortunate, but please also do try to understand that the things i just wrote are in fact simple observation of realities.
Your condescension is only hurting yourself.
I've seen GitHub take five seconds to render a 100K line diff. In my experience all of the other tools I've used, including some of the ones listed, can take longer to render individual file sections of such a diff. It's fast enough.
Comments are sent as they are written; you cannot "draft" comments.
I'm a bit puzzled as to why you would need to draft comments inside the PR interface, especially in light of the fact that they can be edited.
Cannot compare differences between patch sets.
You most certainly can. Just use branch/revision compare.
To create a patch one must fork the repository publicly (weird and unnecessary).
Also immaterial.
Accepting a patch creates a "merge commit" (ugly repo history).
This comes closest to being a legitimate complaint. Because GitHub emphasizes recognition of contributors, it doesn't let you rewrite the commits in the PR as you merge them with the merge button, but there are multiple ways to merge on the command line that avoid the merge commit and play nice with the PR.
In general, pull request culture is not about code review.
WTF?
Sounds like a strong case of NIH.
This scenario happens often: I read through a change, making comments as I go. Then I reach some part of the change and realise "Oh, that explains why they did that in that other file!" So I go back and delete or alter my comments.
In Gerrit or Rietveld, the reviewee never sees those earlier comments.
On GitHub, the reviewee has already received the comment notifications and started responding before I have a chance to make the changes. The reviewee wastes time responding to questions to which I already know the answer. It's clunky, inefficient, and unnecessary.
It seems like you haven't used a tool like Gerrit or Rietveld. You should check them out.
I'm shocked at how bad Githubs PR review UI is given how much funding they have had for so many years. Even abandoned side projects like Rietveld have vastly better review UIs and workflows for larger patch sets.
Everyone is happy.
I think GitHub and to a lesser extent Phabricator have enormous UI/UX upsides over Gerrit and Rietveld, which perpetually look like internal tools that never underwent proper UX review. What's more important is that GitHub has done so much for open source software and has achieved such critical mass that a decision to not use it now starts to also shut you off from a population of developers for whom the activation energy is too high.
Although it would be nice to have a 'Send All Comments' button at the bottom of the commit page so you didn't have to click through them one by one.
If that is available for general Java code (i.e. uses JNI) and not just for Android, that could be really huge for Go. Writing performance-sensitive low-level code in Java is still fairly painful, wheras Go still isn't great for writing big programs. I can imagine (for example) Hadoop, Lucene/Elasticsearch and PrestoDB all using this.
Go is GC'd just like JVM. The only possible benefit -- even if Go catches up at runtime -- is the compact form of memory objects in Go vs Java object. But then again, if you are writing such systems (in either language) you are very likely to spend quite a lot of time in 'unsafe' land.
I don't think that's necessarily true. Go does a much better job than Java at letting you manage your allocations and re-use memory. You can write tight, performance-critical code in Go without resorting to 'unsafe'; it just requires care, as it does in any language.
Don't get me wrong, I like Go, but in my (and others I work with) experience, it's not the right choice for performance-critical systems.
(I considered stack-allocated structs in Go, but honestly that doesn't strike me as a particularly major thing; it may be slightly more terse, but fundamentally the same behavior.)
All this can be done with JNI, but JNI is so un-fun that I can see Go making big inroads here.
If you want to use an abstraction around ByteBuffers that feels like value types take a look at the javalution structs.
As a counter to your argument, C# has had value types for quite a while and has not achieved Java levels of performance, so those in and of themselves aren't enough. Mostly thats because if you are doing any allocation in fast code you are doing it wrong regardless of language. Even in C object pools and arena allocation are standard for performance critical work. The gap between Java and C (or really C++) right now is almost entirely around control of the memory model, not allocation (that said, I'd love the JVM to have value types and am glad that go started with them).
If anything will allow go to achieve better performance than Java its that it will be able to incorporate the lessons learned from Java without the support burden. I do think the constrained nature of go will give it a very good chance at impressive performance.
Say a variable value is set through a command line option to be a certain value. Compiled native code has to assume the value to be dynamic, but a JIT can optimize it away, effectively hardcoding it for that particular invocation. Same applies to more complicated type of software. Some configuration and invocation parameters tend to be effectively static during that particular invocation. JITs can capitalize on this fact.
JITs have also better chance to adapt to exact hardware it's running on. Compiled code is forced to make one or a limited number of assumptions of available CPU hardware configuration.
In the end, both options are running compiled native code. JIT just does it a bit before running.
Of course current reality is the opposite, but the key word here is potential.
But to each their own -- I'm curious what alternative system (if any) of accepting patches they have. If it's emailed git patches on a listserv, then I would definitely find it a barrier to submitting patches, myself, compared to github PR's.
I think in general, github PR's have proven succesful at soliciting code contributions from a wider field, which seems to be the goal of their UI (over command line git itself). Of course, this can seem a downside too, as committers have to spend time dealing with those submissions.
This is not true. There are many projects on GitHub which do extensive code reviews on pull requests. It may not be as nice as Gerrit for the type of project like Go (where you often have many iterations or the diffs are large). But for many other projects the UI that GitHub provides is sufficient (and arguably more efficient than Gerrit).
GitHub is painful for non-trivial reviews. Biggest WTFs:
- No comment threading (or at least collapsing). On a PR with 100 comments[1] it is unlikely that those revisiting the thread need to see (and download, and render...) the first bazillion comments.
- Source "annotations" are lost after a force-push (why not keep around a read-only view of old comments? We have lost some valuable discussions on GH pull requests)
Yes, we try to keep PRs small. But they also need to be meaningful, and sometimes they require (many) more reworks than expected.
That may very well be the case. But note how you said for non-tivial reviews, whereas in the presentation about go they said in general (see the line I quoted in my original comment). And argue that the vast majority of pull requests on GitHub are simple ones which don't need much discussion, so in general the GitHub UI works just fine. I don't have any hard numbers to back up my claim.
Right. And what you say validates my exact point: "pull request culture is not about code review." If all you want to do is cast your eye over it and click "merge", it works great. That's not how we work, though.
Yes, that is incredibly annoying. I discovered that if you add your comments in the "Files changed" tab (which shows the diff of the entire pull request) instead of the "Commits" tab (which shows the diff commit-by-commit), then the comments aren't lost when you force-push.
Just FYI, might make life a bit easier if you're stuck with Github.
In general, it's poor form to send massive commits anyway. Those poor reviewers!
Go binary size is a non-issue for most software. The java-rewrite I mentioned above went from a 80MB or so binary, to a 8MB executable. That said, there's been a few occasions when I've really wanted to use go for an embedded project, but couldn't due to it's size.
I read somewhere, someone said of go, "you'll come for the concurrency, but you'll stay for the interfaces. This is very true for me.
Generics. Go's red herring. Sure, there's been a handful of occasions where generics would have saved me some boiler-plate, but it's not been a pain point for me.
Tooling, from fmt, vet, to unit testing are all first rate. However, I wish there was a better debugger option for go. I know that gdb works with go (and with a great deal of difficulty if you develop with OSX) but I'm probably not alone when I say I really dislike GDB.
Overall, I've found the community to be friendly both online and in person.
As an aside, I've noticed much of the recent vitriol towards Go seems to come from the Rust crowd which I think is too bad. I enjoy both. Languages are not a zero-sum game. Who knows, the hate means Go has finally arrived.
I can't however find any instructions how to download and install them. Anyone able to help me?
go get golang.org/x/tools/cmd/callgraph
Or similar for any of these commands: http://godoc.org/golang.org/x/tools/cmdThe idea is to expand/collapse files, store progress of the review and collapse status of the files in local storage of the browser, so you can stop and resume at any time (I also have in mind serializing this stuff into a hash in the URL so you can forward it to the other machine for instance, and recreate the progress there).
I work on it every now and then and have a number of items in the backlog. If someone is interested to contribute I'll be happy to accept pull requests (sic!) :)
A lot of people seem to here insist that this is somewhat even remotely true. This is not. Look through Docker's pull requests on Github, look at their CI hooks.
Not sure why this is "insane."
Git is powerful because it was written with the ability to merge trees. The cherry pick workflow is throwing all of that in the trash. Why not use SVN at that point?
Because of cherry picking in Gerrit, dependent patches are a nightmare to maintain. Say patch c depends on b, which depends on a. Now say that patch c requires a change that merged into master. Because you can't merge into your development branch, you have to rebase c AND b AND a. This really pissed of the owners of b and a because it shows up as a new changset and wipes out votes. God forbid you depend on two different patches that each have separate dependencies.
You can use the merge commit to add the review information if you want. Then you don't have to molest the code change commit.
Our general workflow for the Go project is to review single commits, and sometimes do major new work in feature branches. When we submit a single change we cherry-pick. When we merge trees, we create a merge commit.
We don't write commits that depend on other pending work. That's overly complicated (IMO) even if you always use merge commits.
* See my mouse pointer
* Right-click and bring up the right-click menu
* Click on the link in the second slide
* Drag to select text
Chromium 40 on Linux
I think it's very fair to demand from a contributor to sync and build the entire app before they're allowed to submit a patch.
Interestingly, I note the Go team says it's "unnecessary" but doesn't provide their alternative.
Gerrit is the alternative used, and contributors have a full local clone of the git repo, with their commit, and that's private on their machine until they push it to Gerrit for review.
No-one said that that point alone is worth discarding the whole approach. You're nitpicking a single bullet point from around a half dozen points that stacked up.
Still producing 1.3M hello world executables.
I wonder if rewriting the linker from C to Go will be primarily rewriting, or maybe they will start fixing it somehow.
The linkers in the gc tool chain (5l, 6l, and 8l) do static linking. All Go binaries therefore include the Go run-time, along with the run-time type information necessary to support dynamic type checks, reflection, and even panic-time stack traces.
A simple C "hello, world" program compiled and linked statically using gcc on Linux is around 750 kB, including an implementation of printf. An equivalent Go program using fmt.Printf is around 1.9 MB, but that includes more powerful run-time support and type information.
diet gcc -o hello hello.c; strip hello
2280 bytes on my system.
There are reasons why using glibc results in executables so big, and why it is tolerated (kind of). Those reasons hardly apply to a new language being actively developed. Yet said language produces executables almost twice the size.
"Run-time support and type information", why is it linked into a an executable that never allocates memory and does no introspection of any kind?
fmt.Print does use reflection.
Besides, bickering over the size of hello world is pretty pointless; better to compare the size of programs that actually do something.
We do recognise that Go binaries can and should be smaller, but probably not as small as you might hope.
Statically. Care to check "ldd hello" of your binary?
1.3 megabytes. That's like $0.00004 USD worth of hard drive space.
Does the go team think we are all rich or something?
The code that actually executes is not bloated. It's not the most efficient code in the world, because the compilers don't have an optimizer as advanced as gcc's, but it's not unreasonably large.
Anyway it can be improved, but to me there are far more important things to be improved about Go than the binary size of small programs.
% du -k eval/eval
2040 eval/eval
% strip eval/eval
% du -k eval/eval
1864 eval/eval
Don't just assume. Measure.It's a tradeoff, and worth it in my opinion.
To build gcc, you need a C compiler. To build Go, you need a Go compiler. To compile anything you need to start with some kind of compiler.
What happens if this catches on, and PyPy replaces CPython, and other languages do the same?
Hassles for those who prefer to install from source, and potentially a lot of duplication of effort writing compiler backends in every language.
I don't understand your comment, because we already live in your nightmare scenario: http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29#L...
In practice, it isn't a big deal. When was the last time you worried about the language your compiler was written in?
> potentially a lot of duplication of effort writing compiler backends in every language.
That's also the state of things for every compiler that doesn't use LLVM or compiles to another language.
Just because you can do the same thing in language X, doesn't make language Y obsolete.
Advantage of Go, for me, is less verbose code (implicit interfaces for the win) and a fantastic, stable and huge standard library. I also like the strict compiler, and that the language has a GC by default, makes certain things easier, and for most tasks I don't need the predictability that you get with manual memory management.
For my part, I like Go because it offers a great, if nascent, alternative to PHP. That's the gist of it, anyway.