Does anyone know what is the largest codebase in Go? Free software or proprietary. I am wondering how large Go codebases have grown.
评论:
amit_kumar_gupta:
adonovan76:Diego backend (container scheduler) for Cloud Foundry:
$ cd ~/workspace/diego-release/src/github.com $ cd for x in cloudfoundry/ cloudfoundry-incubator/ onsi/ pivotal-golang/ tedsuo/ vito/; do \ (cd $x; find . -name '*.go' | grep -v vendor | grep -v Godeps | xargs wc -l); \ done | grep total | rev | cut -f2 -d' ' | rev | paste -s -d+ - | bc 276254
This also includes tests, testing frameworks, utility packages shared outside the project, and chunks of other projects within the Cloud Foundry ecosystem which Diego interacts (e.g. client libraries for which Diego is one of the primary consumers).
thewhitetulip:Not surprisingly, Google has a lot of Go code. I can't give out precise data, but there are a lot of executables whose dependencies exceed a million lines of Go. Indeed, I found several single Go packages in excess of 200,000 LoC, all generated of course: some were protocol buffers, one was a test, another was some kind of framework. Files like this are a good test that your tools use only linear or n log n algorithms.
If you give people tools that scale, they will do crazy things. As always, software engineering operates at the margins of "what can I get away with?".
suryon:I think the mysql backend for Go would also qualify, along with kubernetes/docker
kjk:It's probably some component in one of the Chinese megacorps out there. We can't be sure unless somebody qualified comments on that.
kavehmz:I'm not claiming docker is the largest, but it is large.
find . -name "*.go" | xargs wc -l
returns 397.119 lines with dependencies
find . -name "*.go" | grep -v vendor | xargs wc -l
returns 156.489 lines without dependencies
dgryski:Thanks,
You are right. docker and cockroach are both large. I was wondering if any project, commercial or free has reached higher magnitudes of SLOC.
bmatsuo:Canonical's Juju ( https://github.com/juju/juju ) is also huge.
The main juju repository, not counting dependencies:
<dgryski@kamek[juju] \ʕ◔ϖ◔ʔ/ > find . -name '*.go' |xargs wc -l |grep total 558907 total
howeman:Juju and gogs are currently being used as benchmarks for compilation time by the Go team. There is an active thread the golang-dev mailing list about it.
gngeorgiev:Interesting. Running the same
find . -name "*.go" | xargs wc -l
on gonum is 146,781 (there's no vendoring).
About 15,000 lines in the cgo BLAS and LAPACK wrappers, but otherwise pure go (30,000 of which is the partial Go lapack implementation).
How about kubernetes?
