… ah, <@UKPS08ZGW>: totally different strategy, pe...
# development
… ah, @hundreds-breakfast-49010: totally different strategy, perhaps: if https://github.com/pantsbuild/pants/issues/10650 were to log a cancellation message for workunits when they are dropped, maybe you could just disable the “filesystem changed” logging entirely in favor of that…
🔥 1
because workunit messages already get more attention.
you’d see a “Cancelled: X” message, aligned with the existing `Starting`/`Completed` messages, and then you’d see another
@hundreds-breakfast-49010: between this and the other thing, this might be a cleaner solution
possibly yeah I haven't dug into this much yet
keeps display centralized to workunits.
@hundreds-breakfast-49010: the actual fix should be a few lines.
@hundreds-breakfast-49010: the google results for “drop guard” aren’t great, but this is what i mean:
Copy code
struct Guard(S);
impl Drop for Guard {
   fn drop(&mut self) {
👀 1
… that thread is noisy. sorry…. ^ that’s all i meant.
…well, actually it’s useful-ish. it’s common with a drop guard for it to contain a Option: if you successfully complete the workunit, you
… then Drop only calls the workunit canceled if the value is still there.