Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document rationale for replaced dependencies in go.mod #41084

Open
ycombinator opened this issue Oct 2, 2024 · 2 comments
Open

Document rationale for replaced dependencies in go.mod #41084

ycombinator opened this issue Oct 2, 2024 · 2 comments
Labels
needs_team Indicates that the issue/PR needs a Team:* label technical debt

Comments

@ycombinator
Copy link
Contributor

ycombinator commented Oct 2, 2024

The go.mod file in the Beats repository contains a number of dependencies in the replace directive block:

beats/go.mod

Lines 412 to 425 in e345f28

replace (
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption => github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic
github.com/Shopify/sarama => github.com/elastic/sarama v1.19.1-0.20220310193331-ebc2b0d8eef3
github.com/apoydence/eachers => github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 //indirect, see https://github.com/elastic/beats/pull/29780 for details.
github.com/dop251/goja => github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20
github.com/dop251/goja_nodejs => github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6
github.com/fsnotify/fsevents => github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270
github.com/fsnotify/fsnotify => github.com/elastic/fsnotify v1.6.1-0.20240920222514-49f82bdbc9e3
github.com/google/gopacket => github.com/elastic/gopacket v1.1.20-0.20211202005954-d412fca7f83a
github.com/insomniacslk/dhcp => github.com/elastic/dhcp v0.0.0-20200227161230-57ec251c7eb3 // indirect
github.com/meraki/dashboard-api-go/v3 => github.com/tommyers-elastic/dashboard-api-go/v3 v3.0.0-20240913150833-a945473a8f25
github.com/snowflakedb/gosnowflake => github.com/snowflakedb/gosnowflake v1.6.19
)

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 #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 botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 2, 2024
@botelastic
Copy link

botelastic bot commented Oct 2, 2024

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

@ycombinator ycombinator changed the title Document rationale for replace directive in go.mod Document rationale for replaced dependencies in go.mod Oct 2, 2024
@mauri870
Copy link
Member

mauri870 commented Oct 3, 2024

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 golang/go#44840 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label technical debt
Projects
None yet
Development

No branches or pull requests

2 participants