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

Use relative_path for local Swift packages #919

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

jsorge
Copy link
Contributor

@jsorge jsorge commented Sep 11, 2023

PR #911 added support for local packages but did not add support for the relativePath property inside of the local package definition. Here's a sample from my pbxproj file:

/* Begin XCLocalSwiftPackageReference section */
		93ED17092AAED02600B3DB25 /* XCLocalSwiftPackageReference "../../Packages/SharedResources" */ = {
			isa = XCLocalSwiftPackageReference;
			relativePath = ../../Packages/SharedResources;
		};

When I try to use the new local package model I got the following error: [!] Xcodeproj doesn't know about the following attributes {"relativePath"=>"../../Packages/SharedResources"} for the 'XCLocalSwiftPackageReference' isa. and I believe that was because the class was looking for path (which doesn't exist) and not relativePath which does.

This PR fixes that problem for local packages.

@dnkoutso
Copy link
Contributor

@jsorge can you have both path and relativePath? Why is the first one replaced?

@jsorge
Copy link
Contributor Author

jsorge commented Sep 11, 2023

@jsorge can you have both path and relativePath? Why is the first one replaced?

I replaced it because I didn’t see path as a thing that could be parsed from the project file. Happy to add it back if it could be there.

@dnkoutso
Copy link
Contributor

Wonder if an Xcode version upgrade replaced it or added it...................also wonder if there is harm in keeping both

@jsorge
Copy link
Contributor Author

jsorge commented Sep 11, 2023

Added it back @dnkoutso

@dnkoutso dnkoutso merged commit ea0cc26 into CocoaPods:master Sep 12, 2023
8 checks passed
@serbancoroiu
Copy link

Fixed in the last release, works now. Thanks!

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.

3 participants