In create_workspace_dialog(path) armarx_setup/cli/workspace/integration.py:93. Ask the user if for the new workspace ccache should be enabled by default. If yes, uncomment the workspace variables in armarx-workspace.json by adding ccache_enabled as a bool variable to Config.get_defaults(cls) in armarx_setup/core/workspace/config.py. The option should default to yes.
Yeah you can do this, and thanks for offering help. The forward-facing requirements are:
The dialog has an interactive mode, which is enabled if no workspace path and workspace name are provided
In interactive mode, as very last step, you can ask the user for ccache and it might be enabled by default
In non-interactive mode, it must be disabled by default
Have a --cache flag and a --no-ccache flag for the axii w create command
axii w createmust not become interactive just for ccache. this means that if axii w create was not interactive before your changes, it must not become interactive afterwards. This would break CI and scripts depending on Axii.
Please look into other CLI utilities to use the correct tools and features, for example on how to prompt the user etc.
I think that the default should be no ccache (in interactive). I.e. when you just press enter, you do not enable ccache.
There should also be a brief explanation of the implications. "Do you want to enable Ccache? This can speed up recompilation, but requires additional disk space" or something along these lines
The way I implemented it right now is that in non-interactive mode it is not enabled and in interactive mode it is opt-out. What is the reason to make it opt-in in interactive? I think everyone here uses ccache so people that don't know about the details should enable ccache unless there is a reason not to.
For me the reason is that is has implications that you should be aware of, e.g. using extra 50 GB of your disk space. We can say it is recommended, but when you just press enter without caring, we should limit unexpected/non-obvious behavior, in my opinion.
Just discussed with @dreher, please check if correct:
Handling of ccache size is not ideal yet. We can write a small bash script similar to NVIDIA-cuda that uses a global ccache_size variable in axii if ccache is enabled to make sure ccache is setup correctly.
The global variable can be read and set using axii config --global ccache_size
ccache_size is global for all workspaces, correct?
In the prepare step of ccache create a script that does the following
If ccache_size is not set, prompt the user for a recommended ccache size or default to 100GB. (What do you think is better? I think having defaults is probably better, otherwise, we will have a growing list of prompts users have to go through to setup an armarx workspace)
Use ccache -s and parse output to verify that the current cache size is larger than global ccache_size.
If not, use ccache -M {ccache_size} to set the ccache to the corresponding size.
Thanks! I am not sure whether the default is too large (100 GB) or whether we should stick to the official default. On the other hand, that's a good value for ArmarX, so I am fine with it.