Skip to content

Fix: print non PHP file processors changes in parallel runs#3384

Merged
TomasVotruba merged 1 commit intorectorphp:mainfrom
Mobiliteitsfabriek:bug/non-php-files-not-dumped-in-parallel
Feb 22, 2023
Merged

Fix: print non PHP file processors changes in parallel runs#3384
TomasVotruba merged 1 commit intorectorphp:mainfrom
Mobiliteitsfabriek:bug/non-php-files-not-dumped-in-parallel

Conversation

@ian-zunderdorp
Copy link
Copy Markdown
Contributor

Extra info:

  • PhpFileProcessor already prints changed files itself.
  • NonPhpFileProcessor does not do this yet, instead it relies on ApplicationFileProcessor which prints all changed files after applying all rectors
  • ApplicationFileProcessor skips printing files when running in parallel
  • This means that NonPhpFileProcessor only worked in non-parallel mode

The RenameClassNonPhpRector is the only one in rector-src that uses it (and this rector is used by rector-symfony), though there might be external rector packages that rely on this.

@ian-zunderdorp ian-zunderdorp force-pushed the bug/non-php-files-not-dumped-in-parallel branch from 5f01cd0 to 47dfd15 Compare February 15, 2023 12:43
@ian-zunderdorp
Copy link
Copy Markdown
Contributor Author

I couldn't find existing tests that covers (parallel) execution combined with actually writing files to the filesystem, so that's why there is only a src code change. The e2e tests only assert on reported output, which was already green.

@ian-zunderdorp
Copy link
Copy Markdown
Contributor Author

Hi @TomasVotruba ,

What is the best way to go forward with this pull request? Is there any extra information you need, any changes?

Extra info:
- PhpFileProcessor already prints changed files itself.
- NonPhpFileProcessor does not do this yet, instead it relies on ApplicationFileProcessor which prints all changed files after applying all rectors
- ApplicationFileProcessor skips printing files when running in parallel
- This means that NonPhpFileProcessor only worked in non-parallel mode
@ian-zunderdorp ian-zunderdorp force-pushed the bug/non-php-files-not-dumped-in-parallel branch from 47dfd15 to 08a6520 Compare February 22, 2023 10:56
@TomasVotruba
Copy link
Copy Markdown
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit 5e8ee31 into rectorphp:main Feb 22, 2023
@ian-zunderdorp ian-zunderdorp deleted the bug/non-php-files-not-dumped-in-parallel branch February 22, 2023 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants