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

Pub and minor syntax updates #1

Merged
merged 1 commit into from Sep 3, 2012
Merged

Conversation

thomasuster
Copy link
Contributor

I added pub files to both the library and the test application. This should allow others to import your lib as well as run the test with greater ease. (http://www.dartlang.org/docs/pub-package-manager/versioning.html)

I also added some minor syntax changes relates to API changes. Math.random is now seeded with date.millisecondsSinceEpoch.

…ub install. Fixed Try catch syntax anFixed try catch syntax and math.random syntax
@daegalus
Copy link
Owner

daegalus commented Sep 3, 2012

Looks good to me, Have been busy lately so I haven't been paying attentions to recent updates to Pub. If you can, can you update the readme.md where necessary with the new Pub stuff. If not, I will do it a bit later myself when I get some time.

daegalus added a commit that referenced this pull request Sep 3, 2012
Pub and minor syntax updates
@daegalus daegalus merged commit e920ae5 into daegalus:master Sep 3, 2012
@thomasuster
Copy link
Contributor Author

Pub is still pretty janky on windows so I'm going to try a sanity check on Ubunto before updating the read me.

@daegalus
Copy link
Owner

daegalus commented Sep 5, 2012

I just added UUIDv5 locally, and while I was working with it, I found that your time seed to math.random broke v4 uuids. At least it does on my Mac.

95686cd4-9568-4cd4-9568-6cd495686cd4
^^^^     ^^^^      ^^^^     ^^^^
1c4d923d-1c4d-423d-9c4d-923d1c4d923d
^^^^     ^^^^      ^^^^     ^^^^

Since the seed is optional, i set it to Math.Random() without a seed, and it fixed the problem right away. I will submit code in a little bit.

@thomasuster
Copy link
Contributor Author

Ahh, my bad. Unit tests were passing but most likely I missed something. Good catch.

@daegalus
Copy link
Owner

daegalus commented Sep 5, 2012

No worries, actually, there are no unit-tests for v4 because they are always random, and they never use the same seed. If i try to use a same seed, if something like that breaks, it still won't be caught, because the same logic will produce the same UUID for that seed.

Edit: Actually, ignore that, I can just compare it to a string fo what its supposed to be. I'll add the test now before commiting in a bit.

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

2 participants