-
-
Notifications
You must be signed in to change notification settings - Fork 672
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
Rector appears to be caching files before they've finished processing. #7770
Rector appears to be caching files before they've finished processing. #7770
Comments
@aboyton maybe you would like to test latest |
There is no master branch, you probably mean |
Thanks @samsonasik I thought about that when I thought about writing this comment, but when actually writing... 😓 |
Re-open, @yguedidi I need to revert your change as I found double |
Reverting it at rectorphp/rector-src#3607 |
@samsonasik thank you for catching this! looks like all my contributions introduce regressions... 😅 |
@aboyton in next release you'll be able to enjoy a reliable cache! 🎉 |
Thanks. That's awesome. I'll have to try it out once the next release is released. Any idea why |
10+ minutes on which project? |
Internal work repository of 1M+ lines of code. |
@aboyton depending on your project and enabled rectors, but I'd say that 10minutes for such a big project looks OK when running without cache :) |
Bug Report
When running Rector for some reason I have a file that is failing to process, with an error very similar to #7586. If there are files which work they pass and then Rector hangs when it gets to the problematic file. If I just try process the problematic file then I get no output whatsoever.
This issue though isn't about that bug, this issue is about incorrect caching of files when Rector hangs.
When Rector does hang, if I quit rector with
Ctrl + C
and then run again it appears as those the file that was problematic has been marked as processed and so running Rector succeeds the second time.If I run with
vendor/bin/rector process --clear-cache
then I get stuck on the problematic file again, or if I change the list of files to process (which appears to reset the cache) it fails the first run and succeeds the second.Minimal PHP Code Causing Issue
Unfortunately I don't have that as the code that is breaking things appears to work on https://getrector.org/demo/ :(
I've set
$rectorConfig->parallel(seconds: 600, maxNumberOfProcess: 1);
to make things easier to debug, but the issue occurs with parallel processes as well.Expected Behaviour
When a file is processed it should only be added to the cache when it has successfully finished processing.
The text was updated successfully, but these errors were encountered: