livebook
livebook copied to clipboard
Improve workflow for running inside Mix projects
-
[ ] When going to the Mix runtime tab, we can traverse the directory up. If any of the directories have a
mix.exs
, we can default to it in the input selector. -
[ ] We should persist in the notebook the runtime information, but this should only be possible if the notebook itself is located within the
mix.exs
directory. In this case, we will show a checkbox: "[ ] Save this choice within the notebook". If that is not the case, the checkbox should be disabled we will show: "[ ] Save this choice within the notebook (this option is only available if the notebook is saved within the Mix project".
I would like to take a stab at this - I just had a couple of clarifications:
- For the first one - can you please clarify "traverse the directory up"? Say we have a directory
/dir
, with sub directoriessubdir_a
andsubdir_b
. Ifsubdir_b
has amix.exs
then we show/dir/subdir_b
in the input selector. Is this correct? If yes then ifsubdir_a
also had amix.exs
then we default to the first subdir withmix.exs
? - For the second one - the only runtime information to save is the command line flags no? Anything else?
Thanks @adarsh1021!
We have actually decided to take another approach here. From Elixir v1.14, we will allow Mix.install to load the lockfile and config files from other projects. This will solve many problems with the Mix runtime, in particular that it forces you to add Kino deps to your application. So this task is no longer relevant. :)