prosopite
prosopite copied to clipboard
Block syntax for scanning, finishing, pausing and resuming.
What do you think about supporting a block style syntax for enabling/disabling N+1 detection.
For example:
Prosopite.scan do
example.run
end
in addition to:
Prosopite.scan
example.run
Prosopite.finish
Similarly, pausing could be something like:
Prosopite.pause do
code_with_n+1()
end
in addition to:
Prosopite.pause
code_with_n+1()
Prosopite.resume
@geshwho I think this is now already done - let us know if you have any issues.
Block format for .scan
was already implemented in the codebase - and https://github.com/charkost/prosopite/pull/41 makes the result available to the caller and puts something in the docs for this. I'm hoping it'll be merged soon
I implemented pause a while back similarly in https://github.com/charkost/prosopite/pull/42/files and it's recently been merged.
Note that currently you can't nest scan/pause/scan/pause blocks - see https://github.com/charkost/prosopite/issues/43
@oskarpearson Oh nice! This is great, and also looks like my next two questions are also being considered:
- having the block return the results
- nesting blocks
Let me know if I can do anything to help. Looking forward to both of these!
@oskarpearson @charkost I saw that these changes have all landed on main. Any chance you're able to cut a new release of this gem soon? I'm anxious to get my hands on block syntax 😅