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

Add filesystem watch functionality to enable auto update of diagrams #203

Open
bkryza opened this issue Nov 5, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@bkryza
Copy link
Owner

bkryza commented Nov 5, 2023

For some use cases it would be useful to be able to run clang-uml with a --watch option, that would generate diagrams, and then subscribe for filesystem events. In case any of the files matching any of the glob patterns in any diagram changes, it would automatically regenerate such diagram.

This could be done either by using non-portable OS specific mechanisms such as inotify, or by looping forever on the list of translation units from compile_commands.json and comparing timestamps (this would be portable through std::filesystem).

The main problem is that this will only detect changes in the main translation unit cpp file, not in any of its headers. For this we could extend diagram generation to return a list of all included headers, and cache it so on the next loop iteration we can watch those files too...

@bkryza bkryza added the enhancement New feature or request label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant