-
Notifications
You must be signed in to change notification settings - Fork 401
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
Set the current directory for Elixir executable #93
Comments
Changing the directory can lead to unexpected results. Imagine you go to By default I'd expect cwd to reflect wherever I start the Livebook server, and it's more that Mix and Attached are very specific cases, where cwd is different by their nature. |
@jonatanklosko here is the issue: imagine I want to ship some livebook with some data. I can put it all on a zip file and I can tell folks to unpack and run it. How to do so? :) Do we at least ensure that ENV.file today points to the |
We don't, but this sounds like an option. This way we could also put |
It would, yeah. So let's go with setting the file name to the livebook path. And if it is memory, we set it to "in-memory.livemd"? I am not sure if the specific cell matters, because we always show errors close to the cell anyway and all of the cell IDs are private? |
Yeah, my only point was that we would say |
@jonatanklosko oh, I see. We could set the file to something like "notebook.livemd#cell:3" but it means |
I have been playing with Livebook to give my presentation on Nx and MNIST and I noticed a problem related to the current working directory. For the Elixir executable, we are running it on the Livebook server directory but in this case I think it makes the most sense for it to be the in the same directory as the Livebook file itself.
This will work fine for when you open up an existing Livebook, but what to do when you start with the Livebook in memory and then you save it? Should we change cwd of the existing evaluator? I would say so.
For the Mix evaluator, we will document the root is the Mix project root. For the distributed one, it is whatever the existing node is in.
The text was updated successfully, but these errors were encountered: