)]}' { "commit": "2823f815b3c909fe0ef26d6e1b6145cf200ae16e", "tree": "f2fd3c0e9d531b8075320fcfa5fb0a803c3e1c08", "parents": [ "b038bf73c0076991a53e5f6dbf449815464cb356" ], "author": { "name": "Jay Conrod", "email": "jayconrod@google.com", "time": "Wed Feb 24 17:55:24 2021 -0500" }, "committer": { "name": "Dmitri Shuralyov", "email": "dmitshur@golang.org", "time": "Tue Mar 02 22:50:16 2021 +0000" }, "message": "[internal-branch.go1.16-vendor] modfile: defer fixing versions in retract directives\n\nVersionFixers require both a path and a version: if the version is\nnon-canonical (like a branch name), they generally need the path to\nlook up the proper version. This is fine for require, replace, and\nexclude directives, since the path is specified with each version. For\nretract directives, the path comes from the module directive, which\nmay appear later in the file. Previously, we just used the empty\nstring, but this breaks reasonable implementations.\n\nWith this change, we leave retracted versions alone until the file has\nbeen completely parsed, then we apply the version fixer to each\nretract directive. We report an error if retract is used without a\nmodule directive.\n\nFor golang/go#44496\n\nChange-Id: I99b7b8b55941c1fde4ee56161acfe854bcaf948d\nReviewed-on: https://go-review.googlesource.com/c/mod/+/296130\nTrust: Jay Conrod \u003cjayconrod@google.com\u003e\nRun-TryBot: Jay Conrod \u003cjayconrod@google.com\u003e\nTryBot-Result: Go Bot \u003cgobot@golang.org\u003e\nReviewed-by: Bryan C. Mills \u003cbcmills@google.com\u003e\n(cherry picked from commit 66bf157bf5bcd4cf5e82f17680e12c7fc873a2c1)\nReviewed-on: https://go-review.googlesource.com/c/mod/+/298010\nReviewed-by: Dmitri Shuralyov \u003cdmitshur@golang.org\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "8fcf96b713842761e45bdc3010b7ae12f265d794", "old_mode": 33188, "old_path": "modfile/rule.go", "new_id": "f8c9384985985929e27cda4acba115db0381d64e", "new_mode": 33188, "new_path": "modfile/rule.go" }, { "type": "modify", "old_id": "2381ee61c4e5569f91d9028ddcc1496839e65ce6", "old_mode": 33188, "old_path": "modfile/rule_test.go", "new_id": "96ef036e31db52350ebd95b62249b6944b4cd6d9", "new_mode": 33188, "new_path": "modfile/rule_test.go" } ] }