Skip to content

build(deps): use std or local helper to simplify deps#1343

Open
ferhatelmas wants to merge 1 commit intotus:mainfrom
ferhatelmas:less-deps
Open

build(deps): use std or local helper to simplify deps#1343
ferhatelmas wants to merge 1 commit intotus:mainfrom
ferhatelmas:less-deps

Conversation

@ferhatelmas
Copy link
Copy Markdown
Contributor

  • use more testify for denser code which also drops x/exp constraints reference (only for e2e since other changes touch)

  • use std for slog/slices instead of x/exp

  • use a simple tcp proxy to drop toxiproxy/zerolog which are only used for e2e tests otherwise

* use more testify for denser code which
also drops x/exp constraints reference
(only for e2e since other changes touch)

* use std for slog/slices instead of x/exp

* use a simple tcp proxy to drop toxiproxy/zerolog
which are only used for e2e tests otherwise

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@Acconut
Copy link
Copy Markdown
Member

Acconut commented Feb 21, 2026

Thank you for looking into this!

  • Replacing x/exp/slog with log/slog is on our list, but technically a breaking change since it's part of tusd's public API and the types are not interface but actual structs. Therefore this can only be done for the next major release and we already have a PR for that open: slog: replace golang.org/x/exp/slog with log/slog #1159
  • Replacing x/exp/slices with slices seems like a no-brainer 👍
  • Using github.com/stretchr/testify/require more is also a good improvement 👍
  • I'm not sure about replacing toxiproxy with our own solution. Toxiproxy hasn't seen much active development in the recent past but it has served us well over the years. If we remove, I would advocate for building a nicer API that gives more programmatic control to the tests instead of just mirroring the toxiproxy API, which felt a bit limiting when I built the end-to-end tests. But I haven't spent more thoughts on this yet. What do you think?

@ferhatelmas
Copy link
Copy Markdown
Contributor Author

ferhatelmas commented Feb 21, 2026

Replacing x/exp/slog with log/slog is on our list, but technically a breaking change

I agree for technicality but it's in the same realm with bumping required minimum go version, this already breaks some applications.

replacing toxiproxy with our own solution

usage here is minimal but it brings big dependencies such as zap. Also, it doesn't get attention for maintenance recently. I would advocate dropping/replacing so this PR is.

Regarding better API, it could be done in two steps, replace existing and then improve.

@Acconut
Copy link
Copy Markdown
Member

Acconut commented Feb 27, 2026

I agree for technicality but it's in the same realm with bumping required minimum go version, this already breaks some applications.

I would argue that bumping the Go version is different, since we publicly announce to only support the two last minor releases of Go. Which is also quite common in the Go ecosystem, I feel.

Would you be open to splitting this PR into different ones? One for dropping x/exp/slices, one for extending the use of testify and one for the toxiproxy changes? Then we can quickly iterate on the later one together before merging it.

@ferhatelmas
Copy link
Copy Markdown
Contributor Author

sure

for dropping x/exp/slices

#1353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants