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

Circular dependency #53

Open
sirenkovladd opened this issue Sep 11, 2023 · 4 comments
Open

Circular dependency #53

sirenkovladd opened this issue Sep 11, 2023 · 4 comments

Comments

@sirenkovladd
Copy link
Member

sirenkovladd commented Sep 11, 2023

https://github.com/tinylibs/tinybench/blob/v2.5.0/src/bench.ts#L11

https://github.com/tinylibs/tinybench/blob/v2.5.0/src/task.ts#L4

I suggest leaving only the import Task in the branch

After approval, I can create a PR (with backward compatibility, of course, as far as possible)

@kibertoad
Copy link

Can you elaborate on what you are suggesting? But yeah, circular dependencies should be avoided

@sirenkovladd
Copy link
Member Author

in Task to receive an interface with the necessary parameters and implement this interface in Bench

@sirenkovladd
Copy link
Member Author

and make deprecated
https://github.com/tinylibs/tinybench/blob/v2.5.1/src/task.ts#L19

and next step, (maybe in v3.0.0) remove this column

@jerome-benoit
Copy link
Collaborator

Task is uselessly using a reference to Bench instead of using from it only the bits needed.

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

No branches or pull requests

3 participants