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

[omicron-package] add a way to show what Cargo commands will be run #7268

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Dec 18, 2024

Add a way to see what commands will be run, without actually running them.

As part of this, refactor CargoPlan and change its meaning slightly -- it now
indicates the set of debug and release packages that would be built.

In the future, we'll be able to use these structures to add lints around which
features get built.

Created using spr 1.3.6-beta.1
@sunshowers sunshowers requested review from iliana and smklein December 18, 2024 01:00
Created using spr 1.3.6-beta.1
return Ok(());
}
let release_command = cargo_plan.release.build_command("build", true);
let debug_command = cargo_plan.debug.build_command("build", true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second argument to build_command is a boolean called release - should it be false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ugh... yeah. I'm going to make this an enum.

@@ -110,6 +111,7 @@ pub enum BuildCommand {
#[clap(long)]
intermediate: bool,
},
/// List the build commands that will be run
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment in the right spot? I don't think the Package command has changed in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, whoops, not sure how it ended up there.

Created using spr 1.3.6-beta.1
@sunshowers sunshowers merged commit f59c55e into main Dec 19, 2024
17 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/omicron-package-add-a-way-to-show-what-cargo-commands-will-be-run branch December 19, 2024 19:49
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.

2 participants