Skip to content

Add --debug-serialize option#14155

Merged
ilevkivskyi merged 1 commit intopython:masterfrom
cdce8p:debug-serialize
Dec 19, 2022
Merged

Add --debug-serialize option#14155
ilevkivskyi merged 1 commit intopython:masterfrom
cdce8p:debug-serialize

Conversation

@cdce8p
Copy link
Copy Markdown
Collaborator

@cdce8p cdce8p commented Nov 20, 2022

Currently, mypy_primer sets --cache-dir=/dev/null which disables cache generation. This can result in errors being missed which would normally come up during tree.serialize(). Removing --cache-dir=/dev/null isn't practical.

This PR adds a new debug / test option --debug-serialize which runs tree.serialize() even if cache generation is disabled to help detect serialize errors earlier.

Refs

cc: @hauntsaninja

Run tree.serialize even if cache generation is disable.
Useful for mypy_primer to detect serialize errors early.
@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@cdce8p
Copy link
Copy Markdown
Collaborator Author

cdce8p commented Nov 30, 2022

@ilevkivskyi Would you mind taking a quick look?
This option would have helped catch crashes like the one in #14137 much earlier with the mypy_primer.

@cdce8p
Copy link
Copy Markdown
Collaborator Author

cdce8p commented Dec 19, 2022

@ilevkivskyi Anything else that needs to be done here or can this be merged?
The nexts steps will be

  • Modify the primer to allow passing additional arguments directly to mypy
  • Update the CI workflow to pass --debug-serialize

@AlexWaygood
Copy link
Copy Markdown
Member

  • Modify the primer to allow passing additional arguments directly to mypy

That one's already been completed: hauntsaninja/mypy_primer@ceecd71

@ilevkivskyi ilevkivskyi merged commit d5dc1fb into python:master Dec 19, 2022
@cdce8p cdce8p deleted the debug-serialize branch December 19, 2022 22:28
ilevkivskyi pushed a commit that referenced this pull request Dec 19, 2022
Enable the `--debug-serialize` option to help catch issues during
serialization which would normally be skipped by mypy_primer.

Followup to #14155
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