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

Support Well Known Types #4

Open
Dig-Doug opened this issue Oct 21, 2019 · 5 comments · May be fixed by #11
Open

Support Well Known Types #4

Dig-Doug opened this issue Oct 21, 2019 · 5 comments · May be fixed by #11
Labels
help wanted Extra attention is needed

Comments

@Dig-Doug
Copy link
Owner

Originally:

The well known protos are in an external repository so we need to add some logic to handle the different paths.

@pfgallagher
Copy link
Contributor

@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!

@mc0
Copy link
Contributor

mc0 commented Feb 18, 2021

I was also bit by this and would be happy to contribute toward the functionality.

@Dig-Doug
Copy link
Owner Author

Thanks @pfgallagher - If you could submit a PR that would be awesome. #11 seems to be stale.

@pfgallagher
Copy link
Contributor

Sure thing; should be able to take a look sometime this weekend.

@tsawada
Copy link
Contributor

tsawada commented Jun 2, 2021

Hi @pfgallagher, thanks for your PR. This fix is essential for my usecase. Are you still interested in merging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants