Skip to content

RFC: tor-rtmock: Use derive-adhoc for composite runtimes

Ian Jackson requested to merge Diziet/arti:da-task into main

In !1375 (comment 2919924) @gabi-250 suggested that the impl_runtime! macro, which has a rather clumsy input syntax, wanted to be a derive macro. This is that, using derive-adhoc rather than a bespoke proc_macro.

I quite like the result. I don't think the lack of detection of spurious and ignored #[adhoc(mock(wombat))] is a big problem for an internal macro with three call sites.

Personally I think derive-adhoc is now mature enough that I'm ready to use it here. But, I'm biased: derive-adhoc is my project proposal from last year's Tor hackweek, which @nickm has helped a lot with. I've been improving it as a personal project over the past year or so and I think it's pretty well tested and documented now. But I'm not sure if Nick's ready for us to use it here in Arti.

I'd definitely like @gabi-250's opinion as someone independent of d-a.

See also !1158 (closed)

Merge request reports

Loading