Skip to content

Commit

Permalink
Merge pull request #163 from grpc/no-templates
Browse files Browse the repository at this point in the history
Template-free code generation.
  • Loading branch information
timburks authored Mar 4, 2018
2 parents 1efd21a + ae46487 commit 5807f3f
Show file tree
Hide file tree
Showing 24 changed files with 734 additions and 752 deletions.
46 changes: 22 additions & 24 deletions Examples/Echo/Generated/echo.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
/*
* DO NOT EDIT.
*
* Generated by the protocol buffer compiler.
* Source: echo.proto
*
*/

/*
* Copyright 2018, gRPC Authors All rights reserved.
*
* 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.
*/
//
// DO NOT EDIT.
//
// Generated by the protocol buffer compiler.
// Source: echo.proto
//

//
// Copyright 2018, gRPC Authors All rights reserved.
//
// 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.
//
import Foundation
import Dispatch
import gRPC
Expand Down Expand Up @@ -187,7 +186,6 @@ class Echo_EchoServiceTestStub: ServiceClientTestStubBase, Echo_EchoService {

}


/// To build a server, implement a class that conforms to this protocol.
internal protocol Echo_EchoProvider {
func get(request: Echo_EchoRequest, session: Echo_EchoGetSession) throws -> Echo_EchoResponse
Expand Down
4 changes: 1 addition & 3 deletions Plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
default: build

build: clear
swift build --product TemplateEncoder
.build/debug/TemplateEncoder > Sources/protoc-gen-swiftgrpc/templates.swift
swift build --product protoc-gen-swiftgrpc
swift build
cp .build/debug/protoc-gen-swiftgrpc .
cp .build/debug/protoc-gen-swift .

Expand Down
2 changes: 0 additions & 2 deletions Plugin/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ let package = Package(
name: "SwiftGRPCPlugin",
targets: [
Target(name: "protoc-gen-swiftgrpc"),
Target(name: "TemplateEncoder")
],
dependencies: [
.Package(url: "https://github.com/apple/swift-protobuf.git", Version(1, 0, 2)),
.Package(url: "https://github.com/kylef/Stencil.git", Version(0, 10, 1))
])
3 changes: 0 additions & 3 deletions Plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ invocation from the Makefile:

protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --plugin=./protoc-gen-swiftgrpc --swiftgrpc_out=.

The plugin uses template files in the [Templates](Templates) directory.
These files are compiled into the `protoc-gen-swiftgrpc` plugin executable.

The Swift gRPC plugin can be installed by placing the
`protoc-gen-swiftgrpc` binary into one of the directories in your
path. Specifying `--swiftgrpc_out` to `protoc` will automatically
Expand Down
73 changes: 0 additions & 73 deletions Plugin/Sources/TemplateEncoder/main.swift

This file was deleted.

Loading

0 comments on commit 5807f3f

Please sign in to comment.