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

Update for bazel 0.27.0 - #30

Merged
siddharthab merged 4 commits into
grailbio:masterfrom
keith:ks/add-ctx
Jun 25, 2019
Merged

siddharthab merged 4 commits into
grailbio:masterfrom
keith:ks/add-ctx

Conversation

@keith

@keith keith commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator

This is required as of bazel 0.27.0 bazelbuild/bazel#7793

@keith

keith commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator Author

The test failure here doesn't appear to be related to this change, but I'm not sure why it's red but master is green

@soonho-tri

Copy link
Copy Markdown
Contributor

@keith , could you also add the following to make it work with bazel-0.27.0?

diff --git a/aspects.bzl b/aspects.bzl
index de71af6..9419950 100644
--- a/aspects.bzl
+++ b/aspects.bzl
@@ -73,9 +73,9 @@ def _is_objcpp_target(srcs):
 def _sources(target, ctx):
     srcs = []
     if "srcs" in dir(ctx.rule.attr):
-        srcs += [f for src in ctx.rule.attr.srcs for f in src.files]
+        srcs += [f for src in ctx.rule.attr.srcs for f in src.files.to_list()]
     if "hdrs" in dir(ctx.rule.attr):
-        srcs += [f for src in ctx.rule.attr.hdrs for f in src.files]
+        srcs += [f for src in ctx.rule.attr.hdrs for f in src.files.to_list()]

     if ctx.rule.kind == "cc_proto_library":
         srcs += [f for f in target.files if f.extension in ["h", "cc"]]

@keith

keith commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator Author

I've added those but also another case, I hadn't run with this yet, thanks! I'm still trying to get CI green too

14.04 is no longer supported by bazel bazelbuild/bazel#8652
@keith keith mentioned this pull request Jun 25, 2019
@keith keith changed the title Add ctx to cc_common.configure_features Update for bazel 0.27.0 Jun 25, 2019
@keith

keith commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator Author

Alright we're all green here now!

@keith

keith commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator Author

I'm also testing this update on Envoy envoyproxy/envoy#7391

@soonho-tri

Copy link
Copy Markdown
Contributor

Nice, thanks!

@keith

keith commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator Author

Any chance this could get merged and a new release can be cut? The former being more important to us so we don't have to point to my short-term fork

@siddharthab

Copy link
Copy Markdown
Collaborator

Thank you everyone for your help in maintaining this project.

I have tried to set up bazelisk for this project so I can catch upcoming breaking changes, but have not got around to github API limits for getting bazel releases and issue list.

@siddharthab
siddharthab merged commit fd92bf3 into grailbio:master Jun 25, 2019
@keith
keith deleted the ks/add-ctx branch June 25, 2019 23:34
@keith

keith commented Jun 25, 2019

Copy link
Copy Markdown
Collaborator Author

@siddharthab I just added bazelisk support for a github API token to work around this bazelbuild/bazelisk#62 so you should be able to do that now!

@siddharthab

Copy link
Copy Markdown
Collaborator

Oh awesome! Thanks. I will update this project to start using bazelisk, and ask Travis to run the tests at least once every week to learn about upcoming breaking changes.

This pull request is now included in release 0.3.5.

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.

3 participants