sentry-cli 2.14.2__tar.gz → 2.14.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/Cargo.lock +16 -21
  2. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/Cargo.toml +7 -3
  3. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/PKG-INFO +9 -1
  4. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/README.md +8 -0
  5. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/sentry_cli.egg-info/PKG-INFO +9 -1
  6. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/api.rs +1 -1
  7. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/bash_hook.rs +12 -7
  8. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/debug_files/bundle_sources.rs +2 -6
  9. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/debug_files/check.rs +4 -3
  10. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/debug_files/find.rs +7 -4
  11. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/debug_files/print_sources.rs +15 -2
  12. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/debug_files/upload.rs +80 -47
  13. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/events/list.rs +7 -5
  14. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/files/delete.rs +4 -3
  15. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/files/upload.rs +6 -4
  16. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/info.rs +15 -9
  17. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/issues/mod.rs +1 -0
  18. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/issues/resolve.rs +3 -2
  19. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/login.rs +3 -2
  20. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/mod.rs +6 -6
  21. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/monitors/run.rs +4 -4
  22. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/react_native/appcenter.rs +8 -6
  23. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/react_native/gradle.rs +3 -2
  24. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/react_native/xcode.rs +37 -21
  25. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/archive.rs +1 -1
  26. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/delete.rs +1 -1
  27. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/finalize.rs +1 -1
  28. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/info.rs +8 -6
  29. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/list.rs +13 -6
  30. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/mod.rs +2 -2
  31. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/new.rs +4 -3
  32. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/restore.rs +1 -1
  33. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/set_commits.rs +14 -8
  34. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/send_envelope.rs +3 -2
  35. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/send_event.rs +4 -2
  36. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/sourcemaps/explain.rs +3 -2
  37. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/sourcemaps/upload.rs +52 -26
  38. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/uninstall.rs +3 -2
  39. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/update.rs +3 -2
  40. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/upload_proguard.rs +18 -11
  41. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/config.rs +1 -1
  42. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/args.rs +9 -7
  43. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/dif_upload.rs +20 -17
  44. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/LICENSE +0 -0
  45. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/MANIFEST.in +0 -0
  46. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/build.rs +0 -0
  47. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/pyproject.toml +0 -0
  48. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/sentry_cli.egg-info/SOURCES.txt +0 -0
  49. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/sentry_cli.egg-info/dependency_links.txt +0 -0
  50. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/sentry_cli.egg-info/top_level.txt +0 -0
  51. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/setup.cfg +0 -0
  52. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/setup.py +0 -0
  53. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/bashsupport.sh +0 -0
  54. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/debug_files/mod.rs +0 -0
  55. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/deploys/list.rs +0 -0
  56. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/deploys/mod.rs +0 -0
  57. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/deploys/new.rs +0 -0
  58. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/events/mod.rs +0 -0
  59. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/files/list.rs +0 -0
  60. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/files/mod.rs +0 -0
  61. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/issues/mute.rs +0 -0
  62. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/issues/unresolve.rs +0 -0
  63. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/monitors/list.rs +0 -0
  64. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/monitors/mod.rs +0 -0
  65. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/organizations/list.rs +0 -0
  66. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/organizations/mod.rs +0 -0
  67. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/projects/list.rs +0 -0
  68. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/projects/mod.rs +0 -0
  69. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/react_native/mod.rs +0 -0
  70. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/releases/propose_version.rs +0 -0
  71. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/repos/list.rs +0 -0
  72. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/repos/mod.rs +0 -0
  73. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/sourcemaps/inject.rs +0 -0
  74. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/sourcemaps/mod.rs +0 -0
  75. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/sourcemaps/resolve.rs +0 -0
  76. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/upload_dif.rs +0 -0
  77. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/commands/upload_dsym.rs +0 -0
  78. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/constants.rs +0 -0
  79. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/main.rs +0 -0
  80. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/android.rs +0 -0
  81. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/appcenter.rs +0 -0
  82. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/chunks.rs +0 -0
  83. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/codepush.rs +0 -0
  84. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/cordova.rs +0 -0
  85. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/dif.rs +0 -0
  86. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/enc.rs +0 -0
  87. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/event.rs +0 -0
  88. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/file_search.rs +0 -0
  89. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/file_upload.rs +0 -0
  90. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/formatting.rs +0 -0
  91. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/fs.rs +0 -0
  92. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/http.rs +0 -0
  93. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/logging.rs +0 -0
  94. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/mod.rs +0 -0
  95. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/progress.rs +0 -0
  96. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/releases.rs +0 -0
  97. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/retry.rs +0 -0
  98. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_default_twenty.snap +0 -0
  99. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_ignore_missing.snap +0 -0
  100. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_base.snap +0 -0
  101. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_previous_commit.snap +0 -0
  102. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/snapshots/sentry_cli__utils__vcs__get_commits_from_git.snap +0 -0
  103. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/sourcemaps.rs +0 -0
  104. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/system.rs +0 -0
  105. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/ui.rs +0 -0
  106. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/update.rs +0 -0
  107. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/vcs.rs +0 -0
  108. {sentry_cli-2.14.2 → sentry_cli-2.14.4}/src/utils/xcode.rs +0 -0
