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 issue that multiple products of the same package cannot be added #801

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

kevin-kp
Copy link
Contributor

Short description πŸ“

Currently, it does not seem to be possible to add two products from a single package using:

public func addSwiftPackage(repositoryURL: String,
                            productName: String,
                            versionRequirement: XCRemoteSwiftPackageReference.VersionRequirement,
                            targetName: String) throws -> XCRemoteSwiftPackageReference

This is because the duplicate check only takes the reference into account. It should also take the productName into account to make sure that a duplicate can exist of the same reference when the productName is different.

Solution πŸ“¦

Add the productName check to the if-test. No other solutions were considered.

Implementation πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

  • [ x] Add duplicate check
  • [ x] Fix unit tests

Copy link

netlify bot commented Nov 12, 2023

βœ… Deploy Preview for xcodeproj ready!

Name Link
πŸ”¨ Latest commit a630f1d
πŸ” Latest deploy log https://app.netlify.com/sites/xcodeproj/deploys/65512c2053dd830008443566
😎 Deploy Preview https://deploy-preview-801--xcodeproj.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

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

πŸ‘

@fortmarek fortmarek merged commit 447c159 into tuist:main Nov 21, 2023
9 checks passed
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

3 participants