KEMBAR78
Fix crash with `--cache-fine-grained --cache-dir=/dev/null` by hauntsaninja · Pull Request #18457 · python/mypy · GitHub
Skip to content

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Jan 13, 2025

Fixes #18454

Couldn't easily repro in test suite. See #18454 (comment) for repro

Fixes python#18454

Couldn't easily repro in test suite
@hauntsaninja hauntsaninja changed the title Fix crash with --cache-dir=/dev/null Fix crash with --cache-fine-grained --cache-dir=/dev/null Jan 13, 2025
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

schemathesis (https://github.com/schemathesis/schemathesis)
- Traceback (most recent call last):
-   File "/tmp/mypy_primer/old_mypy/venv/bin/mypy", line 8, in <module>
-     sys.exit(console_entry())
-              ^^^^^^^^^^^^^^^
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.12/site-packages/mypy/__main__.py", line 15, in console_entry
-     main()
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.12/site-packages/mypy/main.py", line 119, in main
-     res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
-                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.12/site-packages/mypy/main.py", line 203, in run_build
-     res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
-           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.12/site-packages/mypy/build.py", line 191, in build
-     result = _build(
-              ^^^^^^^
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.12/site-packages/mypy/build.py", line 267, in _build
-     graph = dispatch(sources, manager, stdout)
-             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.12/site-packages/mypy/build.py", line 2947, in dispatch
-     write_deps_cache(rdeps, manager, graph)
-   File "/tmp/mypy_primer/old_mypy/venv/lib/python3.12/site-packages/mypy/build.py", line 976, in write_deps_cache
-     assert st.meta, "Module must be either parsed or cached"
-            ^^^^^^^
- AssertionError: Module must be either parsed or cached

@hauntsaninja
Copy link
Collaborator Author

But can repro in primer! :-)

@hauntsaninja hauntsaninja merged commit d7ebe2e into python:master Jan 13, 2025
18 checks passed
@hauntsaninja hauntsaninja deleted the fix-crasher branch January 13, 2025 23:25
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.

Crash on schemathesis with --cache-dir=/dev/null

1 participant