marcohu / rules_antlr

ANTLR rules for Bazel
Apache License 2.0
26 stars 36 forks source link

Directory issue with Python3 use #11

Open movelazar opened 3 years ago

movelazar commented 3 years ago

When I make my rule, doing

antlr(
    name = "simple_boolean",
    srcs = ["SimpleBoolean.g4"],
    language = "Python3",
    listener = False,
    visitor = True,
)

it puts the generated files into:

bazel-bin/utils/rule_engine/simple_boolean.py

Am I missing something about doing python imports? I can't find a way to import a package that has a . in it. But I see the code this is very explicitly doing this step. What am I missing to be able to then import and use these generated files?

It works fine when I run antlr myself, instead of via this.

It works fine in my golang side implementation.

Thanks for any help.