Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Conversation

@MikhailArkhipov
Copy link

Found another case of buffer corruption. Happens when module reload comes during analysis. Repro:

  1. Remove black formatter if you have one installed.
  2. Open scikit-learn
  3. Open conftest.py
  4. While analysis is running, make changes like add space after dot in del sys._is_pytest_session
  5. Format document
  6. When prompted to install black say yes.
  7. When formatter is installed and analysis still running, format document.

The buffer is now corrupted since changes comes over content reloaded by ReloadAll.

  • Separated Reset into Populate, MarkChanged and Clear.
  • Added exceptions to make sure Populate only happens once and there is no Update after Clear.
  • MarkChanged advances version so analysis thinks buffer has changed without actually reloading it.

@MikhailArkhipov
Copy link
Author

Will reopen from another branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants