Conversation
shims.bzl
Outdated
| for l in languages: | ||
| if False: | ||
| pass | ||
| else: | ||
| print("FIXME(buck2-shims-meta): unsupported thrift languages: {}".format(", ".join(unsupported))) |
There was a problem hiding this comment.
Shouldn't this do something simpler? Why if False? Why log each language if we don't support any of them?
There was a problem hiding this comment.
The way I've seen similar code implemented, it loops over languages and has a bunch of
if l == "cpp":
gen_for_cpp()
elif l == "rust":
gen_for_rust()
else:
print("unsupported language: {}".format(l))
The log message was helping me keep track of what else I had to do as I tried an open-source implementation of rust.
Happy to just make this log an error message if you'd prefer. Let me know.
There was a problem hiding this comment.
Actually wait, does this code work? When is unsupported ever written to? Shouldn't you format with l instead?
|
@bigfootjon has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
shims.bzl
Outdated
| for l in languages: | ||
| if False: | ||
| pass | ||
| else: | ||
| print("FIXME(buck2-shims-meta): unsupported thrift languages: {}".format(", ".join(unsupported))) |
There was a problem hiding this comment.
Actually wait, does this code work? When is unsupported ever written to? Shouldn't you format with l instead?
|
Code fixed. Sorry about that -- was moving too fast. |
|
@bigfootjon has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: Pull Request resolved: facebook/buck2-shims-meta#10 Reviewed By: sdwilsh Differential Revision: D77232708 Pulled By: bigfootjon fbshipit-source-id: 590a758856fbaf1d570df8c9161dd6c4c4123e96
Summary: Pull Request resolved: #10 Reviewed By: sdwilsh Differential Revision: D77232708 Pulled By: bigfootjon fbshipit-source-id: 590a758856fbaf1d570df8c9161dd6c4c4123e96
No description provided.