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

Conversation

@MikhailArkhipov
Copy link

Fixes #1543
Sligtly different from #1585.

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

  • Remove black formatter if you have one installed.
  • Open scikit-learn
  • Open conftest.py
  • While analysis is running, make changes like add space after dot in del sys._is_pytest_session
  • Format document
  • When prompted to install black say yes.
  • 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 SetContent, 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.

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.

Strange parsing errors

1 participant