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

Flaky (works once, but never again) out-of-the-box #128

Closed
posita opened this issue Aug 27, 2023 · 2 comments
Closed

Flaky (works once, but never again) out-of-the-box #128

posita opened this issue Aug 27, 2023 · 2 comments

Comments

@posita
Copy link
Contributor

posita commented Aug 27, 2023

Steps to reproduce (ref posita/dyce@790a067):

% uname -prism
Linux 6.4.6-76060406-generic x86_64 x86_64 x86_64
% which python
python not found
% which python3
/usr/bin/python3
% python3 --version
Python 3.10.12
% git clone https://github.com/posita/dyce.git
Cloning into 'dyce'...
remote: Enumerating objects: 7093, done.
remote: Counting objects: 100% (2781/2781), done.
remote: Compressing objects: 100% (1320/1320), done.
remote: Total 7093 (delta 1481), reused 2565 (delta 1375), pack-reused 4312
Receiving objects: 100% (7093/7093), 39.06 MiB | 2.97 MiB/s, done.
Resolving deltas: 100% (4528/4528), done.
% cd dyce
% git checkout 790a067
% which code
/usr/bin/code
% code .

Once open:

  1. Command Palette -> Output: Focus on Output View
  2. Go to File... -> evaluation.py
  3. Command Palette -> Output: Show Output Channels... -> Mypy Type Checker

Without further input, this will (eventually) lead to the following problems:

Missing return statement
[{
	"resource": "/home/<username>/<path>/dyce/dyce/evaluation.py",
	"owner": "_generated_diagnostic_collection_name_#3",
	"code": {
		"value": "empty-body",
		"target": {
			"$mid": 1,
			"path": "/en/latest/_refs.html",
			"scheme": "https",
			"authority": "mypy.readthedocs.io",
			"fragment": "code-empty-body"
		}
	},
	"severity": 8,
	"message": "Missing return statement",
	"source": "Mypy",
	"startLineNumber": 87,
	"startColumn": 5,
	"endLineNumber": 93,
	"endColumn": 12
}]

Add some text to the comment at the top of the opened evaluation.py file and save the file. Note that Mypy is run but no longer detects the error. Remove your edits and save. Mypy runs again, but still doesn't detect the error. You can only get the error back by reloading the window.

@posita
Copy link
Contributor Author

posita commented Aug 27, 2023

Possible duplicate of #119 or #126.

@karthiknadig
Copy link
Member

This is due to #88

This is an issue with dmypy itself, this occurs due to some caching issue with dmypy.

Closing in favor of this which should address it. #115

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants