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

Don't delete file when task is being started #37

Open
vanniktech opened this issue May 4, 2022 · 5 comments
Open

Don't delete file when task is being started #37

vanniktech opened this issue May 4, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@vanniktech
Copy link
Contributor

It seems like when I execute a task metalavaGenerateSignatureDebug the text file is immediately deleted. If I now in the meantime while the task is doing it's work, cancel the task I end up with a deleted text file.

Would it be possible to stop deleting the file at the invocation of the task and instead simply overwrite the file when processing has finished?

@tylerbwong tylerbwong added the bug Something isn't working label May 4, 2022
@tylerbwong
Copy link
Owner

tylerbwong commented May 4, 2022

I was able to reproduce with the current version of the plugin. I think this will be fixed by #35. I wasn't able to reproduce locally while testing on that branch. We'll keep this issue open in the meantime until the new changes are released. Nevermind, was able to reproduce on the new branch as well. Will investigate further.

@tylerbwong
Copy link
Owner

It seems this is being done within the Metalava tool. When parsing the flag for --api, stringToNewFile is used which always deletes the previous file if it exists.

@vanniktech
Copy link
Contributor Author

Hmmm is there any way around it?

@tylerbwong
Copy link
Owner

Hey @liutikas any thoughts about this?

@liutikas
Copy link

I would recommend using a temporary place for the API file passed to metalava and then copy it over to final place once it completes

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

No branches or pull requests

3 participants