blynn / nex

Lexer for Go
http://cs.stanford.edu/~blynn/nex/
GNU General Public License v3.0
416 stars 47 forks source link

Shake out more non-deterministic generation. #35

Closed dragonsinth closed 8 years ago

dragonsinth commented 8 years ago

https://github.com/blynn/nex/issues/22

drewwells commented 8 years ago

edges implements sort.Sort already. This seems to do the same thing that []*edges is doing but with a new type RuneSlice. Is there a test to show the non-deterministic behavior being solved by this change?

dragonsinth commented 8 years ago

I don't have a test, but I can repro it in our repo. If you need, I could put something together.

drewwells commented 8 years ago

Well might help isolate the problem. It would seem that the maps in use would be causing this. Not sure how this ordered slice replacing another ordered slice solved it.

On Thu, Dec 10, 2015 at 9:08 PM Scott Blum notifications@github.com wrote:

I don't have a test, but I can repro it in our repo. If you need, I could put something together.

— Reply to this email directly or view it on GitHub https://github.com/blynn/nex/pull/35#issuecomment-163824453.

drewwells commented 8 years ago

:+1: good call. I pulled a test to your branch with an md5 sum. It should align with the results from your change.

dragonsinth commented 8 years ago

Merged, nice work