Skip to content

parallel processing causing class not found error #9326

@kkmuffme

Description

@kkmuffme

Bug Report

Subject Details
Rector version 2.1.4

Expected Behaviour

I'm using autoloadPaths and randomly (which is why there is no reproducer) get errors like:

Analyze error: "Class Foo was not found while trying to analyse it...

class Foo is declared in a file of autoloadPaths and used in the file Bar to analyze (the file Bar is not autoloaded, but the path to it is explicitly passed to rector)

The issue happens even when setting ->withParallel(120, 1, 1);

However, when using ->disableParallel(); in the config, the error goes away.

  1. why does ->disableParallel() and ->withParallel(120, 1, 1); behave differently? Logically they should be the same thing?

  2. any idea what causes the issue here when using parallel? Since autoload paths should be loaded before any processing begins (earlier phase), it's unclear to me how this error could even theoretically be caused by parallel

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions