[ANN] SnoopCompile 3.0.0

I’m pleased to announce the release of SnoopCompile 3.0.0. This major release had multiple goals:

  • a slimmed package in which integrations with JET, Cthulhu, and other packages occur through package extensions. This means you now need to load those packages manually, instead of having them loaded by SnoopCompile. One major benefit is that now SnoopCompile and JET can function independently: because JET reaches deeply into compiler internals, it’s more likely to be broken by changes to Julia, and historically that also broke SnoopCompile.
  • outdated tools have been removed: @snoopc and the original @snoopi
  • @snoopi_deep has been renamed @snoop_inference
  • @snoopr has been renamed @snoop_invalidations
  • @snoopl has been renamed @snoop_llvm
  • These “data collection” macros are no longer exported by SnoopCompile itself: now you must explicitly get them from using SnoopCompileCore. This is to encourage people to do their data collection with just SnoopCompileCore loaded (SnoopCompile can cause invalidations and other issues that can be misleading).
  • One consequence: always use a semicolon (;) to suppress output from @snoop_inference! The reason is that SnoopCompileCore, because it cannot be allowed to invalidate any methods, is not allowed to extend Base.show. The show method is defined when you load SnoopCompile, but if you follow proper procedure and wait to load SnoopCompile until after your data collection is complete, forgetting to suppress the output can end up spamming your own terminal.

While not in itself a breaking change, far and away the largest amount of labor in SnoopCompile3 went into the documentation. It has been thoroughly rewritten for the julia 1.9+/PrecompileTools era. SnoopCompile followed (and helped drive) Julia’s own evolution on precompilation, and it was long past time to remove the old cruft that no longer applies in modern versions of Julia. I also made the documentation even more tutorial-based, and split tutorials into “beginner” and “advanced.” The beginner tutorials, particularly one on invalidations and how to fix them attempts to be more “newbie friendly” and uses a demonstration that is less artificial than many of the demos in older SnoopCompile documentation.

It’s of course likely that there are documentation and code errors; as always, please file issues for any problems you encounter. (Even better, submit pull requests with fixes!)

75 Likes

Fantastic Tim, I really appreciate your continued effort to make writing snappy Julia packages involve as few paper cuts as possible :slightly_smiling_face:.

3 Likes