Skip to content

Fail fast when user tries to generate reports with parallel workers#21341

Merged
ilevkivskyi merged 3 commits intopython:masterfrom
ilevkivskyi:no-parallel-reports
Apr 27, 2026
Merged

Fail fast when user tries to generate reports with parallel workers#21341
ilevkivskyi merged 3 commits intopython:masterfrom
ilevkivskyi:no-parallel-reports

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

This is not supported, and support is somewhat non-trivial, so fail fast instead of generating incomplete/empty reports.
cc @JukkaL

@ilevkivskyi ilevkivskyi marked this pull request as ready for review April 27, 2026 13:46
@ilevkivskyi
Copy link
Copy Markdown
Member Author

Opened #21342 to track support for reports in parallel mode.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe create an issue about supporting report generation in parallel mode?

Comment thread mypy/main.py Outdated
if options.cache_dir == os.devnull:
fail("error: cache must be enabled in parallel mode", stderr, options)
if options.report_dirs:
fail("error: reports are not supported in parallel mode yet", stderr, options)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using -n0 to disable parallel mode (in case it's picked up from the config file, so user might not remember how to do it)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good idea.

@ilevkivskyi
Copy link
Copy Markdown
Member Author

Maybe create an issue about supporting report generation in parallel mode?

Already did, see above.

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi ilevkivskyi merged commit a07812d into python:master Apr 27, 2026
25 checks passed
@ilevkivskyi ilevkivskyi deleted the no-parallel-reports branch April 27, 2026 18:11
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.

2 participants