Skip to content
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

Add --debug-serialize option #14155

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Conversation

cdce8p
Copy link
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
Contributor

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

@cdce8p
Copy link
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
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
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