fix: correctly set initHeartbeats in Lean.Environment.unsafeRunMetaM#12994
fix: correctly set initHeartbeats in Lean.Environment.unsafeRunMetaM#12994eric-wieser wants to merge 1 commit intoleanprover:masterfrom
Lean.Environment.unsafeRunMetaM#12994Conversation
|
changelog-library |
|
Mathlib CI status (docs):
|
|
Reference manual CI status:
|
Lean.Environment.unsafeRunMetaM
|
Thanks for this. With this change |
I'm passing
|
|
I see. So do I understand correctly that this will initialize the "sub execution" to continue with a potentially nonzero initial value of heartbeats, potentially causing the maximum to be reached even earlier than previously? |
|
No, the opposite; when code does a heartbeat check, it asserts that |
|
Thanks but I'm relatively sure we want #13202 instead (perhaps it doesn't even matter in practice) |
|
I think you do need this one, else a callback that does change the heartbeat limit will not count it correctly. |
This PR ensures that
Lean.Environment.unsafeRunMetaMcan be run late in a lean process, without thinking it has already consumed all available heartbeats.