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

improvement: pass down file/line in makeFutureWithTask #2711

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Austinpayne
Copy link
Contributor

In some circumstances it can be difficult to know which specific call to makeFutureWithTask leaked a promise. Passes through file/line to help aid debugging such situations.

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! This is a good change, however we can't accept it as-is because it's API breaking. We need to keep the old function around, which also means we need a slight name change for the new one, along with a deprecation for the old one and a good fixit.

How about makeFutureWithResultOfTask?

In some circumstances it can be difficult to know which specific call to
makeFutureWithTask leaked a promise. Adds a new function that passes
down file/line to help aid debugging such situations.
@Austinpayne Austinpayne force-pushed the improvement/async-promise-tracing branch from ea16fc3 to 25d29f5 Compare May 17, 2024 14:52
@Austinpayne
Copy link
Contributor Author

Austinpayne commented May 17, 2024

@Lukasa Thanks, I forgot about that detail!

@Lukasa
Copy link
Contributor

Lukasa commented May 20, 2024

Thanks, this looks a lot better! Can you update the tests? I think two changes are needed:

  1. Duplicate all the existing tests that test explicitly this function and make them test the new one.
  2. Deprecate the tests for the old function. Don't remove them, just deprecate them.
  3. Any test that uses the old function incidentally should be updated to use the new one.

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