Skip to content

Conversation

@ejgallego
Copy link
Owner

This means we will re-execute the anomaly sentence, which may not be very safe.

Fixes #153

@ejgallego ejgallego marked this pull request as draft January 9, 2023 01:22
@ejgallego
Copy link
Owner Author

It seems this doesn't work, I don't know why.

Anyways this is more tricky than it looks, for example for parsing this won't work as parsing updates the input imperatively. So I guess we'd need to add a flag to eval to understand when it is safe to do so.

@ejgallego
Copy link
Owner Author

It seems this doesn't work, I don't know why.

I've discovered why this doesn't work, usually when we do Coq.Protect.eval ~f x , f will unfreeze the Coq state, which will set the state for anomalies back to disabled.

I guess that's hard to overcome without updating the Coq API in CDebug.

@SkySkimmer , what do you think about taking "backtraces" out of the debug flags (or even making the debug flags less synchronized)

@ejgallego ejgallego force-pushed the debug_on_anomaly branch 2 times, most recently from 53b6770 to 5bf9a6f Compare January 20, 2023 00:56
@SkySkimmer
Copy link
Contributor

IDK

@ejgallego
Copy link
Owner Author

We need to take a decision on this, we either patch Coq so we can do it, or close this PR.

IMHO that seems very useful, so we could try a Coq patch.

This means we will re-execute the anomaly sentence, which may not be
very safe.

Fixes #153
@ejgallego ejgallego added this to the 0.3.0 milestone Feb 15, 2023
@ejgallego
Copy link
Owner Author

This would be possible to do using a bit of surgery on the summary, but not planned.

@ejgallego ejgallego closed this Nov 7, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in coq-lsp roadmap Nov 7, 2025
@ejgallego ejgallego deleted the debug_on_anomaly branch November 7, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[diagnostics] Produce backtraces automatically when an error is an anomaly.

3 participants