-
Notifications
You must be signed in to change notification settings - Fork 1k
Create a list of build tags with known special meanings #463
Comments
I'll aim to keep the list in the OP up-to-date with suggestions other folks make in comments. |
One of the googlers with access to the full github bigquery corpus should be able to give you all build tags used anywhere, plus counts. @spf13? |
@zellyn that seems like a great place to start 😄 |
I had some free quota left, ran some queries against the github corpus, extracted all the lines looking like "// +build", split the line at blanks, grouped and counted. This is the result: https://docs.google.com/spreadsheets/d/1aImkrXmG1asZ7IgaJxe6HpaEPI8vjUU6Xd1KX-JomFU/edit?usp=sharing |
@mem that's awesome, thank you! OK so, filtering out the os, arch, and go version tags, here's a sampling of a few that show up high on the list:
I'm not sure exactly what I want to do with these yet, but I'm putting them in as a comment here just to record the bit of musing I've done already. (Obligatory note - this is frequency of appearance of these tags, but information about how frequently these packages are imported is not incorporated. That is, naturally, a relevant metric for our purposes.) |
While the course for #291 isn't yet decided, it seems quite likely that we're going to need a list of the build tags (not OS/Arch) that have a generally well-understood public definition. I think the canonical example of this would either be
appengine
orignore
; however, it's also worth raising something like adebug
tag, that (AFAIK) doesn't have widespread adoption, but which might be useful to give a definition to.Please provide a build tag and a brief description of its use, similar to the following:
appengine
- the source file should be included when compiling a binary to be run on Google's App Engine.ignore
- designates that the file should be ignored by the compiler unless explicitly instructed otherwise. Its use is purely conventional, acting more as a signal to humans, as any build tag would have the same effect.The text was updated successfully, but these errors were encountered: