add --keep-result-dir flag#132
Conversation
| job.state(JobState::Running)?; | ||
| let path = dir.join(".gcroots").join(format!("node-{}", &*target.name)); | ||
| let path = dir | ||
| .join(self.options.create_gc_roots_dir.to_owned()) |
There was a problem hiding this comment.
When people specify --keep-result-dir, they might expect the path to be relative to the PWD instead of the configuration base. I'm not sure what's the desirable behavior here.
There was a problem hiding this comment.
isn't the behavior still the same as before? Not sure I understand what the configuration base is. The default is still to put things into .gcroots in whatever directory you are in currently, but now you may also specify other absolute or relative paths.
There was a problem hiding this comment.
The thing is that Colmena doesn't put it in .gcroots under whatever directory you are in, but under the directory where flake.nix or hive.nix exists. If no -f is specified, Colmena automatically searched upwards for a flake.nix or hive.nix and use it as the context_dir. With the current implementation, the behavior of colmena apply --keep-result --keep-result-dir ./.myroots would be confusing if it's run in a sub-directory.
There was a problem hiding this comment.
Ah, I see... I'm not sure what people would expect since I never change into subdirectories, but one could always give --keep-result-dir "$PWD/.myroots" in this case?
There was a problem hiding this comment.
so maybe instead of linking it, just print it?
Should resolve #79 and #118