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

Fixup UUID generation. #627

Merged

Conversation

sebastianv1
Copy link
Contributor

Support the ability to pass in a list of projects that can be used to generate deterministic UUIDs, and also initially pass into UUID generation the project basename such that we have unique UUIDs across all projects.

@sebastianv1 sebastianv1 force-pushed the sebastianv1/fixup-uuid-generation branch from 5b0ba90 to ea7ca0d Compare November 29, 2018 18:25
@amorde
Copy link
Member

amorde commented Nov 29, 2018

Adding support for generating UUIDs for multiple projects at once is a nice improvement, worth a CHANGELOG entry 👍

Copy link
Member

@segiddins segiddins left a comment

Choose a reason for hiding this comment

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

Changelog entry

UUIDGenerator.new([self]).generate!
end

def self.predictabilize_uuids(projects)
Copy link
Member

Choose a reason for hiding this comment

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

docs

new_objects_by_project = Hash[@projects.map do |project|
[project, switch_uuids(project)]
end]
all_new_objects_by_project = new_objects_by_project.values.map(&:values).flatten
Copy link
Member

Choose a reason for hiding this comment

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

flat_map(&:values)

end]
all_new_objects_by_project = new_objects_by_project.values.map(&:values).flatten
all_objects_by_uuid = @projects.map(&:objects_by_uuid).inject(:merge)
all_objects = @projects.map(&:objects).flatten
Copy link
Member

Choose a reason for hiding this comment

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

flat_map

@sebastianv1 sebastianv1 force-pushed the sebastianv1/fixup-uuid-generation branch 5 times, most recently from 118ecdc to b206b2b Compare November 29, 2018 22:05
Support the ability to pass in a list of projects that can be used to generate deterministic UUIDs, and also initially pass into UUID generation the project basename such that we have unique UUIDs across all projects.
@sebastianv1 sebastianv1 force-pushed the sebastianv1/fixup-uuid-generation branch from b206b2b to 9d46a32 Compare November 29, 2018 22:14
@segiddins segiddins merged commit ac6493b into CocoaPods:master Nov 30, 2018
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.

4 participants