@@ -132,7 +132,7 @@ func isProtoLibrary(r *rule.Rule) bool {
132132func importsProtoLibrary (cfg * pythonconfig.Config , r * rule.Rule , f * rule.File ) []resolve.ImportSpec {
133133 specs := []resolve.ImportSpec {}
134134
135- // First, determine the root module and emit an import for that,
135+ // Determine the root module and emit an import for that,
136136 // i.e. for //foo:foo_py_pb2, we'd get foo.foo_pb2
137137 protoRuleAttr := r .PrivateAttr (protoKey )
138138 protoRelAttr := r .PrivateAttr (protoRelKey )
@@ -146,18 +146,6 @@ func importsProtoLibrary(cfg *pythonconfig.Config, r *rule.Rule, f *rule.File) [
146146
147147 specs = append (specs , importSpecFromSrc (cfg .PythonProjectRoot (), protoRel , generatedPbFileName ))
148148
149- // TODO: use parsed proto FileInfo to enumerate importable constants, like messages,
150- // and emit ImportSpec for them
151- // protoPkg := r.PrivateAttr(proto.PackageKey).(proto.Package)
152- // for _, protoFileInfo := range protoPkg.Files {
153- // for _, svc := range protoFileInfo.Services {
154- // specs = append(specs, resolve.ImportSpec{
155- // Lang: languageName,
156- // Imp: fmt.Sprintf("%s.%s", rootPath, svc),
157- // })
158- // }
159- // Repeat for Messages, Enums
160-
161149 return specs
162150}
163151
0 commit comments