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

feat(bazel): Retain extra_opts in C# rule #161

Merged
merged 1 commit into from
May 16, 2023

Conversation

jskeet
Copy link
Collaborator

@jskeet jskeet commented May 15, 2023

No description provided.

@jskeet jskeet added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 15, 2023
@jskeet jskeet requested a review from a team as a code owner May 15, 2023 15:21
@jskeet jskeet force-pushed the csharp_opts_tooling branch 6 times, most recently from bb0db16 to cb6fd36 Compare May 15, 2023 16:19
@@ -346,6 +346,7 @@ load(

csharp_proto_library(
name = "library_csharp_proto",
extra_opts = ["base_namespace=Google.Cloud.AIPlatform.V1"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to add this attribute to the template file(s). Something like the following:

  extra_opts = [{{csharp_extra_opts}}],

Like what was done here

Then you will also need to add the code to populate the "template data" with the attribute "csharp_extra_opts", like what was done here

All of this means that we will have to generate an empty extra_opts attribute if it was not set at all :/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this means that we will have to generate an empty extra_opts attribute if it was not set at all :/

Urgh. Ah well... I don't think it'll do any harm. Thanks for the nudge - will have a look now...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think this is now ready. It required a certain amount of guesswork, as the order of attributes in the mustache-not-mustache file wasn't honored in some cases, but the tests now pass...

@jskeet jskeet force-pushed the csharp_opts_tooling branch 10 times, most recently from 6afab30 to 21ca9c8 Compare May 16, 2023 14:15
@jskeet jskeet removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 16, 2023
@jskeet jskeet enabled auto-merge (rebase) May 16, 2023 14:26
@jskeet jskeet disabled auto-merge May 16, 2023 14:26
@jskeet jskeet merged commit c6da643 into googleapis:main May 16, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants