-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix configure_copts.bzl for non trasitive load in bazel 0.25 #301
Conversation
Hi @jinmel, Thanks for the fix. This looks good on our end. We're in the process of upgrading our bazel version internally, and I would like to hold off on merging this for day or two until we do that. I'll check back with this Thursday. |
@EricWF Let me know if there's any errors during upgrade. Thanks. |
@jinmel We didn't see the errors this PR mentions after performing the upgrade. It looks like the bazel changes that disable transitive loads were rolled back because it broke builds. Does that mean it won't make it into 0.25? /Eric |
@jinmel I don't think this change is correct. I upgraded to bazel 0.25.0 and don't see any errors.
But that's not what's happening here. The symbols this change is trying to re-export like |
@derekmauro @EricWF Didn't know they weren't meant to be exported. I think there are quite some repositories using those flags. The error was originally caused here: https://github.com/census-instrumentation/opencensus-cpp/blob/7c3607bb028beb1ce11b326c588e75c6cf19b094/opencensus/copts.bzl#L37 So over there we are trying to drop usage of internal flags and use DEFAULT_COPTS instead. But we are facing errors like this: census-instrumentation/opencensus-cpp@575ab11#r281957070 |
the select({...}) uses //absl:windows, //absl:llvm_compiler and importing this from other project causes error like: package 'absl' not found. |
What I meant was that I suspect you shouldn't be using |
@derekmauro so what you are saying is that we shouldn't import copts.bzl from other projects at all? |
I wouldn't import copts.bzl today, but I also think it is reasonable to request official support for the list of compiler warnings we use. We'd have to think about how to do this. If you want a quick fix, maybe you can import the options from https://github.com/abseil/abseil-cpp/blob/master/absl/copts/GENERATED_copts.bzl with the understanding that we might change the file in a way that breaks your project? |
@derekmauro we just did census-instrumentation/opencensus-cpp#316 |
@jinmel it looks like census-instrumentation/opencensus-cpp#316 resolves this issue for you, so I'm closing this PR. Please let us know if you have any concerns. |
Fix copts for compatibility with bazel 0.25 update
bazelbuild/bazel#5636