vscode's complete and utter lack of configuration as to where to put
the user settings files forces its tasks to be run before linking
files. To be specific, linking settings.json
to
~/Library/Application Support/Code/User
fails, becuase that directory
does not exist, so I set up a topic.tasks.yaml
that ensures the
directory exists - but as of now, topic tasks are run as the last step
of the playbook.
In order to remedy this, I have experimented with running topic tasks
(known as 'post provision tasks') before the linking stage. In order
for this to work reliably, the tag do_post_provision
, that at this
moment is required to trigger topic task execution, should be removed.
This in turn questions the connotations 'post provisioning' has.
Existing tasks (namely for zsh
and emacs
) are not per se required
to run post provision - they can just as well be run before the
linking stage. They are merely "tasks that need to be run for the
topic to function properly".
Removing the tag also highlights an issue with the topic task execution
in general: tasks are not available of topic state. If topic execution
is enabled with the tag, all topic.tasks.yaml
files are sourced, and
all tasks are executed, regardless of their corresponding topic's state.
Removing the tag makes this issue even more prevalent - every run
of the playbook (every boom deploy
) will include these tasks.
I suggest removing the notion of post_provision_tasks
altogether.
Topic tasks may be tied to topic state using a when
clause for
topics.<group>.<name>.state = 'present'
. This is a bit awkward, but
the best I can think of now.
This would require a change or deprecation in
[https://github.com/eliasnorrby/dotfiles-cli](the dotfiles cli) as well.
Issue tracking vscode config file location setup:
microsoft/vscode#3884