-
Notifications
You must be signed in to change notification settings - Fork 151
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
Panic when reading fields of tracked structs from older revisions #407
Comments
@xffxff Actually, I believe the expected behavior should be a panic -- I've been meaning to open an issue about this! |
So, the problem in this example is that it is bogus to take a tracked struct from an older revision and continue using it after altering the inputs. However, we don't detect this! And even simpler test would just be to read:
That will currently print The offending code is this case: salsa/components/salsa-2022/src/function/maybe_changed_after.rs Lines 173 to 178 in f0fe691
salsa/components/salsa-2022/src/function/maybe_changed_after.rs Lines 165 to 172 in f0fe691
This would indicate that the value is considered dirty. Attempting to execute the function will panic. Alternatively, I think we could just panic immediately in |
@xffxff would you be up to take a crack at fixing this? |
Yes, I'd love to |
it will output
not sure if this is expected behavior, or if we should get
The text was updated successfully, but these errors were encountered: