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

xcodeproj_extensions: fix wrong serialization with swift package target. #112

Merged

Conversation

barakwei
Copy link
Member

@barakwei barakwei commented Dec 25, 2023

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";
		};

Copy link
Collaborator

@byohay byohay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FSM

lib/kintsugi/xcodeproj_extensions.rb Outdated Show resolved Hide resolved
lib/kintsugi/xcodeproj_extensions.rb Outdated Show resolved Hide resolved
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";
		};
@barakwei barakwei force-pushed the feature/swift-package-proudct-plugin-fix branch from ead24ec to d6e638b Compare December 29, 2023 13:34
@barakwei barakwei merged commit 39e30cf into Lightricks:main Dec 29, 2023
4 checks passed
@barakwei barakwei deleted the feature/swift-package-proudct-plugin-fix branch December 29, 2023 15:20
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.

2 participants