-
Notifications
You must be signed in to change notification settings - Fork 75
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
add --keep-result-dir flag #132
base: main
Are you sure you want to change the base?
Conversation
@@ -523,7 +523,9 @@ impl Deployment { | |||
job.run_waiting(|job| async move { | |||
if let Some(dir) = arc_self.hive.context_dir() { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so maybe instead of linking it, just print it?
Should resolve #79 and #118