salsa-rs / salsa

A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.
https://salsa-rs.netlify.app/
Apache License 2.0
2.1k stars 143 forks source link

Do we want the `debug_all` method? #411

Open nikomatsakis opened 2 years ago

nikomatsakis commented 2 years ago

In #405, we added the debug_all method so that you can easily get a debug print out that includes all fields. But that may introduce unwanted dependencies. How often do people want it? Maybe we should not be encouraging this and have people write their own methods if they want to debug a bunch of fields.

vemoo commented 2 years ago

I was thinking, what if there was a way to read struct values that is not tracked by the runtime? Then regular debug could access all fields. It would mean that debug output should not be used for computations, but I think that should already be the case.

Maybe untracked reading has been discussed already but just in case.

nikomatsakis commented 2 years ago

I hadn't considered that. Seems so wrong. But yes, it's an idea worth considering.

vemoo commented 2 years ago

I mainly mention it because it's something that exists in some js reactive frameworks with automatic tracking. I first encountered it in solidjs, but it also exists on mobx, vue

gavrilikhin-d commented 6 months ago

How often do people want it?

In every test function :)