dart-uuid icon indicating copy to clipboard operation
dart-uuid copied to clipboard

.v4 generator generate same key

Open oyakyazilim opened this issue 3 years ago • 7 comments

When I use your package always generate same key after second time...

oyakyazilim avatar Nov 26 '21 10:11 oyakyazilim

Having the same issue. Seems to be the case when called in a loop. Similar to old issue #8. I objects being created in a loop and every one of them has the same id when using Uuid().v4()

adamzemmoura avatar Jan 02 '22 22:01 adamzemmoura

Ugh ok, I will take a look at it tonight, you would think tests to catch this would catch it but they don't apparently. Need to add new tests once I figure out why this is happening.

Thanks for the additional report. I will get to this as soon as I can.

daegalus avatar Jan 02 '22 22:01 daegalus

Thanks for the quick reply @Daegalus but actually, you can disregard my report. It was my mistake! 🤦🏻‍♂️ Just tested it again when I corrected my mistake and it's working as expected. Sorry for the false alarm.

adamzemmoura avatar Jan 02 '22 22:01 adamzemmoura

Ok, I will leave this open just incase there are other reports, but thanks for confirming. I have yet to find anything, so I will consider this a maybe bug until I get more reports.

daegalus avatar Jan 02 '22 23:01 daegalus

@adamzemmoura if you don't mind, could you post what your mistake was. I would like to use this library, but leaving something like this open doesn't improve my confidence.

notandyvee avatar Jan 17 '22 15:01 notandyvee

Ok, I will leave this open just incase there are other reports, but thanks for confirming. I have yet to find anything, so I will consider this a maybe bug until I get more reports.

I got duplicates too

josh4500 avatar Jun 11 '22 22:06 josh4500

Ok, I will leave this open just incase there are other reports, but thanks for confirming. I have yet to find anything, so I will consider this a maybe bug until I get more reports.

I got duplicates too

Can you provide example code so I can reproduce it? Or how you are using the library? If I can reproduce it, I can more likely fix it. So far all reports have been incorrect usage of the library. Not saying that's the case, but an example would help. I specifically have a test that generates millions of UUIDs to test for collisions and duplicates, and it passes.

daegalus avatar Jun 12 '22 01:06 daegalus

I am closing this issue as 4.0.0-beta1 has a refactor/redesign of the code. If anyone encounters duplicates, please open a new issue, I have not gotten any new reports of anyone getting duplicates.

daegalus avatar Nov 13 '22 09:11 daegalus