Skip to content

Give better error message (and don't crash) if bad json in the cache #6277

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

Merged
merged 5 commits into from
Feb 7, 2019

Conversation

emmatyping
Copy link
Member

Hopefully this seems reasonable.

Fixes #6156

@emmatyping
Copy link
Member Author

@gvanrossum This now is a bit nicer I think, it reports the error like so:

_ast.meta.json:0: error: Error reading JSON file; you likely have a bad cache.
Try removing the .mypy_cache directory and run mypy again.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Thanks for your patience! And sorry for taking so long to review.

@emmatyping emmatyping merged commit ffd0870 into python:master Feb 7, 2019
@emmatyping emmatyping deleted the catchbadcache branch February 7, 2019 09:57
@emmatyping
Copy link
Member Author

Thanks for your patience! And sorry for taking so long to review.

No worries! Thank you for the review.

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