Repository navigation
fix(mkconcore): make the posix clear script empty every edge directory - #617
Open
Atharvsinh-codez wants to merge 1 commit into
Open
Atharvsinh-codez wants to merge 1 commit into
Atharvsinh-codez wants to merge 1 commit into
Conversation
The generated clear script runs `cd <edge> && rm -f *` once per edge in the same shell, so after the first line it is still inside that edge's directory. Every later relative cd fails and its rm is skipped: only the first edge gets cleared and ./clear exits 1. This came in with the shell-escaping change in 991373c, which replaced `rm <edge>/*`. Run each line in a subshell so the cd does not carry over.
|
🎉 Welcome aboard, @Atharvsinh-codez! Thank you for your first pull request in concore. Please ensure that you are contributing to the dev branch. Your contribution means a lot to us. We'll review it shortly. Please ensure you have reviewed our: If you have any questions, feel free to ask. Happy coding! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The posix
clearscript that mkconcore generates only empties the first edge directory.Each edge gets a line like
cd Y && rm -f *, and all of them run in the same shell. After the first line the script is still insideY, so every later relativecdfails, itsrmis skipped, and./clearexits 1. The remaining edges keep their old data, so the next run of the study starts from stale values.With
demo/sample.graphmlon dev:./clearprintscd: PYM: No such file or directory, exits 1, and leaves everything inPYM.This came in with 991373c (shell escaping), which replaced
rm <edge>/*with thecd. I kept that approach and just run each line in a subshell,(cd CU && rm -f *), so thecddoesn't carry over. Windows (del /Q) and docker (docker volume rm) clear scripts don'tcd, so they're not affected.Changes:
buildandclear, and check that every edge directory is empty andclearexits 0. It fails on dev and passes with this change. Skipped on Windows since it runs the bash scripts.Verified with:
pytest(217 passed, 4 skipped)demo/sample.graphmlwith posix, put a file in each edge directory and ran./clear: on devPYMis left behind and the exit code is 1, with this change both are emptied and it exits 0ruff format --check .andruff check .I used an AI assistant to help track this down and write the test. I've reviewed the change and run everything above myself.