Skip to content

Use status, kill, start, and check for dmypy #45

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 3 commits into from
Nov 20, 2022

Conversation

tyoung-patreon
Copy link

@tyoung-patreon tyoung-patreon commented Oct 26, 2022

Fixes usage of dmypy so only one instance is started and they don't constantly kill eachother.

Fixes #44

@Richardk2n
Copy link
Member

Not calling status is something that changed some time ago with no particular reason as far as I can tell, so we can fix that.

Why call start after kill, would the next run not do that anyway?

Does this fix your issue?

@tyoung-patreon
Copy link
Author

This change did fix my issues, I think run works fine as well but I definitely found it more confusing when debugging and trying to identify which process was the daemon and which was being submitted to the daemon.

The bad interaction happens in the following scenario:

  1. pylsp-mypy runs and starts a new dmypy command, it starts processing
  2. I open a new file
  3. pylsp-mypy runs and checks if dmypy is running. Instead of a successful response it just hangs
  4. pylsp-mypy kills the original process and starts a new one

This continues until I stop editing files or I wait long enough for one of the dmypy tasks to fully index. It's a pretty rough experience for my project where the initial dmypy run takes several minutes, and during that time if I edit anything it starts over entirely. When I was debugging this is was helpful to have a dmypy start command distinct from the dmypy run commands so I knew which process was which, but maybe that's just personal preference.

StabbarN pushed a commit to StabbarN/pylsp-mypy that referenced this pull request Nov 20, 2022
@Richardk2n Richardk2n merged commit 1c5a336 into python-lsp:master Nov 20, 2022
@delfick
Copy link

delfick commented Dec 12, 2022

hello, I'm wondering if you have an idea of when you'll release a new version with this change? thanks!

@Richardk2n
Copy link
Member

Now

@delfick
Copy link

delfick commented Dec 12, 2022

perfect, thanks!

StabbarN pushed a commit to StabbarN/pylsp-mypy that referenced this pull request Dec 13, 2022
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.

Two invocations of dmypy made and appear to invalidate the cache
4 participants