Skip to content

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Feb 25, 2021

motivation: package identity is critical to SwiftPM ability to dedup package reliably

changes:

  • use package identity instead of manifest name to flatten the dependencies list
  • add more test for duplicate identity permutations across identity derived from URL and manifest name

motivation: package identity is critical to SwiftPM ability to dedup package reliably

changes:
* use package identity instead of manifest name to flatten the dependencies list
* add more test for duplicate identity permutations across identity derived from URL and manifest name
@tomerd
Copy link
Contributor Author

tomerd commented Feb 25, 2021

@swift-ci please smoke test

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Feb 25, 2021
}
}
allManifests = flattenedManifests.values.sorted(by: { $0.manifest.name < $1.manifest.name })
allManifests = flattenedManifests.values.sorted(by: { identityResolver.resolveIdentity(for: $0.manifest.packageLocation) < identityResolver.resolveIdentity(for: $1.manifest.packageLocation) })
Copy link
Contributor

@abertelrud abertelrud Feb 25, 2021

Choose a reason for hiding this comment

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

How expensive is the identity resolution (in theory, once it's complete, regardless of the current implementation)? Should it be cached so that it isn't recomputed inside the comparison closure?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, eventually it will be cached by the resolver itself.

@tomerd tomerd merged commit 5faf3b1 into swiftlang:main Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants