Skip to content

Commit

Permalink
remove deprecated dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jalandis committed Jan 30, 2021
1 parent 71d73ee commit 007265f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 24 deletions.
14 changes: 0 additions & 14 deletions default.nix

This file was deleted.

17 changes: 11 additions & 6 deletions protoc-gen-elm/cmd/protoc-gen-elm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

"protoc-gen-elm/pkg/elm"

"github.com/golang/protobuf/proto"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/descriptorpb"
"google.golang.org/protobuf/types/pluginpb"
)

var excludedFiles = map[string]bool{
Expand Down Expand Up @@ -58,7 +58,7 @@ func main() {
log.Fatalf("Could not read request from STDIN: %v", err)
}

req := &plugin.CodeGeneratorRequest{}
req := &pluginpb.CodeGeneratorRequest{}

err = proto.Unmarshal(data, req)
if err != nil {
Expand All @@ -76,10 +76,15 @@ func main() {
inFile.SourceCodeInfo = nil
}

log.Printf("Input data: %v", proto.MarshalTextString(req))
result, err := proto.Marshal(req)
if err != nil {
log.Fatalf("Failed to marshal request: %v", err)
}

log.Printf("Input data: %s", result)
}

resp := &plugin.CodeGeneratorResponse{}
resp := &pluginpb.CodeGeneratorResponse{}

for _, inFile := range req.GetProtoFile() {
log.Printf("Processing file %s", inFile.GetName())
Expand All @@ -95,7 +100,7 @@ func main() {
log.Fatalf("Could not template file: %v", err)
}

resp.File = append(resp.File, &plugin.CodeGeneratorResponse_File{
resp.File = append(resp.File, &pluginpb.CodeGeneratorResponse_File{
Name: &name,
Content: &content,
})
Expand Down
1 change: 0 additions & 1 deletion protoc-gen-elm/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.15

require (
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.4.3
github.com/pkg/errors v0.9.1
google.golang.org/protobuf v1.25.0
)
3 changes: 0 additions & 3 deletions protoc-gen-elm/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
Expand Down Expand Up @@ -87,7 +85,6 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
Expand Down

0 comments on commit 007265f

Please sign in to comment.