tests: the emit-obj corpus test shares one temp directory, so two runs at the same time fail

Open Beginner friendly
#3,367 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
testing

Research direction

Start with the_backend_corpus_emits_object_files in tests/integration_test/emit_obj_produces_objects.rs. It writes every object into the fixed path std::env::temp_dir()/vx_emit_obj_gate and deletes the previous file before each compile, so concurrent runs collide. Reproduce by running the test in two checkouts at once. Done when each run uses its own directory (a tempfile::TempDir or a name that includes std::process::id()) and the concurrent runs both pass.

Written by the indexing model from the issue text.

Description

bug testing

the_backend_corpus_emits_object_files in tests/integration_test/emit_obj_produces_objects.rs writes each object to one fixed directory, std::env::temp_dir()/vx_emit_obj_gate. Before each compile, it deletes that object file. Two checkouts that run the test at the same time use the same directory. So one run can delete the object of the other run, and the other run then reports ".vx: no object" for a file that compiles.

On 2026-11-14, three worktrees ran the pre-commit hook at the same time. The test failed in two of them, on bitwise_operators.vx and book_errors_question_mark.vx. Each file compiled to an object when the test ran alone, and each hook passed when it ran again.

Fix: give each run its own directory, for example a tempfile::TempDir, or a name that includes std::process::id().

Generated With Claude Code

Dominant language
Rust
Stars
35
Forks
5
Avg merge
12h 26m
Merged PRs (30d)
799

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vx-lang/Vx

All issues in vx-lang/Vx

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.