Closed
Description
There is significant overlap between replace
directives and the vendor
directory, and users sometimes conflate the two (#29079 (comment)).
Since go mod vendor
removes and replaces the entire contents of the vendor
directory, it will fail (or at least produce very confusing behavior) if a replace
directive points into vendor
. We should detect that condition explicitly and emit a useful error.
(CC @jayconrod)