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

[Project] Add method to stabilize UUIDs #283

Merged
merged 11 commits into from
Jul 1, 2015
Merged

Conversation

segiddins
Copy link
Member

Closes #175

@segiddins
Copy link
Member Author

\c @alloy @kylef @orta @neonichu @mrackwitz

I know the diff is small, and it needs some more tests, but I think it works.

@orta
Copy link
Member

orta commented Jun 28, 2015

cool!

@alloy
Copy link
Member

alloy commented Jun 28, 2015

Awesome!

Yeah I'd like to see some tests for various types of objects.

The doc should also state that it changes the uuids of objects and thus the user should not depend on being able to find them by uuid afterwards.

@neonichu
Copy link
Member

Awesome 🎉

@zats
Copy link

zats commented Jun 28, 2015

Hi, I'm sorry to intrude, just wanted to mention that original Xcode PBXObject ID generation can be found under DevToolsSupport.framework +[NSString stringWithHexadecimalRepresentationOfUniqueIdentifier] if that is of any relevance 😳

And a question regarding your logic of UUID generation: if I have two references pointing to the same file in the project, does it mean the generated UUID will be the same for both of them?
Thanks!

@segiddins
Copy link
Member Author

@zats the issue with Xcode's UUID generation is that it's meant to be unique -- it includes a time stamp component.

As to your question, they shouldn't be -- thanks to the distinction between PBXFileReferences and PBXBuildFiles, this should be fine.

@zats
Copy link

zats commented Jun 28, 2015

oh I see, thanks for the explanation!

@segiddins segiddins force-pushed the seg-predictable-uuids branch 2 times, most recently from 85ed1eb to 70e9365 Compare June 28, 2015 22:17
@@ -409,6 +410,12 @@ def uuids
objects_by_uuid.keys
end

# @note this should only be used for entirely machine-generated projects
#
def predictabilize_uuids
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a counter-part PR using this in CocoaPods?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member Author

Choose a reason for hiding this comment

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

@segiddins segiddins force-pushed the seg-predictable-uuids branch from 70e9365 to 44ec7bc Compare June 30, 2015 23:28
@segiddins segiddins force-pushed the seg-predictable-uuids branch from 44ec7bc to 010224e Compare June 30, 2015 23:46
segiddins added a commit that referenced this pull request Jul 1, 2015
[Project] Add method to stabilize UUIDs
@segiddins segiddins merged commit 4fabf08 into master Jul 1, 2015
@segiddins segiddins deleted the seg-predictable-uuids branch July 1, 2015 00:58
@mrousavy
Copy link

I think I'm experiencing an issue with deterministic UUIDs here, do you have an idea what might be wrong here @segiddins ?

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.

Deterministic UUIDs
7 participants