Skip to content

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Mar 4, 2024

The previous implementation was unnecessarily forcing compilation of the wrapper code for each use of the macro, and was assuming that hygiene rules do not apply to a gensym in a toplevel block and assuming that the internal tryfinally syntax is legal to generate directly. This change tries to avoid all of those assumptions, and should therefore also give better backtraces too.

The previous implementation was unnecessarily forcing compilation of the wrapper code for each use of the macro, and was assuming that hygiene rules do not apply to a gensym in a toplevel block and assuming that the internal tryfinally syntax is legal to generate directly. This change tries to avoid all of those assumptions, and should therefore also give better backtraces too.
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 91.66%. Comparing base (184a413) to head (29941e7).

Files Patch % Lines
src/invalidations.jl 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
- Coverage   92.22%   91.66%   -0.56%     
==========================================
  Files           3        3              
  Lines          90       96       +6     
==========================================
+ Hits           83       88       +5     
- Misses          7        8       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vtjnash
Copy link
Member Author

vtjnash commented Mar 4, 2024

FWIW, I think doing this same change for the other macros (e.g. compile_workload), would also fix several of the open issues (#17 and #26)

@Keno Keno merged commit 76037ed into main Mar 9, 2024
@Keno Keno deleted the jn/recompile_invalidations branch March 9, 2024 00:51
@timholy
Copy link
Member

timholy commented Mar 31, 2025

How do you weave together preservation of the scope of a let-wrapped @setup_workload and still be able to use Core.eval?

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