You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pylint attempts to write a crash report to ~/.cache/pylint/ when it encounters a fatal error.
If that directory does not exist (or has been removed), the template will be written to the console instead.
Maybe the crash handler can be enhanced to try to create the directory before writing the report?
Configuration
N/A
Command used
rm -rf ~/.cache/pylint/
# Use https://github.com/pylint-dev/pylint/issues/8746 for the contents of crasher.py
pylint crasher.py
Pylint output
Can't write the issue template for the crash in /home/user/.cache/pylint/pylint-crash-2024-10-23-14-23-08.txt because of: '[Errno 2] No such file or directory: '/home/user/.cache/pylint/pylint-crash-2024-10-23-14-23-08.txt''
Expected behavior
The ~/.cache/pylint/ directory is created and the crash report is written there.
Maybe... it's something that was done fast because it was crashing live after a release (crash on crash, not a good look). But at the same time, I thought (think) that it's better to have the crash report displayed in the terminal if we can't write it in the cache dir. Because typically if you don't have write rights to this directory, the probability that you're in a CI job is very high [citation required]. And a file being written correctly in a temporary CI container is very useless as you might not easily be able to reproduce and to see it you'd need to cat it after relaunching the job and changing the CI job (not convenient). Also we need to take into account that pylint could be launched in threads and writing the file from multiple jobs (Refs #5987#5969 (comment))
Yeah. Without certainty because I didn't check when this cache is created, the lack of directory might be an indirect clue that it's a new container that was just fired up (locally or in CI). Not fixing this feels lazy that makes pylint a little unpredictable. At the same time detecting that we're in a CI is hard, and specifying what to do here also take time for something that should not happen (but you're affected a lot by it because of the amazing fuzzing work you do, discovering SO MANY crashes 🚀 ). Let's see what other maintainers think and take a decision before 4.0.
Bug description
Pylint attempts to write a crash report to
~/.cache/pylint/
when it encounters a fatal error.If that directory does not exist (or has been removed), the template will be written to the console instead.
Maybe the crash handler can be enhanced to try to create the directory before writing the report?
Configuration
N/A
Command used
Pylint output
Expected behavior
The
~/.cache/pylint/
directory is created and the crash report is written there.Pylint version
pylint 4.0.0-dev0
astroid 4.0.0-dev0
Python 3.12.7 (main, Oct 1 2024, 11:15:50) [GCC 14.2.1 20240910]
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: