-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use of github.com/benbjohnson/clock which is no longer maintained #1331
Comments
abhinav
added a commit
to abhinav/zap
that referenced
this issue
Sep 8, 2023
This drops the dependency on benbjohnson/clock in favor of a simple hand-rolled mock clock implementation. The core of the functionality of MockClock is provided by the following: - waiters: a min-heap of functions waiting to be executed - runAt: schedules a function to be executed when time progresses - Add: moves time forward, running all functions in range The rest of the time functionality can be built upon these pieces. Note that nothing happens until Add is called. There are no goroutines running additional work in the background. Resolves uber-go#1331
abhinav
added a commit
to abhinav/zap
that referenced
this issue
Sep 8, 2023
This drops the dependency on benbjohnson/clock in favor of a simple hand-rolled mock clock implementation. The core of the functionality of MockClock is provided by the following: - waiters: a min-heap of functions waiting to be executed - runAt: schedules a function to be executed when time progresses - Add: moves time forward, running all functions in range The rest of the time functionality can be built upon these pieces. Note that nothing happens until Add is called. There are no goroutines running additional work in the background. Resolves uber-go#1331
abhinav
added a commit
to abhinav/zap
that referenced
this issue
Sep 8, 2023
This drops the dependency on benbjohnson/clock in favor of a simple hand-rolled mock clock implementation. The core of the functionality of MockClock is provided by the following: - waiters: a min-heap of functions waiting to be executed - runAt: schedules a function to be executed when time progresses - Add: moves time forward, running all functions in range The rest of the time functionality can be built upon these pieces. Note that nothing happens until Add is called. There are no goroutines running additional work in the background. Resolves uber-go#1331
abhinav
added a commit
to abhinav/zap
that referenced
this issue
Sep 8, 2023
This drops the dependency on benbjohnson/clock in favor of a simple hand-rolled mock clock implementation. The core of the functionality of MockClock is provided by the following: - waiters: a min-heap of functions waiting to be executed - runAt: schedules a function to be executed when time progresses - Add: moves time forward, running all functions in range The rest of the time functionality can be built upon these pieces. Note that nothing happens until Add is called. There are no goroutines running additional work in the background. Resolves uber-go#1331
abhinav
added a commit
that referenced
this issue
Sep 9, 2023
This drops the dependency on benbjohnson/clock as it's no longer maintained. It replaces it with a hand-rolled mock clock implementation. The core of the functionality of MockClock is provided by the following: - waiter: a function waiting to be executed - runAt: schedules a function to be executed when time progresses - Add: moves time forward, running all functions in range The rest of the necessary functionality is built on top of these. This is a pretty simple implementation. We schedule work, but nothing happens until Add is called. There are no goroutines running additional work in the background. Resolves #1331
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
This project uses github.com/benbjohnson/clock which is no longer maintained
To Reproduce
N/A
Expected behavior
Use an alternative package (for example, github.com/jonboulle/clockwork) or bring this functionality into this repo
Additional context
While it seems to be a test-only dependency, this is still a potential issue and is being flagged by some SBOM checking tools
The text was updated successfully, but these errors were encountered: