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

twoliter build variant creates a random directory in the project #180

Closed
webern opened this issue Mar 26, 2024 · 4 comments
Closed

twoliter build variant creates a random directory in the project #180

webern opened this issue Mar 26, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@webern
Copy link
Contributor

webern commented Mar 26, 2024

Description

twoliter build variant creates a directory with a name like .tmpERPdi in the root of the project directory. It shouldn't.

Definition of Done

twoliter build variant no longer creates a random directory in the root of the project.

@webern webern added the bug Something isn't working label Mar 26, 2024
@sumukhballal
Copy link
Contributor

sumukhballal commented Apr 19, 2024

I could not reproduce this on AL2 with Twoliter version v0.1.0. Was there a specific configuration you used?

@sumukhballal
Copy link
Contributor

This issue is probably reproducible on every variant (tested on 1) as during a build when SIGINT or SIGSTP (or SIGTERM) is called on the build process in a linux host, temp files are not cleared. This is expected behavior as per https://docs.rs/tempfile/latest/tempfile/struct.TempDir.html#resource-leaking as the destructors are never called. The build.rs where these files are created are here.

The solution specific to the SIGINT (or SIGTERM OR SIGSTP) signals, I see is to listen to signals and then perform deletion of the tempdir as required. In general cases, when "build_temp_dir" goes out of scope the files will be deleted. It goes out of scope once, run() goes out of scope, so cleanup if guaranteed for stable cases.

@webern
Copy link
Contributor Author

webern commented May 7, 2024

I think the better solution is to put the directory into /tmp so that it doesn't clutter the workspace if it doesn't get cleaned up.

@webern
Copy link
Contributor Author

webern commented Jun 13, 2024

This was fixed by #286

@webern webern closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants