-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Description
I'm looking at the package structure of the x/tools
repo in response to some comments from @ianthehat and an in-depth experience report from @hyangah.
The most extensive dependencies in x/tools
come from x/tools/cmd/tip
(via a dependency on golang.org/x/build/autocertcache
), and are only needed when the autocert
build tag is set.
Therefore, I propose that we split 'x/tools' into two modules: one at the repo root, and one at cmd/tip
, with a replace
directive from the latter to the former.
That gives the following structure.
golang.org/x/tools/go.mod
:
module golang.org/x/tools
require (
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect
google.golang.org/appengine v1.2.0
)
go list -m all
for golang.org/x/tools
:
golang.org/x/tools
github.com/golang/protobuf v1.2.0
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
golang.org/x/text v0.3.0
google.golang.org/appengine v1.2.0
golang.org/x/tools/cmd/tip/go.mod
:
module golang.org/x/tools/cmd/tip
require (
cloud.google.com/go v0.28.0
golang.org/x/build v0.0.0-20180925162740-ff91e0e28ab0
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b
)
replace golang.org/x/tools => ./../..
go list -m all
for golang.org/x/tools/cmd/tip
:
golang.org/x/tools/cmd/tip
cloud.google.com/go v0.28.0
contrib.go.opencensus.io/exporter/stackdriver v0.5.0
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625
github.com/coreos/go-systemd v0.0.0-20180705093442-88bfeed483d3
github.com/davecgh/go-spew v1.1.0
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
github.com/fsnotify/fsnotify v1.4.7
github.com/gliderlabs/ssh v0.1.1
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.2.0
github.com/google/go-cmp v0.2.0
github.com/google/go-github v16.0.0+incompatible
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135
github.com/google/martian v2.0.0-beta.2.0.20180813215018-c223d6f7955e+incompatible
github.com/googleapis/gax-go v2.0.0+incompatible
github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1
github.com/kisielk/gotool v1.0.0
github.com/kr/pretty v0.1.0
github.com/kr/pty v1.1.2
github.com/kr/text v0.1.0
github.com/microcosm-cc/bluemonday v1.0.0
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab
github.com/pmezard/go-difflib v1.0.0
github.com/russross/blackfriday v1.5.1
github.com/sergi/go-diff v1.0.0
github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4
github.com/shurcooL/events v0.0.0-20180517181903-37636e399bf5
github.com/shurcooL/github_flavored_markdown v0.0.0-20180602233135-8913699a52e3
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041
github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d
github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b
github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8
github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50
github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371
github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9
github.com/shurcooL/issues v0.0.0-20180509033703-c5ffda838306
github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241
github.com/shurcooL/notifications v0.0.0-20180509033327-dff011de8119
github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9
github.com/shurcooL/reactions v0.0.0-20180602233045-253d879cae26
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95
github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e
github.com/stretchr/testify v1.2.2
github.com/tarm/serial v0.0.0-20180114052751-eaafced92e96
go.opencensus.io v0.14.0
go4.org v0.0.0-20180417224846-9599cf28b011
golang.org/x/build v0.0.0-20180925162740-ff91e0e28ab0
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3
golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc
golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
golang.org/x/sys v0.0.0-20180807162357-acbc56fc7007
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
golang.org/x/tools v0.0.0-20180807205940-ca6481ae5650 => ./../..
google.golang.org/api v0.0.0-20180808000436-6e1e03fd226b
google.golang.org/appengine v1.2.0
google.golang.org/genproto v0.0.0-20180731170733-daca94659cb5
google.golang.org/grpc v1.14.0
gopkg.in/inf.v0 v0.9.1
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919
Edit: I think x/tools
should be a single module for now. See #27858 (comment).
Edit 2: In light of #29935, I'm back to wanting to keep cmd/tip
as a separate module.
Edit 3 by @dmitshur: cmd/tip
has moved out from x/tools as of CL 160817. This is compatible with it being a separate module from x/tools, as @bcmills suggested in edit 2.