Skip to content

Commit

Permalink
Migration: Rename imports throughout (bufbuild#161)
Browse files Browse the repository at this point in the history
* s#github.com/lyft/protoc-gen-validate#github.com/envoyproxy/protoc-gen-validate#g

Signed-off-by: Chris Roche <[email protected]>

* vendor bazel files

Signed-off-by: Chris Roche <[email protected]>

* checkpoint

Signed-off-by: Chris Roche <[email protected]>
  • Loading branch information
rodaine authored Apr 4, 2019
1 parent 19a998e commit 5eea078
Show file tree
Hide file tree
Showing 355 changed files with 382 additions and 382 deletions.
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ gazelle(
go_binary(
name = "protoc-gen-validate",
embed = [":go_default_library"],
importpath = "github.com/lyft/protoc-gen-validate",
importpath = "github.com/envoyproxy/protoc-gen-validate",
visibility = ["//visibility:public"],
)

go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "github.com/lyft/protoc-gen-validate",
importpath = "github.com/envoyproxy/protoc-gen-validate",
visibility = ["//visibility:private"],
deps = [
"//module:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RUN go get -d ${PGG_PKG} \
&& cd - \
&& rm -rf ${PGG_PATH}

WORKDIR ${GOPATH}/src/github.com/lyft/protoc-gen-validate
WORKDIR ${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate
COPY . .

RUN make build
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
empty :=
space := $(empty) $(empty)
PACKAGE := github.com/lyft/protoc-gen-validate
PACKAGE := github.com/envoyproxy/protoc-gen-validate

# protoc-gen-go parameters for properly generating the import path for PGV
VALIDATE_IMPORT := Mvalidate/validate.proto=${PACKAGE}/validate
Expand Down Expand Up @@ -38,7 +38,7 @@ bazel:
.PHONY: gazelle
gazelle: vendor
# runs gazelle against the codebase to generate Bazel BUILD files
bazel run //:gazelle -- -go_prefix=github.com/lyft/protoc-gen-validate
bazel run //:gazelle -- -go_prefix=github.com/envoyproxy/protoc-gen-validate
buildozer 'replace deps //vendor/github.com/golang/protobuf/proto:go_default_library @com_github_golang_protobuf//proto:go_default_library' '//...:%go_library'
buildozer 'replace deps @com_github_golang_protobuf//ptypes:go_default_library_gen @com_github_golang_protobuf//ptypes:go_default_library' '//...:%go_library'
buildozer 'replace deps @io_bazel_rules_go//proto/wkt:duration_go_proto @com_github_golang_protobuf//ptypes/duration:go_default_library' '//...:%go_library'
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Installing PGV can currently only be done from source:

```sh
# fetches this repo into $GOPATH
go get -d github.com/lyft/protoc-gen-validate
go get -d github.com/envoyproxy/protoc-gen-validate

# installs PGV into $GOPATH/bin
make build
Expand All @@ -97,7 +97,7 @@ Go generation should occur into the same output path as the official plugin. For
protoc \
-I . \
-I ${GOPATH}/src \
-I ${GOPATH}/src/github.com/lyft/protoc-gen-validate \
-I ${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate \
--go_out=":../generated" \
--validate_out="lang=go:../generated" \
example.proto
Expand All @@ -115,7 +115,7 @@ command to generate `gogo`-compatible validation code:
protoc \
-I . \
-I ${GOPATH}/src \
-I ${GOPATH}/src/github.com/lyft/protoc-gen-validate \
-I ${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate \
--gogofast_out=":../generated"\
--validate_out="lang=gogo:../generated" \ example.proto
```
Expand Down Expand Up @@ -761,20 +761,20 @@ bazel run //tests/harness/executor:executor

### Docker

PGV comes with a [Dockerfile](/Dockerfile) for consistent development tooling and CI. The main entrypoint is `make` with `quick` as the default target. This repo should be volumed into `/go/src/github.com/lyft/protoc-gen-validate` for the proper behavior.
PGV comes with a [Dockerfile](/Dockerfile) for consistent development tooling and CI. The main entrypoint is `make` with `quick` as the default target. This repo should be volumed into `/go/src/github.com/envoyproxy/protoc-gen-validate` for the proper behavior.

```sh
# build the image
docker build -t lyft/protoc-gen-validate .

# executes the default make target: quick
docker run --rm \
-v $(PWD):/go/src/github.com/lyft/protoc-gen-validate \
-v $(PWD):/go/src/github.com/envoyproxy/protoc-gen-validate \
lyft/protoc-gen-validate

# executes the 'build' & 'generate-testdata' make targets
docker run --rm \
-v $(PWD):/go/src/github.com/lyft/protoc-gen-validate \
-v $(PWD):/go/src/github.com/envoyproxy/protoc-gen-validate \
lyft/protoc-gen-validate \
build generate-testdata
```
Expand Down
4 changes: 2 additions & 2 deletions gogoproto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
embed = [":gogoproto_go_proto"],
importpath = "github.com/lyft/protoc-gen-validate/gogoproto",
importpath = "github.com/envoyproxy/protoc-gen-validate/gogoproto",
visibility = ["//visibility:public"],
)

Expand All @@ -17,7 +17,7 @@ proto_library(

go_proto_library(
name = "gogoproto_go_proto",
importpath = "github.com/lyft/protoc-gen-validate/gogoproto",
importpath = "github.com/envoyproxy/protoc-gen-validate/gogoproto",
proto = ":gogoproto_proto",
visibility = ["//visibility:public"],
)
2 changes: 1 addition & 1 deletion java/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ These steps are for releasing the Java components of PGV:
```bash
> GPG_TTY=$(tty)
> export GPG_TTY
```
```
2 changes: 1 addition & 1 deletion java/pgv-artifacts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@
</profile>
</profiles>

</project>
</project>
2 changes: 1 addition & 1 deletion java/pgv-java-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
2 changes: 1 addition & 1 deletion java/pgv-java-grpc/src/test/proto/hello.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ message HelloRequest {

message HelloResponse {
string message = 1;
}
}
2 changes: 1 addition & 1 deletion java/pgv-java-stub/src/test/proto/enum.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ enum TestEnum {

message Outer {
string val = 1;
}
}
2 changes: 1 addition & 1 deletion java/pgv-java-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
4 changes: 2 additions & 2 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<name>PGV-Java Parent</name>
<description>Protoc plugin to generate protobuf message validators.</description>
<url>https://github.com/lyft/protoc-gen-validate</url>
<url>https://github.com/envoyproxy/protoc-gen-validate</url>

<licenses>
<license>
Expand Down Expand Up @@ -162,7 +162,7 @@
</profiles>

<scm>
<url>https://github.com/lyft/protoc-gen-validate</url>
<url>https://github.com/envoyproxy/protoc-gen-validate</url>
<connection>scm:git:[email protected]:lyft/protoc-gen-validate.git</connection>
<developerConnection>scm:git:[email protected]:lyft/protoc-gen-validate.git</developerConnection>
</scm>
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-star/lang/go"
"github.com/lyft/protoc-gen-validate/module"
"github.com/envoyproxy/protoc-gen-validate/module"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion module/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go_library(
"checker.go",
"validate.go",
],
importpath = "github.com/lyft/protoc-gen-validate/module",
importpath = "github.com/envoyproxy/protoc-gen-validate/module",
visibility = ["//visibility:public"],
deps = [
"//templates:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion module/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/golang/protobuf/ptypes/duration"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-validate/validate"
"github.com/envoyproxy/protoc-gen-validate/validate"
)

type FieldType interface {
Expand Down
2 changes: 1 addition & 1 deletion module/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package module
import (
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-star/lang/go"
"github.com/lyft/protoc-gen-validate/templates"
"github.com/envoyproxy/protoc-gen-validate/templates"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion templates/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["pkg.go"],
importpath = "github.com/lyft/protoc-gen-validate/templates",
importpath = "github.com/envoyproxy/protoc-gen-validate/templates",
visibility = ["//visibility:public"],
deps = [
"//templates/cc:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion templates/cc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ go_library(
"timestamp.go",
"wrapper.go",
],
importpath = "github.com/lyft/protoc-gen-validate/templates/cc",
importpath = "github.com/envoyproxy/protoc-gen-validate/templates/cc",
visibility = ["//visibility:public"],
deps = [
"//templates/shared:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion templates/cc/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/golang/protobuf/ptypes/timestamp"
pgs "github.com/lyft/protoc-gen-star"
pgsgo "github.com/lyft/protoc-gen-star/lang/go"
"github.com/lyft/protoc-gen-validate/templates/shared"
"github.com/envoyproxy/protoc-gen-validate/templates/shared"
)

func RegisterModule(tpl *template.Template, params pgs.Parameters) {
Expand Down
2 changes: 1 addition & 1 deletion templates/go/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go_library(
"required.go",
"timestamp.go",
],
importpath = "github.com/lyft/protoc-gen-validate/templates/go",
importpath = "github.com/envoyproxy/protoc-gen-validate/templates/go",
visibility = ["//visibility:public"],
deps = [
"//templates/goshared:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion templates/go/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"text/template"

"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-validate/templates/goshared"
"github.com/envoyproxy/protoc-gen-validate/templates/goshared"
)

func Register(tpl *template.Template, params pgs.Parameters) {
Expand Down
2 changes: 1 addition & 1 deletion templates/gogo/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go_library(
"required.go",
"timestamp.go",
],
importpath = "github.com/lyft/protoc-gen-validate/templates/gogo",
importpath = "github.com/envoyproxy/protoc-gen-validate/templates/gogo",
visibility = ["//visibility:public"],
deps = [
"//templates/goshared:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion templates/gogo/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/lyft/protoc-gen-star"

shared "github.com/lyft/protoc-gen-validate/templates/goshared"
shared "github.com/envoyproxy/protoc-gen-validate/templates/goshared"
)

func Register(tpl *template.Template, params pgs.Parameters) {
Expand Down
2 changes: 1 addition & 1 deletion templates/goshared/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ go_library(
"timestamp.go",
"wrapper.go",
],
importpath = "github.com/lyft/protoc-gen-validate/templates/goshared",
importpath = "github.com/envoyproxy/protoc-gen-validate/templates/goshared",
visibility = ["//visibility:public"],
deps = [
"//templates/shared:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion templates/goshared/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-star/lang/go"
"github.com/lyft/protoc-gen-validate/templates/shared"
"github.com/envoyproxy/protoc-gen-validate/templates/shared"
)

func Register(tpl *template.Template, params pgs.Parameters) {
Expand Down
2 changes: 1 addition & 1 deletion templates/java/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ go_library(
"unimplemented.go",
"wrapper.go",
],
importpath = "github.com/lyft/protoc-gen-validate/templates/java",
importpath = "github.com/envoyproxy/protoc-gen-validate/templates/java",
visibility = ["//visibility:public"],
deps = [
"//templates/shared:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion templates/java/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/iancoleman/strcase"
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-star/lang/go"
"github.com/lyft/protoc-gen-validate/templates/shared"
"github.com/envoyproxy/protoc-gen-validate/templates/shared"
)

func RegisterIndex(tpl *template.Template, params pgs.Parameters) {
Expand Down
10 changes: 5 additions & 5 deletions templates/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (

"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-star/lang/go"
"github.com/lyft/protoc-gen-validate/templates/cc"
"github.com/lyft/protoc-gen-validate/templates/go"
"github.com/lyft/protoc-gen-validate/templates/gogo"
"github.com/lyft/protoc-gen-validate/templates/java"
"github.com/lyft/protoc-gen-validate/templates/shared"
"github.com/envoyproxy/protoc-gen-validate/templates/cc"
"github.com/envoyproxy/protoc-gen-validate/templates/go"
"github.com/envoyproxy/protoc-gen-validate/templates/gogo"
"github.com/envoyproxy/protoc-gen-validate/templates/java"
"github.com/envoyproxy/protoc-gen-validate/templates/shared"
)

type RegisterFn func(tpl *template.Template, params pgs.Parameters)
Expand Down
2 changes: 1 addition & 1 deletion templates/shared/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go_library(
"reflection.go",
"well_known.go",
],
importpath = "github.com/lyft/protoc-gen-validate/templates/shared",
importpath = "github.com/envoyproxy/protoc-gen-validate/templates/shared",
visibility = ["//visibility:public"],
deps = [
"//gogoproto:go_default_library",
Expand Down
4 changes: 2 additions & 2 deletions templates/shared/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/golang/protobuf/proto"
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-validate/gogoproto"
"github.com/lyft/protoc-gen-validate/validate"
"github.com/envoyproxy/protoc-gen-validate/gogoproto"
"github.com/envoyproxy/protoc-gen-validate/validate"
)

type RuleContext struct {
Expand Down
2 changes: 1 addition & 1 deletion templates/shared/disabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package shared

import (
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-validate/validate"
"github.com/envoyproxy/protoc-gen-validate/validate"
)

// Disabled returns true if validations are disabled for msg
Expand Down
2 changes: 1 addition & 1 deletion templates/shared/well_known.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package shared

import (
"github.com/lyft/protoc-gen-star"
"github.com/lyft/protoc-gen-validate/validate"
"github.com/envoyproxy/protoc-gen-validate/validate"
)

type WellKnown string
Expand Down
6 changes: 3 additions & 3 deletions tests/harness/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ proto_library(

go_proto_library(
name = "harness_go_proto",
importpath = "github.com/lyft/protoc-gen-validate/tests/harness/go",
importpath = "github.com/envoyproxy/protoc-gen-validate/tests/harness/go",
proto = ":harness_proto",
visibility = ["//visibility:public"],
)

go_proto_library(
name = "harness_gogo_proto",
compilers = ["@io_bazel_rules_go//proto:gogo_proto"],
importpath = "github.com/lyft/protoc-gen-validate/tests/harness/gogo",
importpath = "github.com/envoyproxy/protoc-gen-validate/tests/harness/gogo",
proto = ":harness_proto",
visibility = ["//visibility:public"],
deps = [
Expand Down Expand Up @@ -51,6 +51,6 @@ java_proto_library(
go_library(
name = "go_default_library",
embed = [":harness_go_proto"],
importpath = "github.com/lyft/protoc-gen-validate/tests/harness",
importpath = "github.com/envoyproxy/protoc-gen-validate/tests/harness",
visibility = ["//visibility:public"],
)
Loading

0 comments on commit 5eea078

Please sign in to comment.