Skip to content

Commit

Permalink
Add metadata to environment context
Browse files Browse the repository at this point in the history
  • Loading branch information
foresterre committed Oct 14, 2024
1 parent d88e7e4 commit 68ed154
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ pub struct EnvironmentContext {
/// a file path like `Cargo.toml` or `Cargo.lock`.
pub root_crate_path: Utf8PathBuf,

/// Metadata
pub metadata: cargo_metadata::Metadata,

/// Resolved workspace
pub workspace_packages: WorkspacePackages,
}
Expand Down Expand Up @@ -284,10 +287,12 @@ impl<'shared_opts> TryFrom<&'shared_opts SharedOpts> for EnvironmentContext {
let workspace = opts.workspace.partition_packages(&metadata);
let workspace_packages = WorkspacePackages::from_iter(workspace.0.into_iter().cloned());

info!(?metadata);
info!(?workspace_packages, workspace_packages_excluded = ?workspace.1);

Ok(Self {
root_crate_path,
metadata,
workspace_packages,
})
}
Expand Down

0 comments on commit 68ed154

Please sign in to comment.