Permalink
Browse files

remove letmegrpc

Signed-off-by: Peter Edge <peter.edge@gmail.com>
  • Loading branch information...
peter-edge committed Mar 28, 2016
1 parent 2cc8213 commit e3f6c9b146b5c59965c92b3ce2bd07c69ac14ea7
@@ -9,9 +9,6 @@ EXTRA_PKGS := \
github.com/gogo/protobuf/protoc-gen-gogofast/... \
github.com/gogo/protobuf/protoc-gen-gogofaster/... \
github.com/gogo/protobuf/protoc-gen-gogoslick/... \
github.com/gogo/letmegrpc/form/... \
github.com/gogo/letmegrpc/html/... \
github.com/gogo/letmegrpc/protoc-gen-letmegrpc/... \
go.pedge.io/pb/go/google/api/... \
go.pedge.io/pb/go/google/datastore/v1beta3/... \
go.pedge.io/pb/go/google/devtools/cloudtrace/v1/... \
@@ -56,8 +53,7 @@ EXTRA_CMDS := \
go.pedge.io/protoeasy/vendor/github.com/gogo/protobuf/protoc-gen-gogo \
go.pedge.io/protoeasy/vendor/github.com/gogo/protobuf/protoc-gen-gogofast \
go.pedge.io/protoeasy/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster \
go.pedge.io/protoeasy/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick \
go.pedge.io/protoeasy/vendor/github.com/gogo/letmegrpc/protoc-gen-letmegrpc
go.pedge.io/protoeasy/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick
export GO15VENDOREXPERIMENT=1
@@ -27,7 +27,6 @@ type options struct {
GoPluginType string
GogoModifiers []string
GogoPluginType string
LetmegrpcModifiers []string
OutDirPath string
NoFileCompileOptions bool
FileCompileOptionsPath string
@@ -267,31 +266,6 @@ func bindCompileOptions(flagSet *pflag.FlagSet, compileOptions *protoeasy.Compil
false,
"Pass --include_imports to protoc.",
)
flagSet.BoolVar(
&compileOptions.Letmegrpc,
"letmegrpc",
false,
"Output letmegrpc files.",
)
flagSet.StringVar(
&compileOptions.LetmegrpcRelOut,
"letmegrpc-rel-out",
"",
"The directory, relative to the output directory, to output letmegrpc files.",
)
flagSet.StringVar(
&compileOptions.LetmegrpcImportPath,
"letmegrpc-import-path",
"",
"Letmegrpc package.",
)
flagSet.BoolVar(
&compileOptions.LetmegrpcNoDefaultModifiers,
"letmegrpc-no-default-modifiers",
false,
"Do not set the default Mfile=package modifiers for --letmegrpc_out.",
)
}
func bindOptions(flagSet *pflag.FlagSet, options *options) {
@@ -319,12 +293,6 @@ func bindOptions(flagSet *pflag.FlagSet, options *options) {
"gogofast",
fmt.Sprintf("The gogo protoc plugin to use, allowed values are %s.", strings.Join(protoeasy.AllGogoPluginTypeSimpleStrings(), ",")),
)
flagSet.StringSliceVar(
&options.LetmegrpcModifiers,
"letmegrpc-modifier",
[]string{},
"Extra Mfile=package modifiers for --letmegrpc_out, specify just as file=package to this flag.",
)
flagSet.StringVar(
&options.OutDirPath,
"out",
@@ -376,11 +344,6 @@ func optionsToCompileOptions(options *options, compileOptions *protoeasy.Compile
return err
}
compileOptions.GogoModifiers = gogoModifiers
letmegrpcModifiers, err := getModifiers(options.LetmegrpcModifiers)
if err != nil {
return err
}
compileOptions.LetmegrpcModifiers = letmegrpcModifiers
// TODO(pedge): this should not be in this function
// TODO(pedge): duplicated logic in goPlugin struct
if compileOptions.NoDefaultIncludes {
@@ -98,8 +98,6 @@ func toCompileOptionsV1(from *FileCompileOptions) (*CompileOptions, error) {
to.Ruby = true
case "descriptor_set":
to.DescriptorSet = true
case "letmegrpc":
to.Letmegrpc = true
default:
return nil, fmt.Errorf("protoeasy: unknown plugin: %s", plugin)
}
@@ -148,10 +146,6 @@ func toCompileOptionsV1(from *FileCompileOptions) (*CompileOptions, error) {
to.DescriptorSetRelOut = from.Options.DescriptorSet.RelOut
to.DescriptorSetFileName = from.Options.DescriptorSet.FileName
to.DescriptorSetIncludeImports = from.Options.DescriptorSet.IncludeImports
to.LetmegrpcRelOut = from.Options.Letmegrpc.RelOut
to.LetmegrpcImportPath = from.Options.Letmegrpc.ImportPath
to.LetmegrpcNoDefaultModifiers = from.Options.Letmegrpc.NoDefaultModifiers
to.LetmegrpcModifiers = from.Options.Letmegrpc.Modifiers
// TODO(pedge): this should not be in this function
// TODO(pedge): duplicated logic in goPlugin struct
if to.NoDefaultIncludes {
@@ -39,9 +39,6 @@ func getPlugins(compileOptions *CompileOptions) []plugin {
if compileOptions.DescriptorSet {
plugins = append(plugins, newDescriptorSetPlugin(compileOptions))
}
if compileOptions.Letmegrpc {
plugins = append(plugins, newLetmegrpcPlugin(compileOptions))
}
return plugins
}
@@ -89,24 +86,6 @@ func newGogoPlugin(options *CompileOptions) plugin {
)
}
func newLetmegrpcPlugin(options *CompileOptions) plugin {
if options == nil {
options = &CompileOptions{}
}
return newBaseGoPlugin(
options,
options.LetmegrpcRelOut,
"letmegrpc",
"letmegrpc",
defaultGogoModifierOptions,
options.LetmegrpcNoDefaultModifiers,
options.LetmegrpcModifiers,
options.LetmegrpcImportPath,
"",
false,
)
}
func newObjcPlugin(options *CompileOptions) plugin {
return newGrpcPlugin("objc", "objective_c", options, options.ObjcRelOut)
}
@@ -92,12 +92,6 @@ type FileCompileOptions struct {
FileName string `json:"file_name,omitempty" yaml:"file_name,omitempty"`
IncludeImports bool `json:"include_imports,omitempty" yaml:"include_imports,omitempty"`
} `json:"descriptor_set,omitempty" yaml:"descriptor_set,omitempty"`
Letmegrpc struct {
RelOut string `json:"rel_out,omitempty" yaml:"rel_out,omitempty"`
ImportPath string `json:"import_path,omitempty" yaml:"import_path,omitempty"`
NoDefaultModifiers bool `json:"no_default_modifiers,omitempty" yaml:"no_default_modifiers,omitempty"`
Modifiers map[string]string `json:"modifiers,omitempty" yaml:"modifiers,omitempty"`
} `json:"letmegrpc,omitempty" yaml:"letmegrpc,omitempty"`
} `json:"options,omitempty" yaml:"options,omitempty"`
}
Oops, something went wrong.

0 comments on commit e3f6c9b

Please sign in to comment.