Allow specifying a custom generated header name#350
Allow specifying a custom generated header name#350segiddins wants to merge 6 commits intobazelbuild:masterfrom
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
CLA should be handled |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
swift/internal/api.bzl
Outdated
| "generated_header_name": attr.string( | ||
| doc = """\ | ||
| The name of the generated Objective-C interface header. | ||
| If not provided, defaults to `${target_name}-Swift.h`. |
There was a problem hiding this comment.
The markdown documentation needs to be updated too. I think it's not auto-generated for now.
There was a problem hiding this comment.
It's generated, just with a script that we run internally (because it's a bunch of hacks held together with chewing gum that we don't want to publish). Now that Stardoc has come farther along, it may be viable to switch over to.
tl;dr: don't worry about updating the docs in this PR, we'll regenerate them.
swift/internal/api.bzl
Outdated
| "generated_header_name": attr.string( | ||
| doc = """\ | ||
| The name of the generated Objective-C interface header. | ||
| If not provided, defaults to `${target_name}-Swift.h`. |
There was a problem hiding this comment.
It's generated, just with a script that we run internally (because it's a bunch of hacks held together with chewing gum that we don't want to publish). Now that Stardoc has come farther along, it may be viable to switch over to.
tl;dr: don't worry about updating the docs in this PR, we'll regenerate them.
26230fa to
7469a85
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
@allevato I think the CLA bot is complaining because of your commit via suggested changes |
|
Yeah, you could work around that by squashing (I don't need to retain authorship of the suggestions) but since I have to pull the commit internally anyway to test it ultimately won't matter. Sorry for the delay on this—I've been in an internal team event all week, so I'll likely take a look at this on Monday. |
Co-Authored-By: Tony Allevato <tony.allevato@gmail.com>
7469a85 to
3b51def
Compare
|
Can we have this landed on the next release? :) |
|
Any updates on this? |
thii
left a comment
There was a problem hiding this comment.
Found some errors when trying this patch (the validation always failed).
| return actions.declare_file("{}-Swift.h".format(target_name)) | ||
| if header_name: | ||
| if not header_name.endswith(".h"): | ||
| fail(("The generated objc header name for {} must end in" + |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| fail(("The generated objc header name for {} must end in" + | ||
| " '.h', given '{}'") % (target_name, header_name)) | ||
| if header_name.find("/"): | ||
| fail(("The generated objc header name for {} cannot contain a " + |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Co-Authored-By: Thi <t@thi.im>
|
Sorry for the delay on this; in addition to being stretched a bit thin right now, I've been in the middle of refactoring these rules to support some future work that we need. I'll look at adding this change in as part of that so that you don't have to rebase it in on top of a completely changed implementation. |
|
@allevato I was wondering with Keith what was driving the refactoring. Are you able to comment on the referenced "future work"? |
The old design was based around the assumption that the only action we cared about was By refactoring the actions to be more granular, adding PCM actions will be cleaner because all I'll have to do is add the PCM action name to the appropriate subset of action configurators, and then wire in the action itself. It'll also pave the way for other improvements we've talked about but had to put off, like splitting out module compilation vs. object compilation. |
|
thanks! |
Co-authored-by: Samuel Giddins <segiddins@users.noreply.github.com> Closes #350. RELNOTES: None. PiperOrigin-RevId: 292413600
Co-authored-by: Samuel Giddins <segiddins@users.noreply.github.com> Closes #350. RELNOTES: None. PiperOrigin-RevId: 292413600
Co-authored-by: Samuel Giddins <segiddins@users.noreply.github.com> Closes bazelbuild#350. RELNOTES: None. PiperOrigin-RevId: 292541776
This is my first time contributing to this repo, and I couldn't find any guidelines on where or how to add tests.
This is an attempt to implement #346