Skip to content

Cabal flag to control auto-labelling of threads #164

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jasagredo
Copy link

Having this cabal flag allows the user to, on-demand, auto-label the async threads, pointing to the place where the async task is spawned. The idea is that the user then can go to the code/dependency and add a meaningful label to that thread.

Using CPP makes it transparent for users that don't want to opt-in to this behavior.

My idea is for this PR to be merged after #163. The first commit in this branch is the same as in #163.

@jasagredo jasagredo force-pushed the js/debug-auto-label branch from 6035549 to 5a7bd63 Compare January 24, 2025 15:53
@simonmar
Copy link
Owner

I'm open to the idea of labelling the internal threads - we now have two PRs for that (#162 and #163, I slightly prefer #162). But I'm not keen on adding auto-labelling functionality via cabal flags and CPP. Could you do this using a wrapper package async-labelled instead? It could use the same module name Control.Concurrent.Async so client code doesn't have to change.

@phadej
Copy link
Contributor

phadej commented Mar 26, 2025

Could you do this using a wrapper package async-labelled instead

That won't be ergonomic. If there's some other pakcage using async, you would need go and change it's .cabal file to use async-labelled; so broadly speaking some code would need to be changed.

Compared to adding --constraint="async +debug-auto-label" to cabal build command.

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.

3 participants