Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manveru
Copy link

@manveru manveru commented Jan 20, 2023

Should resolve #79 and #118

@@ -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())
Copy link
Owner

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.

Copy link
Author

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.

Copy link
Owner

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.

Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.gcroots -> make it configurable
2 participants