-
Notifications
You must be signed in to change notification settings - Fork 44
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
editorial: fix Script.InternalId type #583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's defined as a unique integer in the prose, so on its own this change seems wrong (and suggests any change here requires more justification than just "editorial")
"Firefox and Chrome return strings" seems like a good justification BTW. But do they return strings that represent integers? If so it seems unfortunate because people will probably do |
Oh, we do it totally wrong then. In Firefox we send a UUID as value for |
If we're returning a UUID already that somewhat alleviates the concern (we can just change the prose to say "globally unique string"). My worry is that in cases where we just say "return a string" and everyone is returning (say) an integer then clients depend on it being an integer. I still worry a bit that we'll find cases where any client returning a string in a known, but unspecified, format will cause authors to depend on that format (e.g. Chrome returning the string representation of an integer will cause people to write tests that depend on the string representing an integer), but so far I don't think we have consensus that all ids should be UUIDs to avoid this problem. |
We are fine with making |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also need an update to the very hard to read sentence:
Let internal id be a unique across the internalId fields of the values of serialization internal map integer.
Let internal id be the string representation of a UUID based on truly random, or pseudo-random numbers. |
5d4fe0e
to
b38a24c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as well now. Thanks!
@jgraham can you please update your review status? Merging is blocked because you requested changes. Thanks! |
We always define Ids as text, this is an exception, we should change this.
Note: Both Chromium and Firefox return strings atm
Preview | Diff