Skip to content

#13 Use safe temporary files in preprocessors and minifiers - #21

Merged
iray-tno merged 1 commit into
mainfrom
feature/13_safe_temporary_files
Jun 12, 2026
Merged

#13 Use safe temporary files in preprocessors and minifiers#21
iray-tno merged 1 commit into
mainfrom
feature/13_safe_temporary_files

Conversation

@iray-tno

Copy link
Copy Markdown
Owner

Summary

  • Replace fixed C++ preprocessor/minifier temp filenames with unique NamedTemporaryFile paths.
  • Replace fixed Rust rustfmt temp filename with a unique NamedTemporaryFile path.
  • Keep cleanup exception-safe with finally blocks.
  • Add regression coverage that legacy temp filenames are not created, including formatter-failure cleanup.

Tests

  • uv run pytest tests/test_cpp_preprocessor.py tests/test_error_messages.py::TestErrorMessages::test_cpp_formatter_failure_is_reported tests/test_rust_integration.py::TestRustPreprocessorBasic::test_single_file_no_modules -q
  • uv run pytest -q

Closes #13.

@iray-tno
iray-tno merged commit 84aecbf into main Jun 12, 2026
2 checks passed
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.

Use safe temporary files in preprocessors and minifiers

1 participant