rules_typescript_proto
rules_typescript_proto copied to clipboard
Support Well Known Types
Originally:
The well known protos are in an external repository so we need to add some logic to handle the different paths.
@Dig-Doug — I just wanted to let you know that #11 appears mostly compatible with the changes from your nested directories fix for #142. The only thing that needs to be done differently is clearing relative_path if workspace_root isn't empty, i.e.
for src in target[ProtoInfo].direct_sources:
relative_path = _get_path_relative_to_build(ctx, src)
# workspace_root is empty for our local workspace, or external/other_workspace
# for @other_workspace//
if ctx.label.workspace_root == "":
file_name = src.basename[:-len(src.extension) - 1]
else:
relative_path = "" # <---
file_name = _proto_path(src)[:-len(src.extension) - 1]
It looks like there have been some changes to the directory structure, too. @kellycampbell, do you mind updating your PR accordingly? Otherwise, I can certainly make my own that incorporates your changes. Thank you!
I was also bit by this and would be happy to contribute toward the functionality.
Thanks @pfgallagher - If you could submit a PR that would be awesome. #11 seems to be stale.
Sure thing; should be able to take a look sometime this weekend.
Hi @pfgallagher, thanks for your PR. This fix is essential for my usecase. Are you still interested in merging?