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

swift_package_product_dependency: override ascii_plist_annotation. #932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GalBerezansky
Copy link

We have a build plugin which is a Swift package, it's represented as a XCSwiftPackageProductDependency object. The display name contains a "plugin:" prefix so when it's serialized it's everywhere. The problem is that Xcode removes this prefix and uses the package name in the keys of the serialized objects and in refs to them.

Below is an example before and after the change.

before (wrong):

/* Begin XCSwiftPackageProductDependency section */
		19AA76E52A9F557900F1F6A1 /* plugin:SomePackageName */ = {
			isa = XCSwiftPackageProductDependency;
			productName = "plugin:SomePackageName";
		};

after (correct):

/* Begin XCSwiftPackageProductDependency section */
		19AA76E52A9F557900F1F6A1 /* SomePackageName */ = {
			isa = XCSwiftPackageProductDependency;
			productName = "plugin:SomePackageName";
		};

We have a build plugin which is a Swift package, it's represented as a
`XCSwiftPackageProductDependency` object. The display name contains a "plugin:"
prefix so when it's serialized it's everywhere. The problem is that Xcode
removes this prefix and uses the package name in the keys of the serialized
objects and in refs to them (in the comments).

Below is an example before and after the change.

before (wrong):
```
/* Begin XCSwiftPackageProductDependency section */
		19AA76E52A9F557900F1F6A1 /* plugin:SomePackageName */ = {
			isa = XCSwiftPackageProductDependency;
			productName = "plugin:SomePackageName";
		};
```
after (correct):
```
/* Begin XCSwiftPackageProductDependency section */
		19AA76E52A9F557900F1F6A1 /* SomePackageName */ = {
			isa = XCSwiftPackageProductDependency;
			productName = "plugin:SomePackageName";
		};
```
@GalBerezansky
Copy link
Author

The .delete_prefix('plugin:') is a little meh but I couldn't find a better solution for this issue.

@GalBerezansky
Copy link
Author

@dnkoutso Can you take a look please? Thank you 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant