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

zapslog: Delete exp-based implementation #1337

Closed
Tracked by #1333
abhinav opened this issue Aug 23, 2023 · 0 comments · Fixed by #1338
Closed
Tracked by #1333

zapslog: Delete exp-based implementation #1337

abhinav opened this issue Aug 23, 2023 · 0 comments · Fixed by #1338

Comments

@abhinav
Copy link
Collaborator

abhinav commented Aug 23, 2023

We should delete the zapslog implementation based on golang.org/x/exp since log/slog is in the standard library now. It's not worth the effort to maintain two parallel implementations just for pre-1.20 support of an experimental module.

abhinav added a commit to abhinav/zap that referenced this issue Aug 23, 2023
Deletes the implementation of slog.Handler based on
golang.org/x/exp/slog.
Maintaining two implementations doesn't serve much value here.

Remaining files have been renamed to better match their contents:

- handler.go holds the slog.Handler
- handler_test.go tests that
- example_test.go contains example tests

Files that remain are still tagged with `go1.21`
so they're only visible to Go 1.21 or newer.

This way, `go test` in this directory with Go 1.20 will not fail:

```
% GOTOOLCHAIN=go1.20 go test -v
?       go.uber.org/zap/exp/zapslog     [no test files]
```

Resolves uber-go#1337
abhinav added a commit to abhinav/zap that referenced this issue Aug 23, 2023
Deletes the implementation of slog.Handler based on
golang.org/x/exp/slog.
Maintaining two implementations doesn't serve much value here.

Remaining files have been renamed to better match their contents:

- handler.go holds the slog.Handler
- handler_test.go tests that
- example_test.go contains example tests

Files that remain are still tagged with `go1.21`
so they're only visible to Go 1.21 or newer.

This way, `go test` in this directory with Go 1.20 will not fail:

```
% GOTOOLCHAIN=go1.20 go test -v
?       go.uber.org/zap/exp/zapslog     [no test files]
```

Resolves uber-go#1337
abhinav added a commit to abhinav/zap that referenced this issue Aug 23, 2023
Deletes the implementation of slog.Handler based on
golang.org/x/exp/slog.
Maintaining two implementations doesn't serve much value here.

Remaining files have been renamed to better match their contents:

- handler.go holds the slog.Handler
- handler_test.go tests that
- example_test.go contains example tests

Files that remain are still tagged with `go1.21`
so they're only visible to Go 1.21 or newer.

This way, `go test` in this directory with Go 1.20 will not fail:

```
% GOTOOLCHAIN=go1.20 go test -v
?       go.uber.org/zap/exp/zapslog     [no test files]
```

Resolves uber-go#1337
abhinav added a commit that referenced this issue Aug 23, 2023
Deletes the implementation of slog.Handler based on
golang.org/x/exp/slog.
Maintaining two implementations doesn't serve much value here.

Remaining files have been renamed to better match their contents:

- handler.go holds the slog.Handler
- handler_test.go tests that
- example_test.go contains example tests

Files that remain are still tagged with `go1.21`
so they're only visible to Go 1.21 or newer.

This way, `go test` in this directory with Go 1.20 will not fail:

```
% GOTOOLCHAIN=go1.20 go test -v
?       go.uber.org/zap/exp/zapslog     [no test files]
```

Resolves #1337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant