Skip to content

Commit

Permalink
fix(cargo-package): add more traces
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Dec 19, 2024
1 parent 252ad98 commit 6d6b608
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cargo/ops/cargo_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ struct GitVcsInfo {
}

// Builds a tarball and places it in the output directory.
#[tracing::instrument(skip_all)]
fn create_package(
ws: &Workspace<'_>,
pkg: &Package,
Expand Down Expand Up @@ -372,6 +373,7 @@ fn local_deps<T>(packages: impl Iterator<Item = (Package, T)>) -> LocalDependenc
}

/// Performs pre-archiving checks and builds a list of files to archive.
#[tracing::instrument(skip_all)]
fn prepare_archive(
ws: &Workspace<'_>,
pkg: &Package,
Expand Down Expand Up @@ -400,6 +402,7 @@ fn prepare_archive(
}

/// Builds list of files to archive.
#[tracing::instrument(skip_all)]
fn build_ar_list(
ws: &Workspace<'_>,
pkg: &Package,
Expand Down Expand Up @@ -730,6 +733,7 @@ fn check_metadata(pkg: &Package, gctx: &GlobalContext) -> CargoResult<()> {
/// has not been passed, then `bail!` with an informative message. Otherwise
/// return the sha1 hash of the current *HEAD* commit, or `None` if no repo is
/// found.
#[tracing::instrument(skip_all)]
fn check_repo_state(
p: &Package,
src_files: &[PathBuf],
Expand Down
1 change: 1 addition & 0 deletions src/cargo/sources/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl<'gctx> PathSource<'gctx> {
/// are relevant for building this package, but it also contains logic to
/// use other methods like `.gitignore`, `package.include`, or
/// `package.exclude` to filter the list of files.
#[tracing::instrument(skip_all)]
pub fn list_files(&self, pkg: &Package) -> CargoResult<Vec<PathBuf>> {
list_files(pkg, self.gctx)
}
Expand Down

0 comments on commit 6d6b608

Please sign in to comment.