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

feat: Log when file not added to source bundle #2146

Merged
merged 1 commit into from
Sep 9, 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
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.93"
sha1_smol = { version = "1.0.0", features = ["serde"] }
sourcemap = { version = "7.0.1", features = ["ram_bundle"] }
symbolic = { version = "12.10.1", features = ["debuginfo-serde", "il2cpp"] }
symbolic = { version = "12.11.0", features = ["debuginfo-serde", "il2cpp"] }
thiserror = "1.0.38"
url = "2.3.1"
username = "0.2.0"
Expand Down
14 changes: 8 additions & 6 deletions src/commands/debug_files/bundle_sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};

use anyhow::Result;
use clap::{Arg, ArgAction, ArgMatches, Command};
use log::warn;
use log::{info, warn};
use symbolic::debuginfo::sourcebundle::SourceBundleWriter;

use crate::utils::dif::DifFile;
Expand Down Expand Up @@ -100,11 +100,13 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
// Resolve source files from the object and write their contents into the archive. Skip to
// upload this bundle if no source could be written. This can happen if there is no file or
// line information in the object file, or if none of the files could be resolved.
let written = writer.write_object_with_filter(
&object,
&filename.to_string_lossy(),
filter_bad_sources,
)?;
let written = writer
.with_skipped_file_callback(|skipped_info| info!("{skipped_info}"))
.write_object_with_filter(
&object,
&filename.to_string_lossy(),
filter_bad_sources,
)?;

if !written {
eprintln!("skipped {orig_path} (no files found)");
Expand Down
5 changes: 3 additions & 2 deletions src/utils/dif_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,9 @@ fn create_source_bundles<'a>(
// Resolve source files from the object and write their contents into the archive. Skip to
// upload this bundle if no source could be written. This can happen if there is no file or
// line information in the object file, or if none of the files could be resolved.
let written =
writer.write_object_with_filter(object, dif.file_name(), filter_bad_sources)?;
let written = writer
.with_skipped_file_callback(|skipped_info| info!("{skipped_info}"))
.write_object_with_filter(object, dif.file_name(), filter_bad_sources)?;
if !written {
debug!("No sources found for {}", name);
continue;
Expand Down
Loading