golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.25k stars 17.7k forks source link

proposal: decide policy for sub-repositories #17244

Open adg opened 8 years ago

adg commented 8 years ago

[this is not a proposal yet, just a problem statement]

There are several proposals to add new packages to the x/foo "sub-repositories". (See: #16353, #13432, #12332, #16257, #15985, #15406, and more.) The proposals are all different, but they circle around the same issue: what should and should not be in a sub-repository.

Currently, the sub-repositories contain x different things:

  1. Packages and tools that are part of a loose set of Go tools (godoc, goimports, benchcmp, x/debug, etc)
  2. Packages and tools that support the Go web services (godoc, present, x/playground, x/tour, etc)
  3. Tools that support Go project development (x/build, x/benchmarks, x/review, etc).
  4. Packages that augment the standard library (x/text, x/image, x/crypto, x/sys, etc).
  5. Other projects worked on by Go team members at Google (x/exp, x/mobile, etc).

To me, it's clear that 1-2 belong in the sub-repositories, and should be an official part of the Go project.

For 4-5, this code only lives in the sub-repositories either for historical reasons or mere convenience. The Go contributors are accustomed to the process (tools and reviews) of writing code in that style, so the sub-repos were just the obvious place to go.

(3 is a fringe case, as the tools could be worked on elsewhere, but the people working on them work on Go full time and work on that code solely to support the project, so I am inclined to ignore this code for the purposes of this issue.)

As the project grows, it attracts people who want to contribute new packages to these sub-repositories (see the issues cited at the beginning of this issue). The reasons for inclusion include:

  1. To provide an official package for doing X.
  2. To provide a supported package for doing X.
  3. To contribute to the Go project.
  4. To use the project's development processes (gerrit, etc).
  5. To have their code reviewed by other Go contributors and to benefit from their expertise.
  6. To use the same consistent license (with CLA) that the project uses.
  7. To provide a single package for a single purpose, and avoid duplicate effort.
  8. To provide an official package for interoperating about (but not necessarily doing) X.
  9. To act as a dependency for something else under x/.

[What are the other reasons? I'd like to enumerate them all here.]


My opinion begins here:

None of the above reasons are good arguments to add new packages to the sub-repositories. Taking each in turn:

  1. The "official" packages, such as they are, are generally of high quality because a small group of dedicated contributors have invested constant energy in them. But there are other high quality packages elsewhere in the Go ecosystem (many of higher quality than some of those in the sub-repos), it's just harder for people to find them and they don't have "prestigious" import paths. Rather than moving more stuff into the Go project, I'd think we should address this issue by making it easier to find and recognize high quality packages. (One way to do this is to improve godoc.org, but there are many other ways.)
  2. Putting something in the sub-repositories does not imply support. People are not more or less inclined to work on a package just because it's in a sub-repository. The current set of Go contributors are stretched pretty thin as it is. I think that by moving more stuff into the sub-repositories we set expectations of support where there is none. That's bad for our users.
  3. Moving more code into the project just for the sake of contributing is not a net win. There's plenty of work to be done on the code that is already part of the project (and the many, many open issues).
  4. If people want to use our processes, I think that a better approach is to find a way to use those processes outside of the project. That's a solution that scales much better.

[see discussion below for other points]

In general, I'd like to make the Go project smaller rather than bigger. (In the same sense that we would remove stuff from the standard library, if we could.)

As I said, this is just my opinion and perspective. I have created this issue to gather feedback from other [potential] contributors.

Personal opinion ends.


We need to set a policy for what belongs in the sub-repositories, and in doing so more clearly define the boundaries of the Go project.

bradfitz commented 8 years ago

Nice summary. Thanks for writing this up. I agree with your opinion too.

quentinmit commented 8 years ago

I have a very different opinion. I think there is significant value in having a set of "semi-blessed" packages, and random packages that can be found (more or less easily) on godoc.org do not meet that bar. I think one of the big reasons that languages like Python have taken off is that they are "batteries included"; their ~standard libraries include a wide swath of functionality, such that the average program can be written without adding any third-party libraries. If anything, I think more should be included than we have now.

I think the x repos today have already improved on the "batteries included" model, by making it clear that "these are good packages, but they're not great packages, and we don't make as many promises about them". I would actually like to see a future where we include a snapshot of the x repos in release tarballs, attaching the same disclaimer.

I see your proposal as directly advocating for fewer packages in x. I disagree that that is a worthy goal.

That said, I don't think that #2 and #3 necessarily have to live in the same place as #1 and #4. I would be happy to separate the "random part of the Go project" repos from the "semi-blessed packages" repos.

ianlancetaylor commented 8 years ago

@quentinmit I think we absolutely do need a way to tell people "these are good packages" and I think that is what @adg was alluding to with his point 4 above. The question is what that mechanism should be.

The disadvantage I see with the current golang.org/x system is that these packages are effectively owned by the core Go developers. That isn't scalable or even desirable. If we can solve that problem within the golang.org/x name space, then, fine. But how? And who controls the golang.org/x name space?

I think it would be better to have a scalable mechanism for identifying and maintaining good packages, and I don't see why that should be, or even can be, associated with golang.org/x.

griesemer commented 8 years ago

Great summary of the issue. What @bradfitz said.

cespare commented 8 years ago

As a consumer of many third-party packages, I think I agree with @quentinmit (or at least with @ianlancetaylor). If I need a package for $task and there is an /x package for $task, I've generally found that while it might be incomplete, it's usually of high quality (the scope and style matches the standard library; the test coverage is quite good; the documentation is thorough and concise). If I have to go browsing through $task packages on godoc.org and pick the best one, it's often of such poor quality that I either do an extensive cleanup/refactoring/testing/docs pass before bringing it into my repo or else I choose to write my own package instead.

@adg said:

I'd think we should address this issue by making it easier to find and recognize high quality packages. (One way to do this is to improve godoc.org, but there are many other ways.)

but I'm skeptical that a process outside the Go team will produce a quality bar that is usefully high for me.

I'd like to see [high-quality package identification mechanism] exist and be proven to work well before any trimming down of /x.

adg commented 8 years ago

If I have to go browsing through $task packages on godoc.org and pick the best one, it's often of such poor quality that I either do an extensive cleanup/refactoring/testing/docs pass before bringing it into my repo or else I choose to write my own package instead.

I'm advocating that we fix this problem.

I'm skeptical that a process outside the Go team will produce a quality bar that is usefully high for me.

The "Go team," such as it is, is only a handful of people, and they do not have the cycles to review any new packages. If you want more packages in x/ then they must be written, reviewed, and maintained by other people. That being the case, there's no reason why they should be in x/. They're not going to be any better or worse for it.

adg commented 8 years ago

@quentinmit said:

I think one of the big reasons that languages like Python have taken off is that they are "batteries included"; their ~standard libraries include a wide swath of functionality, such that the average program can be written without adding any third-party libraries. If anything, I think more should be included than we have now.

Both Python and Go have suffered from having large standard libraries, too. In some cases, the standard libraries have become out of date and superseded by other packages in the ecosystem (or in the case of Python's urllib, by urllib2 in the same standard library!). Then we're left with prominent packages that are not suitable for common use. That's a net loss for our users.

If I understand your sentiment, you're advocating for including (a lot) more packages in the x/ repositories, as an extension to the standard library. Producing our current standard library (not the sub-repositories) was a massive concerted effort over many years, by people who are mostly domain experts in the functionality of those packages. I have two main questions:

  1. Who is going to do this work? How do you propose we maintain the same quality level across many more packages that our well outside our areas of expertise?
  2. Why does it need to go in x/? Why should we be the arbiters of which packages are prominent? Aren't we short-changing the ecosystem by neglecting third-party package support?
rakyll commented 8 years ago

From my perspective, being able to work under an x allows me to reach out to the go approvers and this is what I care when I am designing ecosystem-wide core libraries for a niche topic. I don't think it is possible once the experimentation is not considered a part of the Go project.

adg commented 8 years ago

To expand a little on my goals here: by defining what does or does not belong in x/, I hope to remove bureaucracy.

Today, if someone wants to put something in /x/exp they need to ask permission. People shouldn't have to ask for permission to experiment; that has a chilling effect on experimentation.

Similarly, if something is to be included in an /x sub-repo, they need to ask permission. Why should they? Shouldn't they be able to put their high quality code in a repo somewhere else, and have it be regarded just as highly as anything in /x? Code should be judged on its own merits, not by its location.

quentinmit commented 8 years ago

I'm not sure I think I would agree with "a lot", but yeah, I think x/ should perhaps be twice the number of packages it is now.

  1. Who is going to do this work? How do you propose we maintain the same quality level across many more packages that our well outside our areas of expertise?

Go project members will do the work, just as they do today. The people who are proposing these new packages are working in their area of expertise. But I also don't think it's "outside" our areas of expertise; our area of expertise is designing idiomatic Go APIs, and that can be equally applied to something like video compression as it can to XML or JSON marshalling.

  1. Why does it need to go in x/? Why should we be the arbiters of which packages are prominent? Aren't we short-changing the ecosystem by neglecting third-party package support?

That's a hard question. For me, I have a soft definition of "low-level" support packages that I think deserve to be centralized. To use an example I am personally familiar with, I think video and audio formats should be in x/video or x/media, ala the current image support we have in x/image. I think a streaming server built on top of those libraries, or a GIMP clone, does not belong in x/ because that is not something foundational.

I do think making high quality third-party packages easier to find solves a large part of this problem, but we are not there yet. And even if we do make them easy to find, packages that are separate from Go still have more adoption problems we can't possibly solve: for example, they may be under various licenses, and it may be cumbersome to import into a commercial codebase. That may be appropriate for a library to interface with a Siemens PLC from the 1990s, but I don't think it's appropriate for OpenGL.

adg commented 8 years ago

Go project members will do the work, just as they do today.

The reality is that there are hundreds of open CLs (some pending for more than a year) and thousands of open issues. The work is not getting done. The present structure does not scale. To encourage more development that we cannot support is irresponsible and unfair to the contributors.

I do think making high quality third-party packages easier to find solves a large part of this problem, but we are not there yet.

My argument is that we will never get there if we use the sub-repos as a crutch.

adg commented 8 years ago

From my perspective, being able to work under an x allows me to reach out to the go approvers and this is what I care when I am designing ecosystem-wide core libraries for a niche topic. I don't think it is possible once the experimentation is not considered a part of the Go project.

I think external packages will see more high quality reviews if they are more prominent. Everyone in the ecosystem has an interest in improving the most useful (and used) packages.

rakyll commented 8 years ago

has an interest in improving the most useful packages

You are mistaking your experience on the high-level community-driven packages with fundamental packages. For example, no one in the community will find debating a low-level audio API on a personal project useful or productive given there is no arbiter or a person who has an authoritative final say. I support structure, your proposal suggests distributed chaos and blessing of the popular because it is more successful.

The role of the Go project should be to review and bless fundamental things, especially the APIs. And that's where the proposal system can be sufficient enough. If the Go project doesn't have bandwidth to maintain the proposed package, the proposal should be frozen for bandwidth reasons. The ideas can keep been communicated on the proposal even though multiple implementations can live in people's personal projects.

The current state of the x packages is not what I support. But, throwing people out of the project because the core people doesn't have bandwidth is not a solution. No one ever desires a language ecosystem dominated by broken third-party solutions like Node's or Python's, but languages evolve there. I worry that it is happening for Go so soon.

rakyll commented 8 years ago

Also people who are +1ing this proposal who has all the privilege to merge their stuff to Go should better be quieter on this one. This proposal is not going to affect your daily interaction with the project. It is about the contributors who are spending their weekends to contribute to the various parts of the project. We should ensure quality is preserved without discouragement. I would like to hear more from the actual part-time contributors and I am devastated by "+1, ship it" type one-line responses.

jimmyfrasche commented 8 years ago

Never contributed, but use packages in /x. I'd rather it be well maintained than well stocked. Frozen packages in the stdlib are annoying enough.

adg commented 8 years ago

no one in the community will find debating a low-level audio API on a personal project useful or productive given there is no arbiter or a person who has an authoritative final say.

I don't think that's true. For example, @peterbourgon has had great success with his go-kit project, attracting people to do high level design work. I could be wrong, but I don't think you'll see much difference between participation at "github.com/goaudio" or "golang.org/x/audio". I personally would be just as interested either way.

The role of the Go project should be to review and bless fundamental things, especially the APIs. And that's where the proposal system can be sufficient enough.

To repeat what I think you said: the equivalent of package io for audio or video could live in a sub-repository of the Go project. Those are small but require careful review and pride of place. The packages that use those interfaces must not necessarily live in the sub-repos.

I agree with this completely.

I would like to hear more from the actual part-time contributors and I am devastated by "+1, ship it" type one-line responses.

I am sensitive to your concerns about "throwing people out of the project". That's certainly a non-goal, here. But, for the record, nobody has said "ship it" because there is nothing to ship. Brad and Robert have agreed with what I said, but nobody has proposed any kind of policy yet.

I too would like to hear from more contributors (or potential contributors), particularly to expand upon the list of reasons that code should live in /x, and where people think the line should be drawn.

rakyll commented 8 years ago

go-kit project

I don't think go-kit a foundational package. It is a very high-level library to do certain things in a certain way and is very successful in its domain. A foundational package is a core network protocol implementation, a core abstract (io package abstractions), an open standard implementation, an industry-wide standard, etc.

Those are small but require careful review and pride of place.

I totally agree with that.

I think one of the Go project's goals should be prioritization of requirements from the language and collaborating with experts to review designs. This proposal should address that aspect before being finalized.

Brad and Robert have agreed with what I said, but nobody has proposed any kind of policy yet.

Well, ok. I am just a bit worried when influential people are on the threads without arguments. Because it influences which side people lean towards in the end.

adg commented 8 years ago

I added a 5th bullet to the list of reasons in the first post.

ianlancetaylor commented 8 years ago

@rakyll I'm sorry, I don't understand the reference to throwing people out of the project. I hope that nobody is suggesting that.

I agree that we have a problem. I've been talking to people about this problem for years. I don't have a solution. I'm not aware of any language that has a good solution. Other languages have varying solutions of varying quality. None seem clearly better than what Go is doing, which is basically godoc.org.

I think that golang.org/x is not a solution. I think it's basically exclusionary. It privileges the packages that the core Go team happens to care about, and relegates the rest to limbo. That doesn't scale.

But letting all packages into golang.org/x also doesn't work. The end result of that is basically what we have today--an undifferentiated list of packages of varying and unknown quality, but with different package names.

What we need is some way to identify quality packages. That is the problem. It seems to me that golang.org/x is not the solution to that problem.

But I could of course be wrong. Perhaps golang.org/x is the solution. But not as it exists today; it has to be different. So how do we change it to make it work?

danp commented 8 years ago

Thinking of #16218, could CLA clarity as a reason for inclusion in golang.org/x use a callout here? Perhaps that falls under reasons 4-5 already.

griesemer commented 8 years ago

@rakyll Sorry for simply repeating @bradfitz 's and thus @adg 's words. I don't have a solution either, but (repeating what's been said before) as the sub-repos are used now, they imply some form of "approval" by the Go team, yet they have essentially historically grown. In fact, several packages from the std/lib landed in sub-repos (for lack of a better place) when we cleaned up the std repo a few years back. And I have "stuff" in there (x/tools) which perhaps should be elsewhere.

I'd love if our sub-repos were blessed somehow and of high quality and maybe even maintained by us (if we could). But it doesn't scale and it's not necessarily even good for the community.

I agree w/ @ianlancetaylor that some mechanism to qualify and identify high-quality packages would be a much better solution. The question is how to do that. The Go team has neither the manpower nor the expertise (we don't have domain experts in all areas) to do that at scale.

Perhaps part of the solution is to bless a location where such high-quality packages land in the first place, and then come up with a process to rate them.

nigeltao commented 8 years ago

Also people who are +1ing this proposal who has all the privilege to merge their stuff to Go should better be quieter on this one. This proposal is not going to affect your daily interaction with the project.

I disagree. I spent a significant amount of my time, over a number of months, on design and code reviews for golang.org/x/mobile/audio (later moved to golang.org/x/mobile/exp/audio). This was time I wasn't spending, day to day, on my other work.

I spent my time this way because, as @cespare alluded to above, there is a community expectation that anything under golang.org/x is of high quality. I was also actively working on golang.org/x/mobile at the time, and a number of people have said that they'd like an audio or audio/visual or media Go package to have pluggable codecs the way the standard library's image and image/* packages works and, well, I designed and wrote those image packages.

You say that "being able to work under an x allows me to reach out to the go approvers" and sure, that's a benefit for you, but it is a cost for the Go approvers. If it's easier for everyone to demand @bradfitz's attention for anything potentially under golang.org/x/net, or @ianlancetaylor's attention for anything potentially under golang.org/x/sys, then that's less attention that they could spend on e.g. landing HTTP/2 support, or keeping gccgo up to date. It is not a free lunch, and as others have said above, it doesn't scale.

It's true that golang.org/x/exp/... (and similar paths like golang.org/x/mobile/exp/...) have lower quality and support expectations than the rest of golang.org/x, but my opinion is that the right response is to move those packages out of golang.org/x, rather than add more exp packages.

mpvl commented 8 years ago

I largely agree with Quentin here. In my experience, having a solid base of fundamental libraries is key to being productive in a language. Look at Java, Objective-C/Swift, .Net. All have comprehensive standard libraries.

adg's reasons for inclusion have a lot of positive sides too:

  1. (1): Stability: having an "official" package gives assurances it won't be replaced by a new "blessed" one willy nilly. Go's adoption started taking off after the 1.0 guarantees were given. Stability of fundamental packages matters as well. urllib2 debacles should be rare and are an acceptable collateral damage.
  2. (1): Efforts: having "official" packages guides efforts towards such packages, instead of across competing standards.
  3. (4, 5): Consistency: having some standard review process and inclusion process is more likely to lead to uniformity of API than a selection of best-of-bread sources. It is easier to enforce consistencies on third-party contributors if a "golang.org" stamp is to be given.
  4. (2): Support: The golang.org stamp could assure hosting, an initial blessing of API and providing standard policies. It does not have to mean active support from the Go team. This can come from the community.
  5. (3): Branding/Trust: The golang.org is a brand. For a newcomer considering Go, core functionality consisting of a list of blessed package will not nearly instill as much confidence as a list of official packages providing the same.
  6. (1): Availability: Ever had a high-quality package disappear on you? I have.
  7. Commercial: I think many businesses will not adopt Go if fundamental functionality only exists in the form of no-guarantee, blessed packages with inconsistent licenses, guarantees of API stability, etc.

I understand that the Go team does not have enough cycles. But in my opinion, a blessed package model doesn't scale for users and will hamper Go adoption.

The solution, I think, should come from scaling the subrepo approach, maybe by using a hybrid form. Here are some thoughts:

  1. There would be 3 groups of subrepos:
    • 2 and 3: Go-team (and contributors) internal infrastructure.
    • 1 and 4: semi-blessed/ official tools and packages, what roughly would be part of a standard release for other languages.
    • Experimental, including mobile, exp, but possibly also counterparts to x repos with experimental packages.
  2. The golang.org/x "official" repos would give some guarantee of having gone through a process and quality control, without necessarily having support of Go-team members.
  3. To limit the number of proposals, the kind of repos/packages that can make it in should be reasonably well-defined. A guide could be what other languages/frameworks provide.
  4. The Go team would still have a list of blessed repos. Blessed repos with fundamental functionality could make it official after some trial. This also gives more weight to blessed repos.
  5. Proposals to include something in golang.org/x should be more of the from "please include this existing repo" rather than "please implement this repo". A reply to a proposal could be suggestions to API changes or other tweaks.
  6. Short of that, an answer to a proposal could be, "Sure we suggest someone implements it in experimental and if certain criteria are met it will be included in official".
  7. Each repo has a group of maintainers and approvers which may be outside of the Go team .
  8. There could be some way to review Important API changes by a mixed Go and external team. (Note that, as Quentin suggested, there would not be many more packages in x).
  9. Different repos may have different SLAs, but are required to have one.
  10. Repos in x could have some automated enforcement like ensuring a stable API surface, code coverage, linter, perhaps, not losing performance on benchmarks, etc.
  11. golang.org/x repos could be required to adhere to a stricter style guide than one would usually impose as a requirement on "blessed" packages.

To have a good quality list of "blessed" packages will either be also a lot of work (verifying APIs of probably more packages than you would normally include in an x subrepo), or it will inherently mean it will be of lesser quality than an official list. If it is of the same quality, it still can never instill as much trust as confidence as an "official" list, unless we include "blessed" packages in an official release, which seems even more work to me. Even worse, never having had "official" subrepos is one thing, but giving them up is a clear signal of throwing in the towel. So to me, trying to reduce/spread the burden of maintaining golang.org, rather then shedding it, seems crucial.

rakyll commented 8 years ago

disagree. I spent a significant amount of my time, over a number of months, on design and code reviews for golang.org/x/mobile/audio.

The mobile package is planned and executed by this team as an experiment. The entire thing should have never been under /x. As this proposal calls out, there are a few packages under this category and should have been bootstrapped elsewhere, e.g. how bradfitz bootstrapped http2 outside of the tree.

sure, that's a benefit for you, but it is a cost for the Go approvers.

I thought this discussion already acknowledged the bandwidth issue. What @adg asks for is how others are affected by such a policy and it is very critical to understand what a proper solution to community-driven packages might look like.

I mentioned "being able to work under an x allows me to reach out to the go approvers", because it is a necessity. If people were able to escalate a couple of API sanity questions to a group of people they trust, they wouldn't care where they bootstrap or maintain their packages. This is an actual requirement, please don't dismiss it by repeating what we already know.

And that's not a benefit for me. It is a benefit for the language to allow different people collaborate on a medium and escalate things about API review.

adg mentions "/x" being prestigious but I disagree. In my unique experience, /x is a very invisible point. There is no true benefit someone is contributing a package to /x if they don't care about the quality or design feedback.

Before I finish, I want to say I really appreciate what @ianlancetaylor and @griesemer suggests. We may need a successor plan or strategy and think about the indicator of quality. The ideal location where these packages bootstrapped or maintained might not be /x, but organizing the distributed effort towards enhancing the Go library-space should be a critical project on its own.

bradfitz commented 8 years ago

Regarding the reachability of Go developers and comfort of using the typical Go tools for development, would it help if I finished up my @letsusegerrit bot so any repo on Github could use the Gerrit code review process?

rakyll commented 8 years ago

I think Gerrit might not be critical given Github PRs are becoming better. How people reach out to quality reviewers might be a more interesting problem. Would it be a reviewers mailing list? If so, how to communicate it is entirely voluntary work? Should it come from the Go project or driven by the community? I have some ideas but don't have any concrete proposals at this point.

zellyn commented 8 years ago

My (subjective) impression is that the burden of being responsive and reviewing code is burning out core team members. Is that true? If so, I think it's a significant factor for consideration.

adg commented 8 years ago

My (subjective) impression is that the burden of being responsive and reviewing code is burning out core team members. Is that true?

I can't speak for everyone, but it's true for me and I know it's true for others on the team.

bradfitz commented 8 years ago

@zellyn, yes. I'm starting to burn out. It's gotten exhausting the past year or two.

seh commented 8 years ago

@ianlancetaylor wrote:

I'm not aware of any language that has a good solution. Other languages have varying solutions of varying quality. None seem clearly better than what Go is doing, which is basically godoc.org.

For C++, the Boost project has served as a proving ground for libraries that might eventually make it into proposals for inclusion in the standard library. The libraries usually have to shrink (shedding features) and bend under the second phase of criticism from committee members. I've witnessed @davecheney preparing for this process with his pkg/errors library.

The downside of an external proving ground like Boost is that people start using the "outside" version of the library, which is a necessary part of vetting it, and may never be able to afford to port to the "standard" version that makes it in much later. The world winds up with two versions in use, even when the goal was to only have one.

dgryski commented 8 years ago

To scale kernel development, Linus named Trusted Lieutenants as guardians of different subsystems. @rakyll's idea for creating "Trusted Gophers" available for code review for external projects is an interesting one. However, it's hard to do code review without context. It's easy to comment on style and naming, but hard to discuss design without understanding the problem domain. Drive-by reviewers provide only superficial help here. Dealing with reviewing "yet another" web framework or whatever will also get tiring. I think this deserves more discussion, but possibly in a different forum that this issue.

rakyll commented 8 years ago

Dealing with reviewing "yet another" web framework or whatever will also get tiring.

For the record, this is for the foundational packages. Not for yet another web framework but for a COAP or a USB package for Go. I am not proposing to establish a general-purpose support group.

ericlagergren commented 8 years ago

It's easy to comment on style and naming, but hard to discuss design without understanding the problem domain.

Then it seems to reason the "Trusted Gophers" should each be responsible for only one portion of whatever the Go "subsystem" is defined as.

Gopher A who has a knack for math can review all the new math libraries.

Gopher B who prefers interfacing with USB drives can review the USB device code.

Gopher C who really loves pre-historic protocols can review the new Gopher and Finger code.

I agree with others in that when I need to do X, I usually turn first to the stdlib, then x/, then godoc and Google. While not everything in x/ is usable (to my liking), I've found a lot less "surprises" inside x/ than I have casually browsing godoc or Google. Great post, @adg.

StabbyCutyou commented 8 years ago

If the problem is burnout, then consider there is a hidden cost to the "trusted" approach. People need to be responsible to train, mentor, and guide newly "trusted" individuals into doing the right thing, at least to the existing standards, to the point where eventually they need no oversight. This will introduce some lag time initially as those who train the new folks will be pulling something of a double duty.

You might say that only folks who don't need oversight would be picked, but this is not realistically possible. The greatest engineer in the world still has ramp up moving into a new system or a new codebase.

Ultimately, I disagree with seeing Go get "smaller" as a result of these issues. I want to see Go get bigger. I want a standard library (even if it has different tiers of service or guarantees) that feels large and inclusive. Especially with Go, where the community ethos is always to do as much as possible with the stdlib before reaching out to a dependent library.

Solving the human cost issues and making it so these things aren't so taxing on the current team (whether that is a process change, the "trusted" approach, or some other solution) sound a lot more palatable in nature to me, someone who uses the language and wants to continue to see it grow, than the alternatives.

But i recognize that the reason why the core maintainers want it smaller is because it is likely exhausting to try and keep up with all of these changes / proposals / etc. But in my (likely uninformed) opinion, closing off or making it harder to put new things into the stdlib is a step backwards. The strongest part of Go is the community itself, and the community desperately wants to be involved in helping to shape the future of the language.

kardianos commented 8 years ago

@adg Additional reasons for code in the x repos:

I echo @griesemer

Perhaps part of the solution is to bless a location where such high-quality packages land in the first place, and then come up with a process to rate them.

Would the go team have the bandwidth to do high level API approval and package scope approval? Approval would have a certain scope, but then actual reviews and work would be community driven. If someone wanted to have a GUI widget library, a new package wouldn't get approved, rather they would be instructed to go talk to the ext/shiny contributors.

edit: but to be clear, I'm not directly advocating more packages go into an x like repo.

adg commented 8 years ago

@StabbyCutyou said:

But i recognize that the reason why the core maintainers want it smaller is because it is likely exhausting to try and keep up with all of these changes / proposals / etc.

Well, yeah. It's not just that we're exhausted, but also that we're falling behind, with no end in sight. Your proposed solution just creates more work for those people, therefore it is not a solution, as it will never happen.

The strongest part of Go is the community itself, and the community desperately wants to be involved in helping to shape the future of the language.

This isn't about the future of the language. It's about libraries. IMO if high quality libraries cannot thrive outside the project itself, then the language will have failed. How could any of today's major languages succeeded without high quality external libraries? We're not going to get there by gatekeeping.

adg commented 8 years ago

@kardianos thanks for those extra points. I've added them to the list. My opinion on them:

To use the same consistent license (with CLA) that the project uses.

I think we could solve this in a more scalable way by setting a community standard for code licensing. There could even be a little badge/icon with a gopher wearing a judge's wig.

To provide a single package for a single purpose, and avoid duplicate effort.

I'm concerned about what happens when better work is done elsewhere and then the package in /x atrophies. This already happened with websocket, where the package in /x/net is not the best implementation, but people use it because it's there. Efforts to replace it have stalled for years. IMO, this is more evidence that the centralized repo approach does not scale.

kardianos commented 8 years ago

@adg I agree with both of those responses. Thanks.

StabbyCutyou commented 8 years ago

@adg to be clear I didn't really propose any solution (unless you were referring to making Go "bigger", which I would agree is not a solution to anything, but rather an opinion) - in fact I tried to lay out why one of the proposals (the "trusted gopher" approach) would create some of the additional overhead you mention (at least, at the outset). Apologies if that was not clear enough.

W/r/t it not being about the language, but rather about libraries - I was responding particularly to your comment about shrinking go / removing things from the stdlib (if you were able).

I was definitely not stating that well maintained libraries can not exist outside of the core lib. I would imagine you'd be hard pressed to find anyone who has that opinion. On the contrary, one of the strengths of a community driven package is that it can grow and change at a pace that Go is unable to.

Go has a lot of really strong libraries that come out of the box - as a developer (and not also as a language maintainer like yourself, which is where I imagine our perspectives differ), the idea of seeing Go "shrink" in this capacity would be disappointing. It also feels somewhat at odds (in my opinion) with a community mantra of relying on the standard lib as much as possible before reaching outside of it for a dependency.

As I do not have any solutions or improvements to offer, but just opinions, I'll bow out of the discussion as I'm likely just a distraction. I appreciate your reply.

adg commented 8 years ago

@StabbyCutyou thanks for clarifying. It's hard to divine the context behind everyone's posts, and I'm sure I misinterpreted you. Sorry. 😦

Go has a lot of really strong libraries that come out of the box - as a developer the idea of seeing Go "shrink" in this capacity would be disappointing

When I talked about taking stuff out of the standard library I was referring to things like net/rpc which was an early experiment and is now clearly inadequate as a production rpc mechanism, having been superseded by several other rpc systems.

StabbyCutyou commented 8 years ago

Gotcha. That makes a lot of sense.

No worries on the misunderstandings! Appreciate all the work the go team does, I know it can't be easy.

On Sep 29, 2016 6:36 PM, "Andrew Gerrand" notifications@github.com wrote:

@StabbyCutyou https://github.com/StabbyCutyou thanks for clarifying. It's hard to divine the context behind everyone's posts, and I'm sure I misinterpreted you. Sorry. 😦

Go has a lot of really strong libraries that come out of the box - as a developer the idea of seeing Go "shrink" in this capacity would be disappointing

When I talked about taking stuff out of the standard library I was referring to things like net/rpc which was an early experiment and is now clearly inadequate as a production rpc mechanism, having been superseded by several other rpc systems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/golang/go/issues/17244#issuecomment-250611740, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdTKpKnYsZWcDEon8TQxSVQpQK5b7_4ks5qvD11gaJpZM4KHJNI .

jessfraz commented 8 years ago

Despite the many problems with how the Linux contributing process is setup, I do think one of the "Things That Works" is the concept of subsystems and maintainers of those subsystems. This would mean if mobile was considered a subsystem for go packages, it would have maintainers with expertise in that area. Maybe they wrote the package to begin with. Maybe they have contributed heavily after it was open-sourced. They would not be responsible for anything else (unless they had other expertise and were willing). Same goes for usb if that is deemed a subsystem. I agree this shouldn't be for "Yet Another Framework". It should really only be used for low-level core libraries. You could almost make the analogy that "Debian" is not a subsystem of Linux ;) it merely uses it :)

rakyll commented 8 years ago

On Thu, Sep 29, 2016 at 12:43 AM, Nigel Tao notifications@github.com wrote:

How people reach out to quality reviewers might be a more interesting problem. Would it be a reviewers mailing list? If so, how to communicate it is entirely voluntary work? Should it come from the Go project or driven by the community?

...

For the record, this is for the foundational packages. Not for yet another web framework but for a COAP or a USB package for Go. I am not proposing to establish a general-purpose support group.

If we're talking only about foundational packages (and does that mean that we've decided that the policy on x/ sub-repos is "foundational only"?), doesn't the golang-dev mailing list already fulfil this role? It seems like https://groups.google.com/d/msg/golang-dev/ofaaIJPWRKg/7jX3Qf5hBQAJ is exactly the sort of conversation that you're looking for.

I am not sure if we can use this channel if this proposal is accepted. If yes, I wouldn't care about not being able to communicate to the others. golang-dev@ is the perfect solution to reach out.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/golang/go/issues/17244#issuecomment-250394075, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGnXCrAvvp1Eo8HukBUKamdR_yV0KIJks5qu2wSgaJpZM4KHJNI .

adg commented 8 years ago

if this proposal is accepted.

What proposal? I want to remind everyone that nothing has actually been proposed.

rakyll commented 8 years ago

What proposal?

The current proposal (https://github.com/golang/go/issues/17244). golang-dev will not be a place to create threads about new /x-like library ideas because it will be scoped to the Go project's current development.

mpvl commented 8 years ago

@adg:

I'm concerned about what happens when better work is done elsewhere and then the package in /x atrophies. This already happened with websocket, where the package in /x/net is not the best implementation, but people use it because it's there. Efforts to replace it have stalled for years. IMO, this is more evidence that the centralized repo approach does not scale.

Why is this so bad? It just shows that it (unsurprisingly) would be possible to have an outside team have ownership of an x/text library and deliver quality.

This websocket package situation can also be used to show the importance of a central repo. I've used websockets in the past and picked the x/text version even though I was aware of a probably better alternative, because the x/text was good enough and it was not worth the hassle to figure out how the other project was maintained. And I didn't even care about licenses. The main point of having a centralized repository with foundational functionality is speed of development, convenience, and consistency, not that they are necessarily the best. Give teams outside the Go team a chance to own x/text packages (ala Linux) and you can have the best of both worlds.

dmitshur commented 8 years ago

I've read this thread earlier, and there are 2 comments I want to leave. This first thought is kinda hard to express, I hope I get it right...

It is my personal opinion, as an observer who tries to follow the work done in the Go project, that the Go team should have the opportunity to limit the scope of maintenance and code reviews to the core projects they're working on and anything they're voluntarily willing to take on... I think it'd be really unfortunate if they're unintentionally made to increase that scope by the community trying to add new things to /x packages (which require code review).

There's a clear conflict - it's great to have canonical, high quality libraries for more and more low-level things (like websocket, usb, etc.), but it's also great to have the core Go team with a narrower scope, high quality work and ability to spend time where it matters more (core parts of Go).

They've done us a huge favor of open sourcing this project, which I really appreciate, but I think we as a community need to be very careful with the additional responsibility that gives us (that we can increase scope for /x, and the Go team has to deal with it).

I'm very fortunate in my open source work that I can choose to work on and support exactly the things I care about, and not take on things I don't. It's an absolutely amazing feeling. I really want more people to be able to experience it, rather than feelings of burnout and pressure from taking on too much. I will definitely support whatever proposal that lets the Go team reduce scope to being responsible for fewer extraneous things (that they don't take on their own initiative).

I think a nice litmus test for this is... if someone were to report an issue because they found a bug, do you:

  1. feel happy and excited because they've helped uncover an issue in code (that you didn't know about) that you care a lot about, which you can now fix easily, or,
  2. feel overwhelmed because it's yet another thing to deal with in a project you don't have enough time/priority for.

This may be naive and optimistic, but I wish we get to a solution where 1. is true more often than 2. for the people on the Go team when it comes to /x packages.

The "Go team," such as it is, is only a handful of people, and they do not have the cycles to review any new packages. If you want more packages in x/ then they must be written, reviewed, and maintained by other people. That being the case, there's no reason why they should be in x/. They're not going to be any better or worse for it.

I completely agree that putting Go code under /x isn't magic, and doesn't automatically make it better if there's not enough people for whom it's a top priority. I don't have a great solution, but I do agree that it's good to think about finding a way to have high quality Go libraries (with proper voluntary ownership) be elsewhere, such that they're still discoverable and trustworthy.

dmitshur commented 8 years ago

My second comment is a lot easier to write.

Perhaps part of the solution is to bless a location where such high-quality packages land in the first place, and then come up with a process to rate them.

@griesemer, since I haven't seen it mentioned here already, maybe consider https://github.com/camlistore/go4#readme as a candidate for such a place (if its owners are okay with it, of course).

nigeltao commented 8 years ago

For the record, this is for the foundational packages. Not for yet another web framework but for a COAP or a USB package for Go. I am not proposing to establish a general-purpose support group.

If we're talking only about foundational packages (and does that mean that we've decided that the policy on x/ sub-repos is "foundational only"?), doesn't the golang-dev mailing list already fulfil this role? It seems like https://groups.google.com/d/msg/golang-dev/ofaaIJPWRKg/7jX3Qf5hBQAJ is exactly the sort of conversation that you're looking for.

I am not sure if we can use this channel if this proposal is accepted. If yes, I wouldn't care about not being able to communicate to the others. golang-dev@ is the perfect solution to reach out.

In case anyone is confused, I did write the "doesn't the golang-dev mailing list already fulfil this role?" paragraph as a comment on this issue, but later deleted it as I thought it was derailing the original post, which is about deciding policy for sub-repositories. There already is some confusion: "if this proposal is accepted" was met with "What proposal? I want to remind everyone that nothing has actually been proposed". I suppose that the e-mail went out anyway, and was quoted in full in a reply, so it's been effectively undeleted.

nigeltao commented 8 years ago

Speaking of the OP, another reason for inclusion would be to provide an official package for interoperating about (but not necessarily doing) X.

For example, person foo might write a flac decoder. Company bar might write an mp3 encoder. It would be nice to have some common interfaces so that the two can plug together. Such interfaces could conceivably be under x/ without requiring either a flac or mp3 package to be under x/.

The existing x/image/math/f32 and x/image/math/f64 packages roughly have this intent. It's not hard for any one particular repository to define useful matrix types, but interop between graphics packages from different repos is awkward unless there's canonical types. I'm not sure if these particular x/image/math/f?? packages have been widely adopted in practice, though.