-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
[BUG] Missing support for handling productRef file references #283
Comments
This issue has become stale, the required information has not been provided and it is been marked for closure in the next 5 days |
Thanks @davidohyer for this report. Could you add a small sample project to ease the debugging? |
This issue has become stale, the required information has not been provided and it is been marked for closure in the next 10 days |
This issue has become stale, the required information has not been provided and it is been marked for closure in the next 10 days |
I ran into the same issue when trying to add 3rd party frameworks to a project. It seems that build files for dependencies added via Swift Package Manager have a These attributes are defined in I'm currently trying to programatically add compiled libtorch c++ files as framework dependencies, following this tutorial, so this is hardly a minimal example but to create one:
This project will have the file = Path("my-custom-libtorch") / "install" / "lib" / "libtorch_cpu.a"
opts = FileOptions(
create_build_files=True,
ignore_unknown_type=False,
embed_framework=True,
code_sign_on_copy=True,
)
project.add_file(str(file), parent=frameworks, force=False, file_options=opts) Error happens in the if hasattr(build_file, "fileRef"):
... By adding a new file we cannot break targets that use In my case, adding System info:
|
Thanks @kowaalczyk for the detailed info. This should help to investigate the issue further. I don't think that simply wrapping the breaking call with a Good to know that |
@kronenthaler It looks like |
Also experiencing this issue. |
You are right, fixing that one line won't solve the problem entirely.
Are there any plans on implementing the support for One workaround would be to remove the package(s), alter the other files and re-add the package(s) again. For this to work we would need a remove_package function which currently does not exist, you can only add packages. Unfortunately the workaround mentioned by @kowaalczyk does not work for us, as we are running our script repeatedly to keep everything made/changed in the build chain up to date in the Xcode project. Anyway, thanks for the great work so far! Made our lives a lot easier;) |
Describe the bug
When using Swift Packages in a project, running this tool crashes due to the library being unsure of how to handle productRef file references. Below is an example line from a .pbxproj file that contains Swift Packages:
58AFD9DF24D2077900331519 /* Core in Frameworks */ = {isa = PBXBuildFile; productRef = 58AFD9DE24D2077900331519 /* Core */; };
And here is the trace error:
System information
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Remove the specified groups.
The text was updated successfully, but these errors were encountered: