-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track callsite for observers & hooks #15607
base: main
Are you sure you want to change the base?
Track callsite for observers & hooks #15607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this strategy, but I really want to see benchmarks before we remove the feature flag on BundleInserter
.
I tried running the various Should this ends up having to sit behind a feature flag, would this be a new feature flag or the (possibly renamed) |
Personally, I'd rename For hooks, that's a bit harder. Ideally an optional |
I think that would be the best, will do. Can you add the rename to your meta issue? |
ce81b1a
to
c985e7f
Compare
Objective
Fixes #14708
Also fixes
try_insert_if_new
& dynamic component insertions per command not updating tracked locationSolution
ObserverTrigger
has a newcaller
field with thetrack_change_detection
feature;hooks take an additional caller parameter (which is
Some(…)
orNone
depending on the feature).Testing
See the new tests in
src/observer/mod.rs
Showcase
Observers now know from where they were triggered (if
track_change_detection
is enabled):Migration
Option<&'static Location>
argument