Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add more high level traces #13951

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ impl TargetInfo {
/// invocation is cached by [`Rustc::cached_output`].
///
/// Search `Tricky` to learn why querying `rustc` several times is needed.
#[tracing::instrument(skip_all)]
pub fn new(
gctx: &GlobalContext,
requested_kinds: &[CompileKind],
Expand Down Expand Up @@ -878,6 +879,7 @@ pub struct RustcTargetData<'gctx> {
}

impl<'gctx> RustcTargetData<'gctx> {
#[tracing::instrument(skip_all)]
pub fn new(
ws: &Workspace<'gctx>,
requested_kinds: &[CompileKind],
Expand Down
2 changes: 2 additions & 0 deletions src/cargo/core/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ impl<'a, 'gctx> Downloads<'a, 'gctx> {
/// Returns `None` if the package is queued up for download and will
/// eventually be returned from `wait_for_download`. Returns `Some(pkg)` if
/// the package is ready and doesn't need to be downloaded.
#[tracing::instrument(skip_all)]
pub fn start(&mut self, id: PackageId) -> CargoResult<Option<&'a Package>> {
self.start_inner(id)
.with_context(|| format!("failed to download `{}`", id))
Expand Down Expand Up @@ -793,6 +794,7 @@ impl<'a, 'gctx> Downloads<'a, 'gctx> {
/// # Panics
///
/// This function will panic if there are no remaining downloads.
#[tracing::instrument(skip_all)]
pub fn wait(&mut self) -> CargoResult<&'a Package> {
let (dl, data) = loop {
assert_eq!(self.pending.len(), self.pending_ids.len());
Expand Down