-
Notifications
You must be signed in to change notification settings - Fork 3k
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
player: only coalesce callbacks from parsed config files #15913
base: master
Are you sure you want to change the base?
Conversation
dc415c7
to
fec1212
Compare
Download the artifacts for this pull request: |
New command prefix need to be added to these places as well. Lines 1669 to 1677 in fc2f176
Lines 414 to 420 in fc2f176
|
fec1212
to
3690c47
Compare
Shouldn't the whole feature go through a deprecation period? We added a new behavior that breaks multiple use-cases (this subtitle thing and hwdec thing), now we add a command prefix to revert to old behavior. This is breaking change and we need to give users time to migrate their scripts to This defered options callback invites all sort of race conditions like shown by |
To be fair, that didn't really work before. You would need some kind of queueing approach to wait until the hwdec is actually set for real before printing it no matter what.
It's always been a bit racy. The earlier hwdec is a good example since it may take a few frames before it gets applied. So if you do a get right after setting it, it could be wrong. This specific script has failures because it sets the Deprecating is easy enough and I'm not like opposed to it or anything. All I'd have to do is make immediate always true, but I'm not sure how we would actually communicate that to users. I mean yeah we can put it in the release notes/docs but is anyone going to really read it? I don't think printing a warning makes much sense either. |
I don't mind either way. We need to be careful not to release next stable version without making sure it is safe. I'm fine with having this change, but we need to monitor the impact. It's basically Hyrum's law, it really doesn't matter how we define this, what matters how it works and if it start breaking scripts even in subtle way, because they depended on some strange behavior it's a problem. |
I think it's clear now that the impact of this change was very underestimated. Instead of this command prefix, the option change coalescing should be disabled for |
I'd appreciate it if we could at least wait until there's a sample size greater than 1 before we start making melodramatic statements. |
This doesn't work for me. I end up with messed up timestamps. I tried adding |
3690c47
to
d5a78de
Compare
Sorry implementation flaw on my part. Does it work correctly now? |
d5a78de
to
fa9fb53
Compare
It works now, even without adding the To make the script backwards compatible I'll need some way to check if |
It's silly but something like this would work.
|
Considering that this is a temporary solution, I guess that would work. |
@kasper93: Do you think I should also forbid |
I thinking, maybe we should split callbacks between config files and normal commands. Say, we use "delayed" callbacks when parsing config file, but use "immediate" in all other cases to preserve compatibility. And we don't need this prefix, because we assume that single commands are fine to process immediately. While big config files makes more sense to coalesce. Does it make sense? Maybe it will be best of both worlds. It should be easy to detect, there are similar flags for opts like |
This relaxes what bbac628 introduced. Although it is rare, there may be scripts out there that depend on the old timing. We'd still like to process config files in a sane manner and not cause OOMs so keep the general coalescing mechanism in place but use it selectively. There is one special case with the --input-commands option. We want this coalesced as well so some special handling needs to be added for that.
fa9fb53
to
240f831
Compare
I implemented this now. The two cases that use the delayed callbacks are config file parsing and the |
I think I like this. And if we want in the future extend it somehow, it is also possible. |
cc @christoph-heinrich: I think with this you just need to do this (potential backwards compatibility handling ignored):
And you'll get the old behavior back.