xtox-proto-wrap

module
v0.0.0-...-4d55380 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: Apache-2.0

README

xtox-proto-wrap

⚠️ This is a maintenance fork of the original repository which is archived.

A package-at-a-time wrapper for protoc, for generating Go protobuf code.

install

go get git.sr.ht/~xtox/xtox-proto-wrap

philosopy

protowrap is called instead of protoc, and ensures that .proto files are processed one Go package at a time.

It parses out the flags it understands, passing the rest through to protoc unchanged.

operation

  • search for all .proto files under the same import paths as the .proto file arguments
  • call protoc to generate FileDescriptorProtos
  • inspect the FileDescriptorProtos to deduce package information
  • group .proto files into packages
  • call protoc once for each package

license

Copyright 2016 Square, 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.

Directories

Path Synopsis
cmd
cyclecheck
Binary cyclecheck looks for situations where imports in .proto files would result in circular package dependencies in the generated Go code.
Binary cyclecheck looks for situations where imports in .proto files would result in circular package dependencies in the generated Go code.
protowrap
Binary protoc-wrapper calls protoc, with our plugins, but using commandline flags to move things around instead of forking protoc-gen-go.
Binary protoc-wrapper calls protoc, with our plugins, but using commandline flags to move things around instead of forking protoc-gen-go.
Package wrapper implements the actual functionality of wrapping protoc.
Package wrapper implements the actual functionality of wrapping protoc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL