elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
104 stars 4.92k forks source link

Document rationale for `replace`d dependencies in `go.mod` #41084

Open ycombinator opened 1 month ago

ycombinator commented 1 month ago

The go.mod file in the Beats repository contains a number of dependencies in the replace directive block: https://github.com/elastic/beats/blob/e345f285634d1478874a9a0ca8e4aab3611d33d4/go.mod#L412-L425

Over 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.

botelastic[bot] commented 1 month ago

This issue doesn't have a Team:<team> label.

mauri870 commented 1 month ago

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.