Open ycombinator opened 1 month ago
This issue doesn't have a Team:<team>
label.
The linter and rationale are a welcome change. Replace directives also make a go package non go-installable and it is intended to be used mostly for development, see Russ Cox comment at https://github.com/golang/go/issues/44840#issuecomment-1651863470.
The
go.mod
file in the Beats repository contains a number of dependencies in thereplace
directive block: https://github.com/elastic/beats/blob/e345f285634d1478874a9a0ca8e4aab3611d33d4/go.mod#L412-L425Over time we should eliminate these replaced dependencies by contributing the changes from the replacing dependencies to the upstream ones they are replacing. If we can't do that, we should ensure the replacing dependency's source is located under the https://github.com/elastic organization. This work is tracked in https://github.com/elastic/beats/issues/41085.
Until we get around to doing the above, we should at least document for each dependency the rationale for replacing it with a fork.