Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

name 'FileType' is not defined #258

Open
firstprayer opened this issue Jan 22, 2020 · 2 comments
Open

name 'FileType' is not defined #258

firstprayer opened this issue Jan 22, 2020 · 2 comments

Comments

@firstprayer
Copy link

Got an error saying "name 'FileType' is not defined"

$ bazel build :all  # In the root directory of this project
Starting local Bazel server and connecting to it...
ERROR: /Users/taiyuanz/Projects/rules_protobuf/protobuf/internal/proto_compile.bzl:745:21: name 'FileType' is not defined
ERROR: error loading package '': in /Users/taiyuanz/Projects/rules_protobuf/protobuf/rules.bzl: Extension 'protobuf/internal/proto_compile.bzl' has errors
ERROR: error loading package '': in /Users/taiyuanz/Projects/rules_protobuf/protobuf/rules.bzl: Extension 'protobuf/internal/proto_compile.bzl' has errors
INFO: Elapsed time: 1.751s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
    Fetching @bazel_tools; Restarting.
@unicell
Copy link

unicell commented Jan 22, 2020

The following patch should help

diff --git a/protobuf/internal/proto_compile.bzl b/protobuf/internal/proto_compile.bzl
index e48ce45..3512f59 100644
--- a/protobuf/internal/proto_compile.bzl
+++ b/protobuf/internal/proto_compile.bzl
@@ -742,7 +742,7 @@ proto_compile = rule(
       mandatory = False,
     ),
     "protos": attr.label_list(
-      allow_files = FileType([".proto"]),
+      allow_files = [".proto"],
     ),
     "includes": attr.string_list(),
     "excludes": attr.string_list(),

kevin3314 added a commit to kevin3314/rules_protobuf that referenced this issue Jan 29, 2020
fix by pubref#258
@timothyleung1
Copy link

having the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants