From b8898ab06302e1e7c2da9f522695e6436dc34129 Mon Sep 17 00:00:00 2001 From: bufdev <4228796+bufdev@users.noreply.github.com> Date: Thu, 9 Sep 2021 10:09:17 -0400 Subject: [PATCH] Complete deletion of protoc-gen-buf-check-breaking and protoc-gen-buf-check-lint (#530) --- .dockerignore | 2 - .gitignore | 2 - CHANGELOG.md | 15 +++++++- cmd/protoc-gen-buf-check-breaking/main.go | 45 ----------------------- cmd/protoc-gen-buf-check-lint/main.go | 45 ----------------------- make/buf/all.mk | 2 - make/buf/scripts/release.bash | 4 +- 7 files changed, 15 insertions(+), 100 deletions(-) delete mode 100644 cmd/protoc-gen-buf-check-breaking/main.go delete mode 100644 cmd/protoc-gen-buf-check-lint/main.go diff --git a/.dockerignore b/.dockerignore index c79db182ce..dc2052104c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,8 +6,6 @@ .vscode/ cmd/buf/buf cmd/protoc-gen-buf-breaking/protoc-gen-buf-breaking -cmd/protoc-gen-buf-check-breaking/protoc-gen-buf-check-breaking -cmd/protoc-gen-buf-check-lint/protoc-gen-buf-check-lint cmd/protoc-gen-buf-lint/protoc-gen-buf-lint private/buf/cmd/buf/cache/ private/buf/cmd/buf/command/protoc/internal/protoc-gen-insertion-point-receiver/protoc-gen-insertion-point-receiver diff --git a/.gitignore b/.gitignore index 09a2b465e0..d172af0750 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,6 @@ /.vscode/ /cmd/buf/buf /cmd/protoc-gen-buf-breaking/protoc-gen-buf-breaking -/cmd/protoc-gen-buf-check-breaking/protoc-gen-buf-check-breaking -/cmd/protoc-gen-buf-check-lint/protoc-gen-buf-check-lint /cmd/protoc-gen-buf-lint/protoc-gen-buf-lint /private/buf/cmd/buf/cache/ /private/buf/cmd/buf/command/protoc/internal/protoc-gen-insertion-point-receiver/protoc-gen-insertion-point-receiver diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ea248e880..0864a9c820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,20 @@ ## [Unreleased] -- No changes yet. +Complete deletion `protoc-gen-buf-check-breaking` and `protoc-gen-buf-check-lint`, which have been moved to `protoc-gen-buf-breaking` and `protoc-gen-buf-lint`. + +In January 2021, `protoc-gen-buf-check-breaking` and `protoc-gen-buf-check-lint` were deprecated and scheduled for removal for v1.0. In August 2021, we began returning error for every invocation of `protoc-gen-buf-check-breaking` and `protoc-gen-buf-check-lint`. As v1.0 is imminent, this release completes the deletion process. + +The only migration necessary is to change your installation and invocation from `protoc-gen-buf-check-breaking` to `protoc-gen-buf-breaking` and `protoc-gen-buf-check-lint` to `protoc-gen-buf-lint`. These can be installed in the exact same manner, whether from GitHub Releases, Homebrew, AUR, or direct Go installation: + +``` +# instead of go get github.com/bufbuild/buf/cmd/protoc-gen-buf-check-breaking +go get github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking +# instead of curl -sSL https://github.com/bufbuild/buf/releases/download/v0.57.0/protoc-gen-buf-check-breaking-Linux-x86_64 +curl -sSL https://github.com/bufbuild/buf/releases/download/v0.57.0/protoc-gen-buf-breaking-Linux-x86_64 +``` + +There is no change in functionality. ## [v0.56.0] diff --git a/cmd/protoc-gen-buf-check-breaking/main.go b/cmd/protoc-gen-buf-check-breaking/main.go deleted file mode 100644 index 1e9ff71eaa..0000000000 --- a/cmd/protoc-gen-buf-check-breaking/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2020-2021 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "fmt" - "os" -) - -const deprecationMessage = `protoc-gen-buf-check-breaking has been moved to protoc-gen-buf-breaking. -Use protoc-gen-buf-breaking instead. - -As one of the few changes buf will ever make, protoc-gen-buf-check-breaking was deprecated and -scheduled for removal for v1.0 in January 2021. In preparation for v1.0, instead of just printing -out a message notifying users of this, this command now returns an error for every invocation -and will be completely removed when v1.0 is released. - -The only migration necessary is to change your installation and invocation -from protoc-gen-buf-check-breaking to protoc-gen-buf-breaking. -protoc-gen-buf-breaking can be installed in the exact same manner, whether -from GitHub Releases, Homebrew, AUR, or direct Go installation: - -# instead of go get github.com/bufbuild/buf/cmd/protoc-gen-buf-check-breaking -go get github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking -# instead of curl -sSL https://github.com/bufbuild/buf/releases/download/v0.51.1/protoc-gen-buf-check-breaking-Linux-x86_64 -curl -sSL https://github.com/bufbuild/buf/releases/download/v0.51.1/protoc-gen-buf-breaking-Linux-x86_64 - -There is no change in functionality.` - -func main() { - fmt.Fprintln(os.Stderr, deprecationMessage) - os.Exit(1) -} diff --git a/cmd/protoc-gen-buf-check-lint/main.go b/cmd/protoc-gen-buf-check-lint/main.go deleted file mode 100644 index aa91ed50a5..0000000000 --- a/cmd/protoc-gen-buf-check-lint/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2020-2021 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "fmt" - "os" -) - -const deprecationMessage = `protoc-gen-buf-check-lint has been moved to protoc-gen-buf-lint. -Use protoc-gen-buf-lint instead. - -As one of the few changes buf will ever make, protoc-gen-buf-check-lint was deprecated and -scheduled for removal for v1.0 in January 2021. In preparation for v1.0, instead of just printing -out a message notifying users of this, this command now returns an error for every invocation -and will be completely removed when v1.0 is released. - -The only migration necessary is to change your installation and invocation -from protoc-gen-buf-check-lint to protoc-gen-buf-lint. -protoc-gen-buf-lint can be installed in the exact same manner, whether -from GitHub Releases, Homebrew, AUR, or direct Go installation: - -# instead of go get github.com/bufbuild/buf/cmd/protoc-gen-buf-check-lint -go get github.com/bufbuild/buf/cmd/protoc-gen-buf-lint -# instead of curl -sSL https://github.com/bufbuild/buf/releases/download/v0.51.1/protoc-gen-buf-check-lint-Linux-x86_64 -curl -sSL https://github.com/bufbuild/buf/releases/download/v0.51.1/protoc-gen-buf-lint-Linux-x86_64 - -There is no change in functionality.` - -func main() { - fmt.Fprintln(os.Stderr, deprecationMessage) - os.Exit(1) -} diff --git a/make/buf/all.mk b/make/buf/all.mk index 71c8ea9ec7..360dccaf42 100644 --- a/make/buf/all.mk +++ b/make/buf/all.mk @@ -6,8 +6,6 @@ GO_BINS := $(GO_BINS) \ cmd/buf \ cmd/protoc-gen-buf-breaking \ cmd/protoc-gen-buf-lint \ - cmd/protoc-gen-buf-check-breaking \ - cmd/protoc-gen-buf-check-lint \ private/bufpkg/bufprotoplugin/cmd/protoc-gen-go-api \ private/bufpkg/bufprotoplugin/cmd/protoc-gen-go-apiclient \ private/bufpkg/bufprotoplugin/cmd/protoc-gen-go-apiclientgrpc \ diff --git a/make/buf/scripts/release.bash b/make/buf/scripts/release.bash index 5a0d811ea9..2faae57d9e 100644 --- a/make/buf/scripts/release.bash +++ b/make/buf/scripts/release.bash @@ -95,9 +95,7 @@ for os in Darwin Linux Windows; do for binary in \ buf \ protoc-gen-buf-breaking \ - protoc-gen-buf-lint \ - protoc-gen-buf-check-breaking \ - protoc-gen-buf-check-lint; do + protoc-gen-buf-lint; do CGO_ENABLED=0 GOOS=$(goos "${os}") GOARCH=$(goarch "${arch}") \ go build -a -ldflags "-s -w" -trimpath -o "${dir}/bin/${binary}${extension}" "${DIR}/cmd/${binary}/main.go" cp "${dir}/bin/${binary}${extension}" "${binary}-${os}-${arch}${extension}"