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

data attributes are not propagated from objc_library to cc_library or cc_binary #16270

Open
senchangniantic opened this issue Sep 13, 2022 · 6 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-ObjC Issues for Objective-C maintainers type: bug

Comments

@senchangniantic
Copy link

Description of the bug:

When building a cc_binary with objc_library as dependency , the data in objc_library is not copied as runfile for the cc_binary.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Archive.zip

Which operating system are you running Bazel on?

macOS 12.2.1 on m1

What is the output of bazel info release?

release 5.2.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

#11425 is possibly related

Any other information, logs, or outputs that you want to share?

No response

@oquenchil oquenchil added P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-ObjC Issues for Objective-C maintainers and removed untriaged team-Rules-CPP Issues for C++ rules labels Oct 26, 2022
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Dec 31, 2023
@keith keith removed the stale Issues or PRs that are stale (no activity for 30 days) label Jan 4, 2024
@yyuting
Copy link

yyuting commented Oct 11, 2024

Hello, I'm having the same issue with release 7.1.0. Have you found a workaround? Thanks.

@jiawen
Copy link
Contributor

jiawen commented Oct 11, 2024

@keith Does this have anything to do with the Objective-C transition (#16870)?

@yyuting On the basis of just a hunch, you can try --incompatible_disable_objc_library_transition. It will probably break numerous other things in your larger project however.

@keith
Copy link
Member

keith commented Oct 12, 2024

I don't think so but I haven't tested. I assume that there's somewhere in the data collection that's only looking at certain rule types but I haven't looked. I imagine if we could find the spot it could be an easy fix

@fmeum
Copy link
Collaborator

fmeum commented Oct 12, 2024

Looking at objc_library.bzl, it doesn't seem to be doing anything with ctx.attr.data and instead only returns the output archives as data_runfiles (which also seems unnecessary).

@keith
Copy link
Member

keith commented Oct 12, 2024

I imagine data has mostly been ignored there because most apple app resources are handled differently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-ObjC Issues for Objective-C maintainers type: bug
Projects
None yet
Development

No branches or pull requests

7 participants