-
Notifications
You must be signed in to change notification settings - Fork 723
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
Core: Fix weights file data not being reused #3381
Core: Fix weights file data not being reused #3381
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.
Fixed the issue I was having, tested with a TextChoice
In In In the main function, we don't. So if the yaml has linked options or triggers, we're working with a deep copy, but if it doesn't, we're not. This might be why some yamls were unaffected in the big async. It's the ones making use of triggers, which "saved" them from being modified. (Edit: This seems to be confirmed) That seems wacky and error prone. Maybe we should just always make a deepcopy at the start? |
After thinking about it, I think I would like it if we could either
|
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.
Change works. I have some thoughts about whether it is the correct change & whether there should be some protection against this in the future (pls read my comments above), but it's probably a bit too sensitive of an issue to discuss forever.
We never deleted the cache previously so I don't think doing so is a good idea when it can be avoided, I just apparently didn't consider this solution when I wrote the original code. Even if we created a deep copy every time I wouldn't trust being able to delete it. |
What is this fixing or adding?
#3380
i forgot about weighted files when i added that delete line apparently. this reverses that checking by just adding the actual valid options to the set instead of deleting weights that we decide are valid.
How was this tested?
generated with 1 custom and a weights file confirming that invalid options still print and custom options from the weights all worked.