Skip to content

Capture execution backtrace when throwing UnexpectedCycle #883

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented May 29, 2025

cc #856

Copy link

netlify bot commented May 29, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 7dc685c
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/68380c8bf34cfa00083f1174

@Veykril
Copy link
Member Author

Veykril commented May 29, 2025

Note with this if you have a cycle to debug in a test @ChayimFriedman2 you can at least wrap your test temporarily in a UnexpectedCycle::catch the stuff

@Veykril Veykril force-pushed the veykril/push-tsptqqtnuxwk branch from ffd290c to 7dc685c Compare May 29, 2025 07:28
Copy link

codspeed-hq bot commented May 29, 2025

CodSpeed Performance Report

Merging #883 will not alter performance

Comparing Veykril:veykril/push-tsptqqtnuxwk (7dc685c) with master (f9a9bb2)

Summary

✅ 12 untouched benchmarks

@MichaReiser
Copy link
Contributor

MichaReiser commented May 29, 2025

I should probably have raised this on the original PR but what's the motivation for raising a more specific value over a regular panic considering that this isn't something a program can easily recover from (unlike a cancellation which is a valid exit state). I guess, what I don't understand is what are the situation where we want to catch this (without triggering a panic hook)

@carljm
Copy link
Contributor

carljm commented Jun 3, 2025

what I don't understand is what are the situation where we want to catch this (without triggering a panic hook)

cc @nikomatsakis as creator of #704

We are hitting this in ty, also -- there's currently no way to get backtraces from a cycle panic, which is a problem. We either need to revert #856 or land this PR. Similar to @MichaReiser, I don't really understand the rationale for #856, so I would be inclined to revert it, but I think ty could also adapt if this PR were landed.

Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

This looks good to me, and I think is necessary if we don't revert #856.

@carljm
Copy link
Contributor

carljm commented Jun 3, 2025

I'm going to go ahead and merge this; I think it's strictly an improvement over the status quo. We can still separately discuss possibly going back to simple panic.

@carljm carljm added this pull request to the merge queue Jun 3, 2025
Merged via the queue into salsa-rs:master with commit ac6fe53 Jun 3, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Jun 3, 2025
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