@@ -330,23 +330,21 @@ dependencies = [
330
330
 
331
331
  [[package]]
332
332
  name = "clap"
333
- version = "3.2.23"
333
+ version = "4.1.6"
334
334
  source = "registry+https://github.com/rust-lang/crates.io-index"
335
- checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
335
+ checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3"
336
336
  dependencies = [
337
337
  "bitflags",
338
338
  "clap_lex",
339
- "indexmap",
340
339
  "strsim",
341
340
  "terminal_size",
342
- "textwrap",
343
341
  ]
344
342
 
345
343
  [[package]]
346
344
  name = "clap_lex"
347
- version = "0.2.4"
345
+ version = "0.3.1"
348
346
  source = "registry+https://github.com/rust-lang/crates.io-index"
349
- checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
347
+ checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
350
348
  dependencies = [
351
349
  "os_str_bytes",
352
350
  ]
@@ -590,6 +588,12 @@ dependencies = [
590
588
  "syn",
591
589
  ]
592
590
 
591
+ [[package]]
592
+ name = "data-encoding"
593
+ version = "2.3.3"
594
+ source = "registry+https://github.com/rust-lang/crates.io-index"
595
+ checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb"
596
+
593
597
  [[package]]
594
598
  name = "debugid"
595
599
  version = "0.8.0"
@@ -1525,9 +1529,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
1525
1529
 
1526
1530
  [[package]]
1527
1531
  name = "openssl-src"
1528
- version = "111.24.0+1.1.1s"
1532
+ version = "111.25.0+1.1.1t"
1529
1533
  source = "registry+https://github.com/rust-lang/crates.io-index"
1530
- checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd"
1534
+ checksum = "3173cd3626c43e3854b1b727422a276e568d9ec5fe8cec197822cf52cfb743d6"
1531
1535
  dependencies = [
1532
1536
  "cc",
1533
1537
  ]
@@ -2191,7 +2195,7 @@ dependencies = [
2191
2195
 
2192
2196
  [[package]]
2193
2197
  name = "sentry-cli"
2194
- version = "2.14.2"
2198
+ version = "2.14.4"
2195
2199
  dependencies = [
2196
2200
  "anyhow",
2197
2201
  "anylog",
@@ -2469,11 +2473,11 @@ dependencies = [
2469
2473
 
2470
2474
  [[package]]
2471
2475
  name = "sourcemap"
2472
- version = "6.2.1"
2476
+ version = "6.2.3"
2473
2477
  source = "registry+https://github.com/rust-lang/crates.io-index"
2474
- checksum = "aebe057d110ddba043708da3fb010bf562ff6e9d4d60c9ee92860527bcbeccd6"
2478
+ checksum = "eed16231c92d0a6f0388f56e0ab2be24ecff1173f8e22f0ea5e074d0525631cb"
2475
2479
  dependencies = [
2476
- "base64",
2480
+ "data-encoding",
2477
2481
  "if_chain",
2478
2482
  "rustc_version 0.2.3",
2479
2483
  "scroll 0.10.2",
@@ -2676,15 +2680,6 @@ dependencies = [
2676
2680
  "windows-sys",
2677
2681
  ]
2678
2682
 
2679
- [[package]]
2680
- name = "textwrap"
2681
- version = "0.16.0"
2682
- source = "registry+https://github.com/rust-lang/crates.io-index"
2683
- checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
2684
- dependencies = [
2685
- "terminal_size",
2686
- ]
2687
-
2688
2683
  [[package]]
2689
2684
  name = "thiserror"
2690
2685
  version = "1.0.38"
@@ -2,7 +2,7 @@
2
2
  authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
3
3
  build = "build.rs"
4
4
  name = "sentry-cli"
5
- version = "2.14.2"
5
+ version = "2.14.4"
6
6
  edition = "2021"
7
7
  rust-version = "1.65"
8
8
 
@@ -15,10 +15,14 @@ brotli2 = "0.3.2"
15
15
  bytecount = "0.6.3"
16
16
  chardet = "0.2.4"
17
17
  chrono = { version = "0.4.23", features = ["serde"] }
18
- clap = { version = "3.2.23", default-features = false, features = [
18
+ clap = { version = "4.1.6", default-features = false, features = [
19
19
  "std",
20
20
  "suggestions",
21
21
  "wrap_help",
22
+ "string",
23
+ "help",
24
+ "usage",
25
+ "error-context"
22
26
  ] }
23
27
  console = "0.15.5"
24
28
  curl = { version = "0.4.44", features = ["static-curl", "static-ssl"] }
@@ -61,7 +65,7 @@ sentry = { version = "0.29.3", default-features = false, features = [
61
65
  serde = { version = "1.0.152", features = ["derive"] }
62
66
  serde_json = "1.0.93"
63
67
  sha1_smol = { version = "1.0.0", features = ["serde"] }
64
- sourcemap = { version = "6.2.1", features = ["ram_bundle"] }
68
+ sourcemap = { version = "6.2.3", features = ["ram_bundle"] }
65
69
  symbolic = { version = "12.0.0", features = ["debuginfo-serde", "il2cpp"] }
66
70
  thiserror = "1.0.38"
67
71
  url = "2.3.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry_cli
3
- Version: 2.14.2
3
+ Version: 2.14.4
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -59,6 +59,14 @@ To verify it’s installed correctly you can bring up the help:
59
59
 
60
60
  sentry-cli --help
61
61
 
62
+ ### pip
63
+
64
+ _New in 2.14.3_: `sentry-cli` can also be installed using `pip`:
65
+
66
+ ```bash
67
+ pip install sentry-cli
68
+ ```
69
+
62
70
  ### Node
63
71
 
64
72
  Additionally you can also install this binary via npm:
@@ -42,6 +42,14 @@ To verify it’s installed correctly you can bring up the help:
42
42
 
43
43
  sentry-cli --help
44
44
 
45
+ ### pip
46
+
47
+ _New in 2.14.3_: `sentry-cli` can also be installed using `pip`:
48
+
49
+ ```bash
50
+ pip install sentry-cli
51
+ ```
52
+
45
53
  ### Node
46
54
 
47
55
  Additionally you can also install this binary via npm:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry-cli
3
- Version: 2.14.2
3
+ Version: 2.14.4
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -59,6 +59,14 @@ To verify it’s installed correctly you can bring up the help:
59
59
 
60
60
  sentry-cli --help
61
61
 
62
+ ### pip
63
+
64
+ _New in 2.14.3_: `sentry-cli` can also be installed using `pip`:
65
+
66
+ ```bash
67
+ pip install sentry-cli
68
+ ```
69
+
62
70
  ### Node
63
71
 
64
72
  Additionally you can also install this binary via npm:
@@ -2326,7 +2326,7 @@ impl IssueFilter {
2326
2326
  }
2327
2327
 
2328
2328
  pub fn get_filter_from_matches(matches: &ArgMatches) -> Result<IssueFilter> {
2329
- if matches.contains_id("all") {
2329
+ if matches.get_flag("all") {
2330
2330
  return Ok(IssueFilter::All);
2331
2331
  }
2332
2332
  if let Some(status) = matches.get_one::<String>("status") {
@@ -6,8 +6,7 @@ use std::io::{BufRead, BufReader};
6
6
  use std::path::Path;
7
7
 
8
8
  use anyhow::Result;
9
- use clap::Command;
10
- use clap::{Arg, ArgMatches};
9
+ use clap::{builder::ArgPredicate, Arg, ArgAction, ArgMatches, Command};
11
10
  use lazy_static::lazy_static;
12
11
  use regex::Regex;
13
12
  use sentry::protocol::{Event, Exception, Frame, Stacktrace, User, Value};
@@ -31,11 +30,13 @@ pub fn make_command(command: Command) -> Command {
31
30
  .arg(
32
31
  Arg::new("no_exit")
33
32
  .long("no-exit")
33
+ .action(ArgAction::SetTrue)
34
34
  .help("Do not turn on -e (exit immediately) flag automatically"),
35
35
  )
36
36
  .arg(
37
37
  Arg::new("no_environ")
38
38
  .long("no-environ")
39
+ .action(ArgAction::SetTrue)
39
40
  .help("Do not send environment variables along"),
40
41
  )
41
42
  .arg(
@@ -47,7 +48,11 @@ pub fn make_command(command: Command) -> Command {
47
48
  .arg(
48
49
  Arg::new("send_event")
49
50
  .long("send-event")
50
- .requires_all(&["traceback", "log"])
51
+ .action(ArgAction::SetTrue)
52
+ .requires_ifs([
53
+ (ArgPredicate::IsPresent, "traceback"),
54
+ (ArgPredicate::IsPresent, "log"),
55
+ ])
51
56
  .hide(true),
52
57
  )
53
58
  .arg(
@@ -171,11 +176,11 @@ fn send_event(traceback: &str, logfile: &str, environ: bool) -> Result<()> {
171
176
  }
172
177
 
173
178
  pub fn execute(matches: &ArgMatches) -> Result<()> {
174
- if matches.contains_id("send_event") {
179
+ if matches.get_flag("send_event") {
175
180
  return send_event(
176
181
  matches.get_one::<String>("traceback").unwrap(),
177
182
  matches.get_one::<String>("log").unwrap(),
178
- !matches.contains_id("no_environ"),
183
+ !matches.get_flag("no_environ"),
179
184
  );
180
185
  }
181
186
 
@@ -203,13 +208,13 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
203
208
  .as_str(),
204
209
  );
205
210
 
206
- if matches.contains_id("no_environ") {
211
+ if matches.get_flag("no_environ") {
207
212
  script = script.replace("___SENTRY_NO_ENVIRON___", "--no-environ");
208
213
  } else {
209
214
  script = script.replace("___SENTRY_NO_ENVIRON___", "");
210
215
  }
211
216
 
212
- if !matches.contains_id("no_exit") {
217
+ if !matches.get_flag("no_exit") {
213
218
  script.insert_str(0, "set -e\n\n");
214
219
  }
215
220
  println!("{script}");
@@ -15,7 +15,7 @@ pub fn make_command(command: Command) -> Command {
15
15
  .arg(
16
16
  Arg::new("paths")
17
17
  .required(true)
18
- .multiple_values(true)
18
+ .num_args(1..)
19
19
  .action(ArgAction::Append)
20
20
  .help("The path to the input debug info files."),
21
21
  )
@@ -87,10 +87,6 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
87
87
 
88
88
  for (index, object) in archive.get().objects().enumerate() {
89
89
  let object = object?;
90
- if object.has_sources() {
91
- eprintln!("skipped {orig_path} (no source info)");
92
- continue;
93
- }
94
90
 
95
91
  let mut out = output_path.unwrap_or(parent_path).join(filename);
96
92
  match index {
@@ -107,7 +103,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
107
103
  let written = writer.write_object_with_filter(
108
104
  &object,
109
105
  &filename.to_string_lossy(),
110
- |file, _source_descriptor| filter_bad_sources(file),
106
+ filter_bad_sources,
111
107
  )?;
112
108
 
113
109
  if !written {
@@ -2,7 +2,7 @@ use std::io;
2
2
  use std::path::Path;
3
3
 
4
4
  use anyhow::Result;
5
- use clap::{builder::PossibleValuesParser, Arg, ArgMatches, Command};
5
+ use clap::{builder::PossibleValuesParser, Arg, ArgAction, ArgMatches, Command};
6
6
  use console::style;
7
7
 
8
8
  use crate::utils::dif::{DifFile, DifType};
@@ -35,6 +35,7 @@ pub fn make_command(command: Command) -> Command {
35
35
  .arg(
36
36
  Arg::new("json")
37
37
  .long("json")
38
+ .action(ArgAction::SetTrue)
38
39
  .help("Format outputs as JSON."),
39
40
  )
40
41
  }
@@ -48,12 +49,12 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
48
49
  .map(|t| t.parse().unwrap());
49
50
  let dif = DifFile::open_path(path, ty)?;
50
51
 
51
- if matches.contains_id("json") {
52
+ if matches.get_flag("json") {
52
53
  serde_json::to_writer_pretty(&mut io::stdout(), &dif)?;
53
54
  println!();
54
55
  }
55
56
 
56
- if matches.contains_id("json") || is_quiet_mode() {
57
+ if matches.get_flag("json") || is_quiet_mode() {
57
58
  return if dif.is_usable() {
58
59
  Ok(())
59
60
  } else {
@@ -40,7 +40,7 @@ pub fn make_command(command: Command) -> Command {
40
40
  .value_name("ID")
41
41
  .help("The debug identifiers of the files to search for.")
42
42
  .value_parser(DebugId::from_str)
43
- .multiple_values(true)
43
+ .num_args(1..)
44
44
  .action(ArgAction::Append),
45
45
  )
46
46
  .arg(
@@ -58,11 +58,13 @@ pub fn make_command(command: Command) -> Command {
58
58
  .arg(
59
59
  Arg::new("no_well_known")
60
60
  .long("no-well-known")
61
+ .action(ArgAction::SetTrue)
61
62
  .help("Do not look for debug symbols in well known locations."),
62
63
  )
63
64
  .arg(
64
65
  Arg::new("no_cwd")
65
66
  .long("no-cwd")
67
+ .action(ArgAction::SetTrue)
66
68
  .help("Do not look for debug symbols in the current working directory."),
67
69
  )
68
70
  .arg(
@@ -76,6 +78,7 @@ pub fn make_command(command: Command) -> Command {
76
78
  .arg(
77
79
  Arg::new("json")
78
80
  .long("json")
81
+ .action(ArgAction::SetTrue)
79
82
  .help("Format outputs as JSON."),
80
83
  )
81
84
  }
@@ -339,8 +342,8 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
339
342
  types.extend(DifType::all());
340
343
  }
341
344
 
342
- let with_well_known = !matches.contains_id("no_well_known");
343
- let with_cwd = !matches.contains_id("no_cwd");
345
+ let with_well_known = !matches.get_flag("no_well_known");
346
+ let with_cwd = !matches.get_flag("no_cwd");
344
347
 
345
348
  // start adding well known locations
346
349
  if_chain! {
@@ -378,7 +381,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
378
381
  return Ok(());
379
382
  }
380
383
 
381
- if !find_ids(&paths, &types, &ids, matches.contains_id("json"))? {
384
+ if !find_ids(&paths, &types, &ids, matches.get_flag("json"))? {
382
385
  return Err(QuietExit(1).into());
383
386
  }
384
387
 
@@ -1,3 +1,4 @@
1
+ use std::fmt;
1
2
  use std::path::Path;
2
3
 
3
4
  use anyhow::Result;
@@ -67,9 +68,15 @@ fn print_object_sources(object: &Object) -> Result<()> {
67
68
  let abs_path = file.abs_path_str();
68
69
  println!(" {}", &abs_path);
69
70
  let source = debug_session.source_by_path(abs_path.as_str())?;
70
- match source.as_ref().and_then(|sd| sd.contents()) {
71
+ match source {
71
72
  Some(source) => {
72
- println!(" Embedded, {} bytes", source.len());
73
+ print_file_descriptor_detail(
74
+ "Embedded",
75
+ source.contents().map(|v| format!("{} bytes", v.len())),
76
+ );
77
+ print_file_descriptor_detail("Url", source.url());
78
+ print_file_descriptor_detail("DebugId", source.debug_id());
79
+ print_file_descriptor_detail("SourceMap Url", source.source_mapping_url());
73
80
  }
74
81
  None => {
75
82
  if Path::new(&abs_path).exists() {
@@ -83,3 +90,9 @@ fn print_object_sources(object: &Object) -> Result<()> {
83
90
  }
84
91
  Ok(())
85
92
  }
93
+
94
+ fn print_file_descriptor_detail<T: fmt::Display>(name: &str, value: Option<T>) {
95
+ if let Some(value) = value {
96
+ println!(" {name}: {value}");
97
+ }
98
+ }
@@ -31,7 +31,7 @@ pub fn make_command(command: Command) -> Command {
31
31
  Arg::new("paths")
32
32
  .value_name("PATH")
33
33
  .help("A path to search recursively for symbol files.")
34
- .multiple_values(true)
34
+ .num_args(1..)
35
35
  .action(ArgAction::Append),
36
36
  )
37
37
  .arg(
@@ -50,6 +50,7 @@ pub fn make_command(command: Command) -> Command {
50
50
  Arg::new("no_unwind")
51
51
  .long("no-unwind")
52
52
  .alias("no-bin")
53
+ .action(ArgAction::SetTrue)
53
54
  .help(
54
55
  "Do not scan for stack unwinding information. Specify \
55
56
  this flag for builds with disabled FPO, or when \
@@ -62,6 +63,7 @@ pub fn make_command(command: Command) -> Command {
62
63
  .arg(
63
64
  Arg::new("no_debug")
64
65
  .long("no-debug")
66
+ .action(ArgAction::SetTrue)
65
67
  .help(
66
68
  "Do not scan for debugging information. This will \
67
69
  usually exclude debug companion files. They might \
@@ -70,12 +72,17 @@ pub fn make_command(command: Command) -> Command {
70
72
  )
71
73
  .conflicts_with("no_unwind"),
72
74
  )
73
- .arg(Arg::new("no_sources").long("no-sources").help(
74
- "Do not scan for source information. This will \
75
- usually exclude source bundle files. They might \
76
- still be uploaded, if they contain additional \
77
- processable information (see other flags).",
78
- ))
75
+ .arg(
76
+ Arg::new("no_sources")
77
+ .long("no-sources")
78
+ .action(ArgAction::SetTrue)
79
+ .help(
80
+ "Do not scan for source information. This will \
81
+ usually exclude source bundle files. They might \
82
+ still be uploaded, if they contain additional \
83
+ processable information (see other flags).",
84
+ ),
85
+ )
79
86
  .arg(
80
87
  Arg::new("ids")
81
88
  .value_name("ID")
@@ -87,6 +94,7 @@ pub fn make_command(command: Command) -> Command {
87
94
  .arg(
88
95
  Arg::new("require_all")
89
96
  .long("require-all")
97
+ .action(ArgAction::SetTrue)
90
98
  .help("Errors if not all identifiers specified with --id could be found."),
91
99
  )
92
100
  .arg(
@@ -106,11 +114,13 @@ pub fn make_command(command: Command) -> Command {
106
114
  .arg(
107
115
  Arg::new("derived_data")
108
116
  .long("derived-data")
117
+ .action(ArgAction::SetTrue)
109
118
  .help("Search for debug symbols in Xcode's derived data."),
110
119
  )
111
120
  .arg(
112
121
  Arg::new("no_zips")
113
122
  .long("no-zips")
123
+ .action(ArgAction::SetTrue)
114
124
  .help("Do not search in ZIP files."),
115
125
  )
116
126
  .arg(
@@ -128,41 +138,64 @@ pub fn make_command(command: Command) -> Command {
128
138
  .arg(
129
139
  Arg::new("no_reprocessing")
130
140
  .long("no-reprocessing")
141
+ .action(ArgAction::SetTrue)
131
142
  .help("Do not trigger reprocessing after uploading."),
132
143
  )
133
- .arg(Arg::new("no_upload").long("no-upload").help(
134
- "Disable the actual upload.{n}This runs all steps for the \
135
- processing but does not trigger the upload (this also \
136
- automatically disables reprocessing). This is useful if you \
137
- just want to verify the setup or skip the upload in tests.",
138
- ))
139
- .arg(Arg::new("force_foreground").long("force-foreground").help(
140
- "Wait for the process to finish.{n}\
141
- By default, the upload process will detach and continue in the \
142
- background when triggered from Xcode. When an error happens, \
143
- a dialog is shown. If this parameter is passed Xcode will wait \
144
- for the process to finish before the build finishes and output \
145
- will be shown in the Xcode build output.",
146
- ))
147
- .arg(Arg::new("include_sources").long("include-sources").help(
148
- "Include sources from the local file system and upload \
149
- them as source bundles.",
150
- ))
151
- .arg(Arg::new("wait").long("wait").help(
152
- "Wait for the server to fully process uploaded files. Errors \
153
- can only be displayed if --wait is specified, but this will \
154
- significantly slow down the upload process.",
155
- ))
144
+ .arg(
145
+ Arg::new("no_upload")
146
+ .long("no-upload")
147
+ .action(ArgAction::SetTrue)
148
+ .help(
149
+ "Disable the actual upload.{n}This runs all steps for the \
150
+ processing but does not trigger the upload (this also \
151
+ automatically disables reprocessing). This is useful if you \
152
+ just want to verify the setup or skip the upload in tests.",
153
+ ),
154
+ )
155
+ .arg(
156
+ Arg::new("force_foreground")
157
+ .long("force-foreground")
158
+ .action(ArgAction::SetTrue)
159
+ .help(
160
+ "Wait for the process to finish.{n}\
161
+ By default, the upload process will detach and continue in the \
162
+ background when triggered from Xcode. When an error happens, \
163
+ a dialog is shown. If this parameter is passed Xcode will wait \
164
+ for the process to finish before the build finishes and output \
165
+ will be shown in the Xcode build output.",
166
+ ),
167
+ )
168
+ .arg(
169
+ Arg::new("include_sources")
170
+ .long("include-sources")
171
+ .action(ArgAction::SetTrue)
172
+ .help(
173
+ "Include sources from the local file system and upload them as source bundles.",
174
+ ),
175
+ )
176
+ .arg(
177
+ Arg::new("wait")
178
+ .long("wait")
179
+ .action(ArgAction::SetTrue)
180
+ .help(
181
+ "Wait for the server to fully process uploaded files. Errors \
182
+ can only be displayed if --wait is specified, but this will \
183
+ significantly slow down the upload process.",
184
+ ),
185
+ )
156
186
  // Legacy flag that has no effect, left hidden for backward compatibility
157
187
  .arg(
158
188
  Arg::new("upload_symbol_maps")
159
189
  .long("upload-symbol-maps")
190
+ .action(ArgAction::SetTrue)
160
191
  .hide(true),
161
192
  )
162
- .arg(Arg::new("il2cpp_mapping").long("il2cpp-mapping").help(
163
- "Compute il2cpp line mappings and upload \
164
- them along with sources.",
165
- ))
193
+ .arg(
194
+ Arg::new("il2cpp_mapping")
195
+ .long("il2cpp-mapping")
196
+ .action(ArgAction::SetTrue)
197
+ .help("Compute il2cpp line mappings and upload them along with sources."),
198
+ )
166
199
  }
167
200
 
168
201
  pub fn execute(matches: &ArgMatches) -> Result<()> {
@@ -182,9 +215,9 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
182
215
  // Build generic upload parameters
183
216
  let mut upload = DifUpload::new(org.clone(), project.clone());
184
217
  upload
185
- .wait(matches.contains_id("wait"))
218
+ .wait(matches.get_flag("wait"))
186
219
  .search_paths(matches.get_many::<String>("paths").unwrap_or_default())
187
- .allow_zips(!matches.contains_id("no_zips"))
220
+ .allow_zips(!matches.get_flag("no_zips"))
188
221
  .filter_ids(ids);
189
222
 
190
223
  // Restrict symbol types, if specified by the user
@@ -213,17 +246,17 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
213
246
  // Allow stripped debug symbols. These are dSYMs, ELF binaries generated
214
247
  // with `objcopy --only-keep-debug` or Breakpad symbols. As a fallback,
215
248
  // we also upload all files with a public symbol table.
216
- debug: !matches.contains_id("no_debug"),
217
- symtab: !matches.contains_id("no_debug"),
249
+ debug: !matches.get_flag("no_debug"),
250
+ symtab: !matches.get_flag("no_debug"),
218
251
  // Allow executables and dynamic/shared libraries, but not object files.
219
252
  // They are guaranteed to contain unwind info, for instance `eh_frame`,
220
253
  // and may optionally contain debugging information such as DWARF.
221
- unwind: !matches.contains_id("no_unwind"),
222
- sources: !matches.contains_id("no_sources"),
254
+ unwind: !matches.get_flag("no_unwind"),
255
+ sources: !matches.get_flag("no_sources"),
223
256
  });
224
257
 
225
- upload.include_sources(matches.contains_id("include_sources"));
226
- upload.il2cpp_mapping(matches.contains_id("il2cpp_mapping"));
258
+ upload.include_sources(matches.get_flag("include_sources"));
259
+ upload.il2cpp_mapping(matches.get_flag("il2cpp_mapping"));
227
260
 
228
261
  // Configure BCSymbolMap resolution, if possible
229
262
  if let Some(symbol_map) = matches.get_one::<String>("symbol_maps") {
@@ -233,7 +266,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
233
266
  }
234
267
 
235
268
  // Add a path to XCode's DerivedData, if configured
236
- if matches.contains_id("derived_data") {
269
+ if matches.get_flag("derived_data") {
237
270
  let derived_data = dirs::home_dir().map(|x| x.join(DERIVED_DATA_FOLDER));
238
271
  if let Some(path) = derived_data {
239
272
  if path.is_dir() {
@@ -248,14 +281,14 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
248
281
  None => InfoPlist::discover_from_env()?,
249
282
  };
250
283
 
251
- if matches.contains_id("no_upload") {
284
+ if matches.get_flag("no_upload") {
252
285
  println!("{} skipping upload.", style(">").dim());
253
286
  return Ok(());
254
287
  }
255
288
 
256
289
  MayDetach::wrap("Debug symbol upload", |handle| {
257
290
  // Optionally detach if run from Xcode
258
- if !matches.contains_id("force_foreground") {
291
+ if !matches.get_flag("force_foreground") {
259
292
  handle.may_detach()?;
260
293
  }
261
294
 
@@ -293,14 +326,14 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
293
326
  }
294
327
 
295
328
  // Trigger reprocessing only if requested by user
296
- if matches.contains_id("no_reprocessing") {
329
+ if matches.get_flag("no_reprocessing") {
297
330
  println!("{} skipped reprocessing", style(">").dim());
298
331
  } else if !api.trigger_reprocessing(&org, &project)? {
299
332
  println!("{} Server does not support reprocessing.", style(">").dim());
300
333
  }
301
334
 
302
335
  // Did we miss explicitly requested symbols?
303
- if matches.contains_id("require_all") {
336
+ if matches.get_flag("require_all") {
304
337
  let required_ids: BTreeSet<DebugId> = matches
305
338
  .get_many::<DebugId>("ids")
306
339
  .unwrap_or_default()