{"push_id":1875797865,"size":1,"distinct_size":1,"ref":"refs/heads/dyncheck","head":"d337d1f36b82f9b6d25da3c3e8de746fb7c81d35","before":"74395b812a60086d999b90481894b54615fb65ff","commits":[{"sha":"d337d1f36b82f9b6d25da3c3e8de746fb7c81d35","author":{"name":"Joe Tsai","email":"c7874cf88bdcdb3475772e26193a8bfa7523fd74@digital-static.net"},"message":"Expand dynamic checks of options\n\nAdd checks for mutations of the input value and non-deterministic\ntransformer outputs.\n\nA prior approach (not shown in this commit) attempted to detect mutations of\nthe input by hashing the inputs before and after calling the option functions.\nHowever, we deemed this approach too restrictive since there are legitimate\ncases where some types lazily update their values upon first access\n(for example, accessing extensions on proto2 messages). This would cause the\nhashes to mismatch and provide a false-positive panic.\n\nIn this approach, we accept the reality that lazy evaluators exist, but make\nthe assumption that any lazy evaluators are protected by a mutex of some sort.\nThus, we simply run the option function twice in parallel, and let the race\ndetector detect mutations on the input. We intentionally run the options\nin a function named detectRaces to make it obvious from the stack trace\nwhat's going wrong.\n\nFor the detection of deterministic output of Transformers, we still assume\nthat behavior similar to reflect.DeepEqual is still a valid approach.\nHowever, to simplify the implementation, we just use a hash-based approach\nthat hashes two values and ensure that the hashes are equal. It is okay\nif the comparison from the hashes has false-negatives.","distinct":true,"url":"https://api.github.com/repos/google/go-cmp/commits/d337d1f36b82f9b6d25da3c3e8de746fb7c81d35"}]}
{"actor":{"display_login":"dsnet"}}