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

Fix crash with --cache-fine-grained --cache-dir=/dev/null #18457

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

hauntsaninja
Copy link
Collaborator

Fixes #18454

Couldn't easily repro in test suite

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
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