Skip to content
This repository was archived by the owner on Mar 17, 2024. It is now read-only.

handle generated headers and virtual_includes via output_group#58

Merged
siddharthab merged 3 commits intograilbio:masterfrom
lizan:virtual_includes
Aug 1, 2020
Merged

handle generated headers and virtual_includes via output_group#58
siddharthab merged 3 commits intograilbio:masterfrom
lizan:virtual_includes

Conversation

@lizan
Copy link
Copy Markdown
Contributor

@lizan lizan commented Jul 30, 2020

Define a output group header_files contains all headers needed by the target including generated ones, virtual_includes. This will let Bazel generate header files when necessary (for example, cc_proto_library), and setup virtual_includes directories as well.

Fixes #29.

Signed-off-by: Lizan Zhou lizan@tetrate.io

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
@lizan
Copy link
Copy Markdown
Contributor Author

lizan commented Jul 30, 2020

CI failure looks unrelated

@siddharthab
Copy link
Copy Markdown
Collaborator

Thanks for the change! I am surprised it was really this simple.

CI tests are good. I have to make the macOS tests more robust to XCode version changes. Also, migration tests always fail because of the way bazelisk fetches the list of flags; I have to check if there is a better way to check that.

I will take a more detailed look in a bit.

@lizan lizan changed the title handle generated headers avirtual_includes via output_group handle generated headers and virtual_includes via output_group Jul 31, 2020
@lizan
Copy link
Copy Markdown
Contributor Author

lizan commented Jul 31, 2020

Yeah I was surprised too when I was look into this. This make our compilation generation much faster. We used to run bazel build before generation just to make sure headers are generated.

@siddharthab siddharthab merged commit 3e01515 into grailbio:master Aug 1, 2020
siddharthab pushed a commit that referenced this pull request Aug 1, 2020
Define a output group `header_files` containing all headers needed
recursively by the target. This will let Bazel generate header files
when necessary (for example, cc_proto_library), and setup
virtual_includes directories as well (for example, when using
strip_include_prefix and include_prefix attribute).

Fixes #29.

Co-authored-by: Siddhartha Bagaria <sbagaria@grailbio.com>
@siddharthab
Copy link
Copy Markdown
Collaborator

Sorry, I force pushed a commit fixing the commit message in the original commit. That's why the PR shows two commits.

@siddharthab
Copy link
Copy Markdown
Collaborator

Thanks @lizan !

@lizan lizan deleted the virtual_includes branch August 1, 2020 02:16
@lizan lizan restored the virtual_includes branch August 1, 2020 02:16
@lizan lizan deleted the virtual_includes branch August 1, 2020 02:16
@lizan
Copy link
Copy Markdown
Contributor Author

lizan commented Aug 1, 2020

No worries, thanks for merging!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle strip_include_prefix and include_prefix attributes

2 participants