Skip to content

Commit 4d4c06b

Browse files
authored
Chore: Vendor wire into pkg/build (#84637)
* vendor latest wire into pkg/build * use vendored wire in builds * fix wire import path * remove wire from bingo * also support google/wire import * make prettier happy * change package in tess * add debug walk for drone * add wire_gen in tests * remove debug walk * restore imports
1 parent 36ee157 commit 4d4c06b

File tree

371 files changed

+12711
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+12711
-29
lines changed

.bingo/Variables.mk

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.9. DO NOT EDIT.
1+
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
22
# All tools are designed to be build inside $GOBIN.
33
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
44
GOPATH ?= $(shell go env GOPATH)
@@ -59,9 +59,3 @@ $(SWAGGER): $(BINGO_DIR)/swagger.mod
5959
@echo "(re)installing $(GOBIN)/swagger-v0.30.2"
6060
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
6161

62-
WIRE := $(GOBIN)/wire-v0.6.0
63-
$(WIRE): $(BINGO_DIR)/wire.mod
64-
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
65-
@echo "(re)installing $(GOBIN)/wire-v0.6.0"
66-
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.6.0 "github.com/google/wire/cmd/wire"
67-

.bingo/variables.env

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.9. DO NOT EDIT.
1+
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
22
# All tools are designed to be build inside $GOBIN.
33
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
44
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -22,5 +22,3 @@ LEFTHOOK="${GOBIN}/lefthook-v1.4.8"
2222

2323
SWAGGER="${GOBIN}/swagger-v0.30.2"
2424

25-
WIRE="${GOBIN}/wire-v0.6.0"
26-

.bingo/wire.mod

-5
This file was deleted.

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ gen-feature-toggles:
117117
go test -v ./pkg/services/featuremgmt/...; \
118118
fi
119119

120-
gen-go: $(WIRE)
120+
gen-go:
121121
@echo "generate go files"
122-
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server
122+
$(GO) run ./pkg/build/wire/cmd/wire/main.go gen -tags $(WIRE_TAGS) ./pkg/server
123123

124124
fix-cue: $(CUE)
125125
@echo "formatting cue files"

go.work

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use (
44
.
55
./pkg/apimachinery
66
./pkg/apiserver
7+
./pkg/build/wire
78
./pkg/promlib
89
./pkg/util/xorm
910
)

pkg/build/wire/AUTHORS

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This is the official list of Wire authors for copyright purposes.
2+
# This file is distinct from the CONTRIBUTORS files.
3+
# See the latter for an explanation.
4+
5+
# Names should be added to this file as one of
6+
# Organization's name
7+
# Individual's name <submission email address>
8+
# Individual's name <submission email address> <email2> <emailN>
9+
# See CONTRIBUTORS for the meaning of multiple email addresses.
10+
11+
# Please keep the list sorted.
12+
13+
Google LLC
14+
15+
Kumbirai Tanekha <[email protected]>
16+
Oleg Kovalov <[email protected]>
17+
Yoichiro Shimizu <[email protected]>
18+
Zachary Romero <[email protected]>

pkg/build/wire/CODE_OF_CONDUCT.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Code of Conduct
2+
3+
This project is covered under the [Go Code of Conduct][]. In summary:
4+
5+
- Treat everyone with respect and kindness.
6+
- Be thoughtful in how you communicate.
7+
- Don’t be destructive or inflammatory.
8+
- If you encounter an issue, please mail [email protected].
9+
10+
[Go Code of Conduct]: https://golang.org/conduct

pkg/build/wire/CONTRIBUTING.md

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# How to Contribute
2+
3+
We would love to accept your patches and contributions to this project. Here is
4+
how you can help.
5+
6+
## Filing issues
7+
8+
Filing issues is an important way you can contribute to the Wire Project. We
9+
want your feedback on things like bugs, desired API changes, or just anything
10+
that isn't working for you.
11+
12+
### Bugs
13+
14+
If your issue is a bug, open one
15+
[here](https://github.com/google/wire/issues/new). The easiest way to file an
16+
issue with all the right information is to run `go bug`. `go bug` will print out
17+
a handy template of questions and system information that will help us get to
18+
the root of the issue quicker.
19+
20+
### Changes
21+
22+
Unlike the core Go project, we do not have a formal proposal process for
23+
changes. If you have a change you would like to see in Wire, please file an
24+
issue with the necessary details.
25+
26+
### Triaging
27+
28+
The Go Cloud team triages issues at least every two weeks, but usually within
29+
two business days. Bugs or feature requests are either placed into a **Sprint**
30+
milestone which means the issue is intended to be worked on. Issues that we
31+
would like to address but do not have time for are placed into the [Unplanned][]
32+
milestone.
33+
34+
[Unplanned]: https://github.com/google/wire/milestone/1
35+
36+
## Contributing Code
37+
38+
We love accepting contributions! If your change is minor, please feel free
39+
submit a [pull request](https://help.github.com/articles/about-pull-requests/).
40+
If your change is larger, or adds a feature, please file an issue beforehand so
41+
that we can discuss the change. You're welcome to file an implementation pull
42+
request immediately as well, although we generally lean towards discussing the
43+
change and then reviewing the implementation separately.
44+
45+
### Finding something to work on
46+
47+
If you want to write some code, but don't know where to start or what you might
48+
want to do, take a look at our [Unplanned][] milestone. This is where you can
49+
find issues we would like to address but can't currently find time for. See if
50+
any of the latest ones look interesting! If you need help before you can start
51+
work, you can comment on the issue and we will try to help as best we can.
52+
53+
### Contributor License Agreement
54+
55+
Contributions to this project can only be made by those who have signed Google's
56+
Contributor License Agreement. You (or your employer) retain the copyright to
57+
your contribution, this simply gives us permission to use and redistribute your
58+
contributions as part of the project. Head over to
59+
<https://cla.developers.google.com/> to see your current agreements on file or
60+
to sign a new one.
61+
62+
As a personal contributor, you only need to sign the Google CLA once across all
63+
Google projects. If you've already signed the CLA, there is no need to do it
64+
again. If you are submitting code on behalf of your employer, there's
65+
[a separate corporate CLA that your employer manages for you](https://opensource.google.com/docs/cla/#external-contributors).
66+
67+
## Making a pull request
68+
69+
* Follow the normal
70+
[pull request flow](https://help.github.com/articles/creating-a-pull-request/)
71+
* Build your changes using Go 1.11 with Go modules enabled. Wire's continuous
72+
integration uses Go modules in order to ensure
73+
[reproducible builds](https://research.swtch.com/vgo-repro).
74+
* Test your changes using `go test ./...`. Please add tests that show the
75+
change does what it says it does, even if there wasn't a test in the first
76+
place.
77+
* Feel free to make as many commits as you want; we will squash them all into
78+
a single commit before merging your change.
79+
* Check the diffs, write a useful description (including something like
80+
`Fixes #123` if it's fixing a bug) and send the PR out.
81+
* Github will run tests against the PR. This should
82+
happen within 10 minutes or so. If a test fails, go back to the coding stage
83+
and try to fix the test and push the same branch again. You won't need to
84+
make a new pull request, the changes will be rolled directly into the PR you
85+
already opened. Wait for the tests again. There is no need to assign a reviewer
86+
to the PR, the project team will assign someone for review during the
87+
standard [triage](#triaging) process.
88+
89+
## Code review
90+
91+
All submissions, including submissions by project members, require review. It is
92+
almost never the case that a pull request is accepted without some changes
93+
requested, so please do not be offended!
94+
95+
When you have finished making requested changes to your pull request, please
96+
make a comment containing "PTAL" (Please Take Another Look) on your pull
97+
request. GitHub notifications can be noisy, and it is unfortunately easy for
98+
things to be lost in the shuffle.
99+
100+
Once your PR is approved (hooray!) the reviewer will squash your commits into a
101+
single commit, and then merge the commit onto the Wire master branch. Thank you!
102+
103+
## Github code review workflow conventions
104+
105+
(For project members and frequent contributors.)
106+
107+
As a contributor:
108+
109+
- Try hard to make each Pull Request as small and focused as possible. In
110+
particular, this means that if a reviewer asks you to do something that is
111+
beyond the scope of the Pull Request, the best practice is to file another
112+
issue and reference it from the Pull Request rather than just adding more
113+
commits to the existing PR.
114+
- Adding someone as a Reviewer means "please feel free to look and comment";
115+
the review is optional. Choose as many Reviewers as you'd like.
116+
- Adding someone as an Assignee means that the Pull Request should not be
117+
submitted until they approve. If you choose multiple Assignees, wait until
118+
all of them approve. It is fine to ask someone if they are OK with being
119+
removed as an Assignee.
120+
- Note that if you don't select any assignees, ContributeBot will turn all
121+
of your Reviewers into Assignees.
122+
- Make as many commits as you want locally, but try not to push them to Github
123+
until you've addressed comments; this allows the email notification about
124+
the push to be a signal to reviewers that the PR is ready to be looked at
125+
again.
126+
- When there may be confusion about what should happen next for a PR, be
127+
explicit; add a "PTAL" comment if it is ready for review again, or a "Please
128+
hold off on reviewing for now" if you are still working on addressing
129+
comments.
130+
- "Resolve" comments that you are sure you've addressed; let your reviewers
131+
resolve ones that you're not sure about.
132+
- Do not use `git push --force`; this can cause comments from your reviewers
133+
that are associated with a specific commit to be lost. This implies that
134+
once you've sent a Pull Request, you should use `git merge` instead of `git
135+
rebase` to incorporate commits from the master branch.
136+
137+
As a reviewer:
138+
139+
- Be timely in your review process, especially if you are an Assignee.
140+
- Try to use `Start a Review` instead of single comments, to reduce email
141+
spam.
142+
- "Resolve" your own comments if they have been addressed.
143+
- If you want your review to be blocking, and are not currently an Assignee,
144+
add yourself as an Assignee.
145+
146+
When squashing-and-merging:
147+
148+
- Ensure that **all** of the Assignees have approved.
149+
- Do a final review of the one-line PR summary, ensuring that it accurately
150+
describes the change.
151+
- Delete the automatically added commit lines; these are generally not
152+
interesting and make commit history harder to read.

pkg/build/wire/CONTRIBUTORS

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This is the official list of people who can contribute
2+
# (and typically have contributed) code to the Wire repository.
3+
# The AUTHORS file lists the copyright holders; this file
4+
# lists people. For example, Google employees are listed here
5+
# but not in AUTHORS, because Google holds the copyright.
6+
#
7+
# Names should be added to this file only after verifying that
8+
# the individual or the individual's organization has agreed to
9+
# the appropriate Contributor License Agreement, found here:
10+
#
11+
# http://code.google.com/legal/individual-cla-v1.0.html
12+
# http://code.google.com/legal/corporate-cla-v1.0.html
13+
#
14+
# The agreement for individuals can be filled out on the web.
15+
#
16+
# When adding J Random Contributor's name to this file,
17+
# either J's name or J's organization's name should be
18+
# added to the AUTHORS file, depending on whether the
19+
# individual or corporate CLA was used.
20+
21+
# Names should be added to this file like so:
22+
# Individual's name <submission email address>
23+
# Individual's name <submission email address> <email2> <emailN>
24+
#
25+
# An entry with multiple email addresses specifies that the
26+
# first address should be used in the submit logs and
27+
# that the other addresses should be recognized as the
28+
# same person when interacting with Git.
29+
30+
# Please keep the list sorted.
31+
32+
33+
Christina Austin <[email protected]>
34+
Eno Compton <[email protected]>
35+
36+
37+
Kumbirai Tanekha <[email protected]>
38+
Oleg Kovalov <[email protected]>
39+
40+
41+
42+
Yoichiro Shimizu <[email protected]>
43+
Zachary Romero <[email protected]>

0 commit comments

Comments
 (0)