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

fix: order for XCLocalSwiftPackageReference and XCRemoteSwiftPackageReference #855

Merged

Conversation

kimdv
Copy link
Collaborator

@kimdv kimdv commented Sep 17, 2024

Short description 📝

In Xcode when writing to a project file, there was a diff in this example because it changed order.

/* Begin XCLocalSwiftPackageReference section */
		C39110C82C9A049500FE53C5 /* XCLocalSwiftPackageReference "../packages/Identifier" */ = {
			isa = XCLocalSwiftPackageReference;
			relativePath = "../packages/Identifier";
		};
/* End XCLocalSwiftPackageReference section */

/* Begin XCRemoteSwiftPackageReference section */
		C39110C72C9A047700FE53C5 /* XCRemoteSwiftPackageReference "swift-algorithms" */ = {
			isa = XCRemoteSwiftPackageReference;
			repositoryURL = "https://github.com/apple/swift-algorithms.git";
			requirement = {
				kind = upToNextMajorVersion;
				minimumVersion = 1.2.0;
			};
		};
/* End XCRemoteSwiftPackageReference section */

This example above is how it looks when it's made with Xcode.

Solution 📦

The solution was pretty simple. Just move XCLocalSwiftPackageReference and XCRemoteSwiftPackageReference around.

Implementation 👩‍💻👨‍💻

Just switched the code around.

@kimdv kimdv force-pushed the kimdv/change-order-of-local-and-remote-packages branch from d33d22f to b380040 Compare September 17, 2024 19:00
@kimdv kimdv changed the title Change order for Change order for XCLocalSwiftPackageReference and XCRemoteSwiftPackageReference Sep 17, 2024
@danieleformichelli
Copy link
Collaborator

So we are just fixing that we are creating the project the same way you would create if you change it from Xcode UI? Are we fixing an actual problem or it's just to be more consistent with it?

@kimdv
Copy link
Collaborator Author

kimdv commented Sep 21, 2024

There is no problem or bug. It's just to be consistent with how Xcode makes/arranges the project file.

@pepicrft pepicrft changed the title Change order for XCLocalSwiftPackageReference and XCRemoteSwiftPackageReference fix: order for XCLocalSwiftPackageReference and XCRemoteSwiftPackageReference Sep 26, 2024
@kimdv
Copy link
Collaborator Author

kimdv commented Sep 27, 2024

@pepicrft not sure why it fails on Linux but not macOS?

@pepicrft
Copy link
Contributor

@pepicrft not sure why it fails on Linux but not macOS?

Hey @kimdv. I'm not 100% sure. I'm doing some investigation trying to reproduce the issue locally. I'll report back once I figure out.

@pepicrft pepicrft merged commit 22eea63 into tuist:main Sep 27, 2024
6 checks passed
@pepicrft
Copy link
Contributor

@kimdv I could not reproduce it locally by running the tests through the Swift Docker image for version 5.10.1... So I decided to run the same script that one can run locally from macOS and that works fine.

@kimdv kimdv deleted the kimdv/change-order-of-local-and-remote-packages branch September 27, 2024 15:42
@pepicrft
Copy link
Contributor

@all-contributor add @kimdv for code

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