From 8917a2896e7e83769b877248a65bfa16503a1abe Mon Sep 17 00:00:00 2001 From: Stanca Serban Date: Mon, 27 Feb 2023 16:42:40 +0200 Subject: [PATCH] Backed out changeset aba2a1dc6802 (bug 1816454) for causing PNGEncoder related build bustages. CLOSED TREE --- Cargo.lock | 12 +- build.gradle | 2 +- gfx/wr/Cargo.lock | 886 +++++++----------- gfx/wr/webrender/Cargo.toml | 2 +- gfx/wr/wr_glyph_rasterizer/Cargo.toml | 2 +- python/sites/mach.txt | 2 +- supply-chain/audits.toml | 200 +++- supply-chain/imports.lock | 14 - .../rust/android_logger/.cargo-checksum.json | 2 +- third_party/rust/android_logger/CHANGELOG.md | 22 - third_party/rust/android_logger/Cargo.toml | 2 +- third_party/rust/android_logger/README.md | 9 +- third_party/rust/android_logger/src/lib.rs | 53 +- .../android_logger/tests/config_log_level.rs | 4 +- .../android_logger/tests/multiple_init.rs | 8 +- .../rust/glean-core/.cargo-checksum.json | 2 +- third_party/rust/glean-core/Cargo.toml | 11 +- .../rust/glean-core/src/database/mod.rs | 14 +- .../rust/glean-core/src/dispatcher/global.rs | 6 - third_party/rust/glean-core/src/glean.udl | 11 +- .../rust/glean-core/src/internal_metrics.rs | 61 -- third_party/rust/glean-core/src/lib.rs | 83 +- .../rust/glean-core/src/lib_unit_tests.rs | 18 +- .../rust/glean-core/src/metrics/labeled.rs | 66 +- .../rust/glean-core/src/metrics/string.rs | 2 +- .../rust/glean-core/src/metrics/text.rs | 2 +- .../src/metrics/timing_distribution.rs | 27 +- .../rust/glean-core/src/metrics/url.rs | 8 +- third_party/rust/glean-core/src/ping/mod.rs | 2 +- third_party/rust/glean-core/src/upload/mod.rs | 99 +- .../glean-core/tests/custom_distribution.rs | 4 +- third_party/rust/glean-core/tests/datetime.rs | 2 +- third_party/rust/glean-core/tests/labeled.rs | 14 +- .../glean-core/tests/memory_distribution.rs | 2 +- third_party/rust/glean-core/tests/ping.rs | 8 +- .../rust/glean-core/tests/ping_maker.rs | 6 +- third_party/rust/glean-core/tests/quantity.rs | 2 +- third_party/rust/glean-core/tests/string.rs | 2 +- .../rust/glean-core/tests/string_list.rs | 2 +- third_party/rust/glean-core/tests/text.rs | 2 +- third_party/rust/glean-core/tests/timespan.rs | 2 +- .../glean-core/tests/timing_distribution.rs | 2 +- third_party/rust/glean-core/tests/uuid.rs | 2 +- third_party/rust/glean/.cargo-checksum.json | 2 +- third_party/rust/glean/Cargo.toml | 9 +- third_party/rust/glean/src/lib.rs | 7 +- third_party/rust/glean/src/net/mod.rs | 120 +-- third_party/rust/glean/tests/schema.rs | 39 +- .../glean/tests/test-shutdown-blocking.sh | 29 - third_party/rust/glean/tests/upload_timing.rs | 225 ----- toolkit/components/glean/Cargo.toml | 2 +- toolkit/components/glean/api/Cargo.toml | 2 +- .../glean/api/src/private/labeled.rs | 4 +- .../tests/browser/browser_labeled_gifft.js | 4 +- .../glean/tests/xpcshell/test_GIFFTIPC.js | 4 +- .../glean/tests/xpcshell/test_Glean.js | 23 +- .../glean/tests/xpcshell/test_GleanIPC.js | 2 +- .../glean/tests/xpcshell/test_JOG.js | 12 +- .../glean/tests/xpcshell/test_JOGIPC.js | 4 +- 59 files changed, 768 insertions(+), 1402 deletions(-) delete mode 100755 third_party/rust/glean/tests/test-shutdown-blocking.sh delete mode 100644 third_party/rust/glean/tests/upload_timing.rs diff --git a/Cargo.lock b/Cargo.lock index e58147e82aaf..1ee493ecb710 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -66,9 +66,9 @@ checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e" [[package]] name = "android_logger" -version = "0.12.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037f3e1da32ddba7770530e69258b742c15ad67bdf90e5f6b35f4b6db9a60eb7" +checksum = "8619b80c242aa7bd638b5c7ddd952addeecb71f69c75e33f1d47b2804f8f883a" dependencies = [ "android_log-sys", "env_logger 0.10.0", @@ -2307,9 +2307,9 @@ dependencies = [ [[package]] name = "glean" -version = "52.3.0" +version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4d34f9ae46bd3e68c5bb672762e7391843daedd609506a70b6b35ac6fea051" +checksum = "3dea54c0198181ff3bd8c7d39bdc69f22a4c0504da5dd9138666edef084e26be" dependencies = [ "chrono", "crossbeam-channel", @@ -2327,9 +2327,9 @@ dependencies = [ [[package]] name = "glean-core" -version = "52.3.0" +version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "699ab3d674e2618298111987c0053735ef7a531d09264a3aa7d496f5ac2247d6" +checksum = "01c3b0c688d31dbe58dd799d771d4ab60d9a20932fa0eac80dbb08f20149f36b" dependencies = [ "android_logger", "bincode", diff --git a/build.gradle b/build.gradle index 7bca49b503cf..e1333fce3ed4 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ allprojects { topsrcdir = gradle.mozconfig.topsrcdir topobjdir = gradle.mozconfig.topobjdir - gleanVersion = "52.3.0" + gleanVersion = "52.2.0" if (gleanVersion != getRustVersionFor("glean")) { throw new StopExecutionException("Mismatched Glean version, expected: ${gleanVersion}," + " found ${getRustVersionFor("glean")}") diff --git a/gfx/wr/Cargo.lock b/gfx/wr/Cargo.lock index dae390e0dfe3..aca52cd51e69 100644 --- a/gfx/wr/Cargo.lock +++ b/gfx/wr/Cargo.lock @@ -10,15 +10,15 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "adler32" -version = "1.2.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" dependencies = [ "memchr", ] @@ -31,30 +31,21 @@ checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e" [[package]] name = "android_logger" -version = "0.12.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037f3e1da32ddba7770530e69258b742c15ad67bdf90e5f6b35f4b6db9a60eb7" +checksum = "b5e9dd62f37dea550caf48c77591dc50bd1a378ce08855be1a0c42a97b7550fb" dependencies = [ "android_log-sys", - "env_logger 0.10.0", + "env_logger", "log", "once_cell", ] -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "app_units" @@ -109,7 +100,7 @@ dependencies = [ "askama_escape", "mime", "mime_guess", - "nom 7.1.3", + "nom 7.1.1", "proc-macro2", "quote", "serde", @@ -123,7 +114,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] @@ -136,9 +127,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.13.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bincode" @@ -186,27 +177,27 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "bytemuck" -version = "1.13.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +checksum = "37fa13df2292ecb479ec23aa06f4507928bef07839be9ef15281411076629431" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" -version = "1.4.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "calloop" @@ -215,14 +206,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf2eec61efe56aa1e813f5126959296933cf0700030e4314786c48779a66ab82" dependencies = [ "log", - "nix 0.22.3", + "nix", ] [[package]] name = "camino" -version = "1.1.3" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6031a462f977dd38968b6f23378356512feeace69cef817e1a4475108093cec3" +checksum = "869119e97797867fd90f5e22af7d0bd274bd4635ebb9eb68c04f3f513ae6c412" dependencies = [ "serde", ] @@ -238,9 +229,9 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.15.3" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" +checksum = "982a0cf6a99c350d7246035613882e376d58cebe571785abc5da4f648d53ac0a" dependencies = [ "camino", "cargo-platform", @@ -252,9 +243,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] @@ -282,25 +273,23 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ - "iana-time-zone", - "js-sys", + "libc", "num-integer", "num-traits", "serde", "time", - "wasm-bindgen", "winapi", ] [[package]] name = "clap" -version = "3.2.23" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ "atty", "bitflags", @@ -314,32 +303,32 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" dependencies = [ "os_str_bytes", ] [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" dependencies = [ "cc", ] [[package]] name = "cocoa" -version = "0.24.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" dependencies = [ "bitflags", "block", "cocoa-foundation", - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-graphics 0.22.3", "foreign-types", "libc", @@ -354,29 +343,13 @@ checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" dependencies = [ "bitflags", "block", - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-graphics-types", "foreign-types", "libc", "objc", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "compositor" version = "0.1.0" @@ -402,6 +375,12 @@ dependencies = [ "cc", ] +[[package]] +name = "const_fn" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd51eab21ab4fd6a3bf889e2d0958c0a6e3a61ad04260325e919e652a2a62826" + [[package]] name = "core-foundation" version = "0.7.0" @@ -414,9 +393,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ "core-foundation-sys 0.8.3", "libc", @@ -453,7 +432,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-graphics-types", "foreign-types", "libc", @@ -461,12 +440,12 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "e92f5d519093a4178296707dbaa3880eae85a5ef5386675f361a1cf25376e93c" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation 0.9.2", "foreign-types", "libc", ] @@ -477,7 +456,7 @@ version = "19.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" dependencies = [ - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-graphics 0.22.3", "foreign-types", "libc", @@ -498,11 +477,11 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", ] [[package]] @@ -513,9 +492,9 @@ checksum = "bd66663db5a988098a89599d4857919b3acf7f61402e61365acfd3919857b9be" [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -523,9 +502,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -534,24 +513,27 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.13" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" dependencies = [ - "autocfg", "cfg-if 1.0.0", + "const_fn", "crossbeam-utils", - "memoffset 0.7.1", + "lazy_static", + "memoffset", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" dependencies = [ + "autocfg", "cfg-if 1.0.0", + "lazy_static", ] [[package]] @@ -560,50 +542,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" -[[package]] -name = "cxx" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "darling" version = "0.13.4" @@ -651,9 +589,9 @@ dependencies = [ [[package]] name = "deflate" -version = "0.8.6" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" +checksum = "e7e5d2a2273fed52a7f947ee55b092c4057025d7a3e04e5ecdbd25d6c3fb1bd7" dependencies = [ "adler32", "byteorder", @@ -661,9 +599,9 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7" dependencies = [ "proc-macro2", "quote", @@ -687,9 +625,9 @@ dependencies = [ [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6" [[package]] name = "dwrote" @@ -707,15 +645,15 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "env_logger" -version = "0.9.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", "humantime", @@ -724,20 +662,11 @@ dependencies = [ "termcolor", ] -[[package]] -name = "env_logger" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "log", -] - [[package]] name = "etagere" -version = "0.2.7" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6301151a318f367f392c31395beb1cfba5ccd9abc44d1db0db3a4b27b9601c89" +checksum = "5eb66dc3d6bb6b2ab4a12454db6988079311d6443e627bc7e6065f907f556272" dependencies = [ "euclid", "serde", @@ -746,9 +675,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.7" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b52c2ef4a78da0ba68fbe1fd920627411096d2ac478f7f4c9f3a54ba6705bade" +checksum = "da96828553a086d7b18dcebfc579bd9628b016f86590d7453c115e490fa74b80" dependencies = [ "num-traits", "serde", @@ -770,12 +699,14 @@ version = "0.1.0" [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" dependencies = [ + "cfg-if 1.0.0", "crc32fast", - "miniz_oxide 0.6.2", + "libc", + "miniz_oxide", ] [[package]] @@ -790,7 +721,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c49d6b4c11dca1a1dd931a34a9f397e2da91abe3de4110505f3530a80e560b52" dependencies = [ - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-text", "libc", "servo-fontconfig", @@ -814,10 +745,11 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ + "matches", "percent-encoding", ] @@ -844,9 +776,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "2.9.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +checksum = "5bd79fa345a495d3ae89fb7165fec01c0e72f41821d642dda363a1e97975652e" [[package]] name = "fuchsia-cprng" @@ -871,13 +803,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.10.0+wasi-snapshot-preview1", ] [[package]] @@ -913,9 +845,9 @@ dependencies = [ [[package]] name = "glean" -version = "52.3.0" +version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4d34f9ae46bd3e68c5bb672762e7391843daedd609506a70b6b35ac6fea051" +checksum = "3dea54c0198181ff3bd8c7d39bdc69f22a4c0504da5dd9138666edef084e26be" dependencies = [ "chrono", "crossbeam-channel", @@ -933,9 +865,9 @@ dependencies = [ [[package]] name = "glean-core" -version = "52.3.0" +version = "52.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "699ab3d674e2618298111987c0053735ef7a531d09264a3aa7d496f5ac2247d6" +checksum = "01c3b0c688d31dbe58dd799d771d4ab60d9a20932fa0eac80dbb08f20149f36b" dependencies = [ "android_logger", "bincode", @@ -994,7 +926,7 @@ source = "git+https://github.com/jamienicol/glutin?branch=wr#03285da9c14ec56296c dependencies = [ "cgl", "cocoa", - "core-foundation 0.9.3", + "core-foundation 0.9.2", "glutin_egl_sys", "glutin_emscripten_sys", "glutin_gles2_sys", @@ -1066,30 +998,21 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "heck" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +checksum = "725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e" dependencies = [ "libc", ] @@ -1100,30 +1023,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "iana-time-zone" -version = "0.1.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" -dependencies = [ - "android_system_properties", - "core-foundation-sys 0.8.3", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" -dependencies = [ - "cxx", - "cxx-build", -] - [[package]] name = "id-arena" version = "2.2.1" @@ -1138,23 +1037,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ + "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "image" -version = "0.23.14" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" +checksum = "bfc5483f8d5afd3653b38a196c52294dcb239c3e1a5bade1990353ea13bcf387" dependencies = [ "bytemuck", "byteorder", - "color_quant", "num-iter", "num-rational", "num-traits", @@ -1163,19 +1062,28 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" dependencies = [ "autocfg", "hashbrown", ] [[package]] -name = "inherent" -version = "1.0.4" +name = "inflate" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb659d59c4af6c9dc568b13db431174ab5fa961aa53f5aad7f42fb710c06bc46" +checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" +dependencies = [ + "adler32", +] + +[[package]] +name = "inherent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa5135cb6aa90ee17b4f0a0fb2908059b0830f90fda333f12816f275b21820c" dependencies = [ "proc-macro2", "quote", @@ -1196,9 +1104,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "jni-sys" @@ -1208,18 +1116,18 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" dependencies = [ "wasm-bindgen", ] @@ -1238,34 +1146,25 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259" [[package]] name = "libloading" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ "cfg-if 1.0.0", "winapi", ] -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - [[package]] name = "linked-hash-map" -version = "0.5.6" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" [[package]] name = "lmdb-rkv" @@ -1292,9 +1191,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ "autocfg", "scopeguard", @@ -1302,9 +1201,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" dependencies = [ "cfg-if 1.0.0", ] @@ -1320,9 +1219,9 @@ dependencies = [ [[package]] name = "malloc_size_of_derive" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632647502a8bfa82458c07134791fffa7a719f00427d1afd79c3cb6d4960a982" +checksum = "e37c5d4cd9473c5f4c9c111f033f15d4df9bd378fdf615944e360a4f55a05f0b" dependencies = [ "proc-macro2", "syn", @@ -1330,10 +1229,22 @@ dependencies = [ ] [[package]] -name = "memchr" -version = "2.3.4" +name = "matches" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] name = "memmap2" @@ -1353,15 +1264,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.16" @@ -1380,9 +1282,9 @@ dependencies = [ [[package]] name = "minidl" -version = "0.1.5" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87d3d8666e5ed22230c0096edcccf7097905b1e2975869e1b9fe5df40d26d801" +checksum = "647da2489d438eb707e9bcffe0e47fb6f3f355ed288120740fc1e614cfadb9e9" [[package]] name = "minimal-lexical" @@ -1392,32 +1294,34 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.3.7" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.6" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" dependencies = [ "libc", "log", + "miow", + "ntapi", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "winapi", +] + +[[package]] +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi", ] [[package]] @@ -1495,19 +1399,7 @@ dependencies = [ "cc", "cfg-if 1.0.0", "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "libc", - "memoffset 0.6.5", + "memoffset", ] [[package]] @@ -1524,28 +1416,28 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.3" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ "memchr", "minimal-lexical", ] [[package]] -name = "nom8" -version = "0.2.0" +name = "ntapi" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" dependencies = [ - "memchr", + "winapi", ] [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" dependencies = [ "autocfg", "num-traits", @@ -1553,9 +1445,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" dependencies = [ "autocfg", "num-integer", @@ -1564,9 +1456,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.3.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ "autocfg", "num-integer", @@ -1575,37 +1467,37 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] [[package]] name = "num_enum" -version = "0.5.10" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0072973714303aa6e3631c7e8e777970cf4bdd25dc4932e41031027b8bcc4e" +checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.10" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0629cbd6b897944899b1f10496d9c4a7ac5878d45fd61bc22e9e79bfbbc29597" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1624,9 +1516,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" [[package]] name = "ordered-float" @@ -1639,9 +1531,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "029d8d0b2f198229de29dca79676f2738ff952edf3fde542eb8bf94d8c21b435" [[package]] name = "oslog" @@ -1681,9 +1573,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ "cfg-if 1.0.0", "instant", @@ -1695,9 +1587,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.11" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" [[package]] name = "peek-poke" @@ -1720,15 +1612,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" [[package]] name = "plain" @@ -1749,40 +1641,40 @@ dependencies = [ [[package]] name = "png" -version = "0.16.8" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" +checksum = "910f09135b1ed14bb16be445a8c23ddf0777eca485fbfc7cee00d81fecab158a" dependencies = [ "bitflags", "crc32fast", "deflate", - "miniz_oxide 0.3.7", + "inflate", ] [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ - "once_cell", - "toml_edit", + "thiserror", + "toml", ] [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" dependencies = [ - "unicode-ident", + "unicode-xid", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2", ] @@ -1832,23 +1724,26 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" dependencies = [ + "autocfg", + "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", + "lazy_static", "num_cpus", ] @@ -1863,29 +1758,30 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.4.6" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" +checksum = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3" dependencies = [ "aho-corasick", "memchr", "regex-syntax", + "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" [[package]] name = "remove_dir_all" @@ -1932,9 +1828,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" [[package]] name = "same-file" @@ -1947,9 +1843,9 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" [[package]] name = "scopeguard" @@ -1957,12 +1853,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scratch" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" - [[package]] name = "scroll" version = "0.11.0" @@ -1985,36 +1875,36 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.152" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "325a073952621257820e7a3469f55ba4726d8b28657e7e36653d1c36dc2c84ae" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", @@ -2023,9 +1913,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ "itoa", "ryu", @@ -2090,7 +1980,7 @@ dependencies = [ "lazy_static", "log", "memmap2", - "nix 0.22.3", + "nix", "pkg-config", "wayland-client", "wayland-cursor", @@ -2127,20 +2017,20 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.108" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e159d99e6c2b93995d171050271edb50ecc5288fbc7cc17de8fdce4e58c14" +checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "unicode-xid", ] [[package]] name = "synstructure" -version = "0.12.6" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" dependencies = [ "proc-macro2", "quote", @@ -2156,18 +2046,18 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "termcolor" -version = "1.2.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.16.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" @@ -2190,10 +2080,19 @@ dependencies = [ ] [[package]] -name = "time" -version = "0.1.45" +name = "thread_local" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "time" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", @@ -2202,45 +2101,28 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "toml" -version = "0.5.11" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] -[[package]] -name = "toml_datetime" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" - -[[package]] -name = "toml_edit" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" -dependencies = [ - "indexmap", - "nom8", - "toml_datetime", -] - [[package]] name = "topological-sort" version = "0.1.0" @@ -2267,36 +2149,24 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" - -[[package]] -name = "unicode-ident" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" [[package]] name = "uniffi" @@ -2418,35 +2288,36 @@ dependencies = [ [[package]] name = "url" -version = "2.3.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", "idna", + "matches", "percent-encoding", ] [[package]] name = "uuid" -version = "1.3.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "getrandom", ] [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ "same-file", "winapi", @@ -2467,9 +2338,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -2477,13 +2348,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" dependencies = [ "bumpalo", + "lazy_static", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -2492,9 +2363,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2502,9 +2373,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ "proc-macro2", "quote", @@ -2515,20 +2386,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" [[package]] name = "wayland-client" -version = "0.29.5" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f" dependencies = [ "bitflags", "downcast-rs", "libc", - "nix 0.24.3", + "nix", "scoped-tls", "wayland-commons", "wayland-scanner", @@ -2537,11 +2408,11 @@ dependencies = [ [[package]] name = "wayland-commons" -version = "0.29.5" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" dependencies = [ - "nix 0.24.3", + "nix", "once_cell", "smallvec", "wayland-sys", @@ -2549,20 +2420,20 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.29.5" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" dependencies = [ - "nix 0.24.3", + "nix", "wayland-client", "xcursor", ] [[package]] name = "wayland-egl" -version = "0.29.5" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402de949f81a012926d821a2d659f930694257e76dd92b6e0042ceb27be4107d" +checksum = "83281d69ee162b59031c666385e93bde4039ec553b90c4191cdb128ceea29a3a" dependencies = [ "wayland-client", "wayland-sys", @@ -2570,9 +2441,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.29.5" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741" dependencies = [ "bitflags", "wayland-client", @@ -2582,9 +2453,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.29.5" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" dependencies = [ "proc-macro2", "quote", @@ -2593,9 +2464,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.29.5" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4" dependencies = [ "dlib", "lazy_static", @@ -2604,9 +2475,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" dependencies = [ "js-sys", "wasm-bindgen", @@ -2657,7 +2528,7 @@ version = "0.1.0" dependencies = [ "app_units", "core-foundation 0.7.0", - "env_logger 0.9.3", + "env_logger", "euclid", "gleam", "glutin", @@ -2699,14 +2570,14 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e79c5206e1f43a2306fd64bdb95025ee4228960f2e6c5a8b173f3caaf807741" dependencies = [ - "nom 7.1.3", + "nom 7.1.1", ] [[package]] name = "whatsys" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb632c0076024630111a08ca9fcbd34736c80d10b9ae517077487b0c82f46a36" +checksum = "5a48baa5192a81e347fbaae5f5e50bc27955ef084fc0fda5ccb1f8f9aecd73c9" dependencies = [ "cc", "cfg-if 1.0.0", @@ -2731,9 +2602,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "fa515c5163a99cc82bab70fd3bfdd36d827be85de63737b40fcef2ce084a436e" dependencies = [ "winapi", ] @@ -2744,72 +2615,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" - [[package]] name = "winit" version = "0.26.1" @@ -2818,7 +2623,7 @@ checksum = "9b43cc931d58b99461188607efd7acb2a093e65fc621f54cad78517a6063e73a" dependencies = [ "bitflags", "cocoa", - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-graphics 0.22.3", "core-video-sys", "dispatch", @@ -2856,11 +2661,11 @@ dependencies = [ name = "wr_glyph_rasterizer" version = "0.1.0" dependencies = [ - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-graphics 0.22.3", "core-text", "dwrote", - "env_logger 0.9.3", + "env_logger", "euclid", "firefox-on-glean", "freetype", @@ -2897,11 +2702,11 @@ dependencies = [ "base64", "chrono", "clap", - "core-foundation 0.9.3", + "core-foundation 0.9.2", "core-graphics 0.22.3", "crossbeam", "dwrote", - "env_logger 0.9.3", + "env_logger", "font-loader", "gleam", "glsl", @@ -2932,12 +2737,13 @@ checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" [[package]] name = "x11-dl" -version = "2.21.0" +version = "2.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" dependencies = [ + "lazy_static", "libc", - "once_cell", + "maybe-uninit", "pkg-config", ] @@ -2947,20 +2753,20 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" dependencies = [ - "nom 7.1.3", + "nom 7.1.1", ] [[package]] name = "xml-rs" -version = "0.8.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "2bb76e5c421bbbeb8924c60c030331b345555024d56261dae8f3e786ed817c23" [[package]] name = "yaml-rust" -version = "0.4.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" dependencies = [ "linked-hash-map", ] diff --git a/gfx/wr/webrender/Cargo.toml b/gfx/wr/webrender/Cargo.toml index 4b23388e6f90..fb0b00a43a79 100644 --- a/gfx/wr/webrender/Cargo.toml +++ b/gfx/wr/webrender/Cargo.toml @@ -52,7 +52,7 @@ svg_fmt = "0.4" tracy-rs = "0.1.2" derive_more = { version = "0.99", default-features = false, features = ["add_assign"] } etagere = "0.2.6" -glean = "52.3.0" +glean = "52.2.0" firefox-on-glean = { version = "0.1.0", optional = true } swgl = { path = "../swgl", optional = true } topological-sort = "0.1" diff --git a/gfx/wr/wr_glyph_rasterizer/Cargo.toml b/gfx/wr/wr_glyph_rasterizer/Cargo.toml index 6a25d2115a2f..829492b2e3b8 100644 --- a/gfx/wr/wr_glyph_rasterizer/Cargo.toml +++ b/gfx/wr/wr_glyph_rasterizer/Cargo.toml @@ -25,7 +25,7 @@ tracy-rs = "0.1.2" log = "0.4" lazy_static = "1" fxhash = "0.2.1" -glean = { version = "52.3.0", optional = true } +glean = { version = "52.0.0", optional = true } firefox-on-glean = { version = "0.1.0", optional = true } serde = { optional = true, version = "1.0", features = ["serde_derive"] } diff --git a/python/sites/mach.txt b/python/sites/mach.txt index 80b61078e743..b1d4b256910d 100644 --- a/python/sites/mach.txt +++ b/python/sites/mach.txt @@ -136,7 +136,7 @@ pth:xpcom/geckoprocesstypes_generator pth:xpcom/idl-parser # glean-sdk may not be installable if a wheel isn't available # and it has to be built from source. -pypi-optional:glean-sdk==52.3.0:telemetry will not be collected +pypi-optional:glean-sdk==52.2.0:telemetry will not be collected # Mach gracefully handles the case where `psutil` is unavailable. # We aren't (yet) able to pin packages in automation, so we have to # support down to the oldest locally-installed version (5.4.2). diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index 2c55209cad44..5b1f84f12d97 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -1,22 +1,6 @@ # cargo-vet audits file -[[wildcard-audits.glean]] -who = "Chris H-C " -criteria = "safe-to-deploy" -user-id = 48 -start = "2020-11-10" -end = "2024-02-24" -notes = "The Glean SDKs are maintained by the Glean Team at Mozilla." - -[[wildcard-audits.glean-core]] -who = "Chris H-C " -criteria = "safe-to-deploy" -user-id = 48 -start = "2019-09-24" -end = "2024-02-24" -notes = "The Glean SDKs are maintained by the Glean Team at Mozilla." - [[audits.aa-stroke]] who = "Lee Salzman " criteria = "safe-to-deploy" @@ -50,12 +34,6 @@ who = "Mike Hommey " criteria = "safe-to-deploy" delta = "0.11.1 -> 0.11.3" -[[audits.android_logger]] -who = "Chris H-C " -criteria = "safe-to-deploy" -delta = "0.11.3 -> 0.12.0" -notes = "Small wrapper crate. This update fixes log level filtering." - [[audits.android_system_properties]] who = "Nicolas Silva " criteria = "safe-to-deploy" @@ -996,6 +974,184 @@ who = "Mike Hommey " criteria = "safe-to-deploy" delta = "0.2.7 -> 0.2.8" +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +version = "50.1.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Travis Long " +criteria = "safe-to-deploy" +version = "50.1.2" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +version = "51.1.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "51.7.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "51.8.1" +notes = "Maintained by the Glean Team at Mozilla" + +[[audits.glean]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "51.8.2" +notes = "Maintained by the Glean Team at Mozilla." + +[[audits.glean]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "52.0.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "50.1.2 -> 50.1.3" +notes = "Unchanged from last version" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "50.1.3 -> 51.0.1" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "51.1.0 -> 51.2.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Perry McManis " +criteria = "safe-to-deploy" +delta = "51.2.0 -> 51.4.0" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "51.4.0 -> 51.5.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "51.7.0 -> 51.8.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "52.0.0 -> 52.0.1" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "52.0.1 -> 52.2.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +version = "50.1.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Travis Long " +criteria = "safe-to-deploy" +version = "50.1.2" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +version = "51.1.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "51.7.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "51.8.1" +notes = "Maintained by the Glean Team at Mozilla" + +[[audits.glean-core]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "51.8.2" +notes = "Maintained by the Glean Team at Mozilla." + +[[audits.glean-core]] +who = "Chris H-C " +criteria = "safe-to-deploy" +version = "52.0.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "50.1.2 -> 50.1.3" +notes = "Bug fix release with minimal changes, changes done by myself" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "50.1.3 -> 51.0.1" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "51.1.0 -> 51.2.0" +notes = "Bug fix release with minimal changes, changes done by myself" + +[[audits.glean-core]] +who = "Perry McManis " +criteria = "safe-to-deploy" +delta = "51.2.0 -> 51.4.0" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "51.4.0 -> 51.5.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "51.7.0 -> 51.8.0" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "52.0.0 -> 52.0.1" +notes = "Maintained by the Glean team at Mozilla" + +[[audits.glean-core]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "52.0.1 -> 52.2.0" +notes = "Maintained by the Glean team at Mozilla" + [[audits.glob]] who = "Mike Hommey " criteria = "safe-to-deploy" diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index 5f9287e70ef0..fd1b1b3e151f 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -1,20 +1,6 @@ # cargo-vet imports lock -[[publisher.glean]] -version = "52.3.0" -when = "2023-02-23" -user-id = 48 -user-login = "badboy" -user-name = "Jan-Erik Rediger" - -[[publisher.glean-core]] -version = "52.3.0" -when = "2023-02-23" -user-id = 48 -user-login = "badboy" -user-name = "Jan-Erik Rediger" - [[audits.bytecodealliance.audits.arbitrary]] who = "Nick Fitzgerald " criteria = "safe-to-deploy" diff --git a/third_party/rust/android_logger/.cargo-checksum.json b/third_party/rust/android_logger/.cargo-checksum.json index 5f65e6394046..099dc814357d 100644 --- a/third_party/rust/android_logger/.cargo-checksum.json +++ b/third_party/rust/android_logger/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"66faf0eef7c262a90a0538248c0753b5bb7f6f38df086a3701db1590cc0e81a3","Cargo.toml":"35882b3da778c3a4464967f6142579b1378a4ab9ff83adebb151a606c5fdd9ed","LICENSE-APACHE":"99938c5864dd33decb62ab20fd883a9b00181d768ae887a4f19b2d0015c41dc9","LICENSE-MIT":"35043211d1b7be8f7e3f9cad27d981f2189ba9a39d9527b275b3c9740298dfe2","README.md":"dbdb2a11c4a49ec21259d611af2de6123fa9b3f467950eb7a5af163f8aea556b","src/lib.rs":"f820afaf0c15160756128018fb6eac94f74a8cf6359168346354d120c1204532","tests/config_log_level.rs":"61f12ee69f0a7e0e6c2b224d4b678f384ca0ee75122e62c01a9f75dbd9ba4437","tests/default_init.rs":"e5c77dbcf3dc2d9e21e5c48c190e6cdcdea7d8eecea8c8ce513ca98223c46b49","tests/multiple_init.rs":"b5fa06a0b92843227ecbb6285bdf7ab826412fd2fe11fac8b1fd68a7354fd3ee"},"package":"037f3e1da32ddba7770530e69258b742c15ad67bdf90e5f6b35f4b6db9a60eb7"} \ No newline at end of file +{"files":{"CHANGELOG.md":"bed2dedbff30c278a6f8de0e014a5fb4538b74b711dc733d62199cab0b4c84aa","Cargo.toml":"b4200b3217cac7b6ce6947913e45f8886456a4aca19aa7e7a28b317d11d36e6f","LICENSE-APACHE":"99938c5864dd33decb62ab20fd883a9b00181d768ae887a4f19b2d0015c41dc9","LICENSE-MIT":"35043211d1b7be8f7e3f9cad27d981f2189ba9a39d9527b275b3c9740298dfe2","README.md":"bf2e6227790edeb5959c2be250b71d1a197a3a344dc5fc1638fbb39c73bdfd21","src/lib.rs":"bcee83b2bd47d8b795a7aca2bc354a4463a13068cbfe92918ddc76c93861e5f5","tests/config_log_level.rs":"dbe26e82c497031f47804ed59dfcdb5d09af7354591f90ea89b46315e7d2edc9","tests/default_init.rs":"e5c77dbcf3dc2d9e21e5c48c190e6cdcdea7d8eecea8c8ce513ca98223c46b49","tests/multiple_init.rs":"42adfe70b2f951a3b3f051235709013124df613a7967ca5bad998fc5356b8b9f"},"package":"8619b80c242aa7bd638b5c7ddd952addeecb71f69c75e33f1d47b2804f8f883a"} \ No newline at end of file diff --git a/third_party/rust/android_logger/CHANGELOG.md b/third_party/rust/android_logger/CHANGELOG.md index 4952ca18b530..043ced71b7b4 100644 --- a/third_party/rust/android_logger/CHANGELOG.md +++ b/third_party/rust/android_logger/CHANGELOG.md @@ -6,28 +6,6 @@ All user visible changes to this project will be documented in this file. This p -## [0.12.0] · 2023-01-19 -[0.12.0]: /../../tree/v0.12.0 - -[Diff](/../../compare/v0.11.3...v0.12.0) - -### Added - -- `Config::with_max_level()` method to filters logs via `log::LevelFilter`. ([#62]) - -### Deprecated - -- `Config::with_min_level()` method accepting `log::Level`. ([#62]) - -### Fixed - -- Incorrect logs level filtering. ([#62]) - -[#62]: /../../pull/62 - - - - ## [0.11.3] · 2022-12-20 [0.11.3]: /../../tree/v0.11.3 diff --git a/third_party/rust/android_logger/Cargo.toml b/third_party/rust/android_logger/Cargo.toml index a9fd573be2ec..20ee6ba9a237 100644 --- a/third_party/rust/android_logger/Cargo.toml +++ b/third_party/rust/android_logger/Cargo.toml @@ -11,7 +11,7 @@ [package] name = "android_logger" -version = "0.12.0" +version = "0.11.3" authors = ["The android_logger Developers"] description = """ A logging implementation for `log` which hooks to android log output. diff --git a/third_party/rust/android_logger/README.md b/third_party/rust/android_logger/README.md index eec1ebafc527..cc408d65760b 100644 --- a/third_party/rust/android_logger/README.md +++ b/third_party/rust/android_logger/README.md @@ -22,13 +22,13 @@ Example of initialization on activity creation, with log configuration: #[macro_use] extern crate log; extern crate android_logger; -use log::LevelFilter; +use log::Level; use android_logger::{Config,FilterBuilder}; fn native_activity_create() { android_logger::init_once( Config::default() - .with_max_level(LevelFilter::Trace) // limit log level + .with_min_level(Level::Trace) // limit log level .with_tag("mytag") // logs will show under mytag tag .with_filter( // configure messages for specific crate FilterBuilder::new() @@ -47,13 +47,12 @@ To allow all logs, use the default configuration with min level Trace: #[macro_use] extern crate log; extern crate android_logger; -use log::LevelFilter; +use log::Level; use android_logger::Config; fn native_activity_create() { android_logger::init_once( - Config::default().with_max_level(LevelFilter::Trace), - ); + Config::default().with_min_level(Level::Trace)); } ``` diff --git a/third_party/rust/android_logger/src/lib.rs b/third_party/rust/android_logger/src/lib.rs index 0446fad7558f..d443c9137d95 100644 --- a/third_party/rust/android_logger/src/lib.rs +++ b/third_party/rust/android_logger/src/lib.rs @@ -13,13 +13,13 @@ //! #[macro_use] extern crate log; //! extern crate android_logger; //! -//! use log::LevelFilter; +//! use log::Level; //! use android_logger::Config; //! //! /// Android code may not have obvious "main", this is just an example. //! fn main() { //! android_logger::init_once( -//! Config::default().with_max_level(LevelFilter::Trace), +//! Config::default().with_min_level(Level::Trace), //! ); //! //! debug!("this is a debug {}", "message"); @@ -36,13 +36,13 @@ //! #[macro_use] extern crate log; //! extern crate android_logger; //! -//! use log::LevelFilter; +//! use log::Level; //! use android_logger::{Config,FilterBuilder}; //! //! fn main() { //! android_logger::init_once( //! Config::default() -//! .with_max_level(LevelFilter::Trace) +//! .with_min_level(Level::Trace) //! .with_tag("mytag") //! .with_filter(FilterBuilder::new().parse("debug,hello::crate=trace").build()), //! ); @@ -58,7 +58,7 @@ //! //! android_logger::init_once( //! Config::default() -//! .with_max_level(log::LevelFilter::Trace) +//! .with_min_level(log::Level::Trace) //! .format(|f, record| write!(f, "my_app: {}", record.args())) //! ) //! ``` @@ -72,7 +72,7 @@ extern crate log; extern crate env_logger; -use log::{Level, LevelFilter, Log, Metadata, Record}; +use log::{Level, Log, Metadata, Record}; #[cfg(target_os = "android")] use log_ffi::LogPriority; use std::ffi::{CStr, CString}; @@ -137,7 +137,7 @@ impl Log for AndroidLogger { fn enabled(&self, metadata: &Metadata) -> bool { let config = self.config(); // todo: consider __android_log_is_loggable. - metadata.level() <= config.log_level.unwrap_or_else(log::max_level) + Some(metadata.level()) >= config.log_level } fn log(&self, record: &Record) { @@ -214,29 +214,18 @@ impl AndroidLogger { /// Filter for android logger. #[derive(Default)] pub struct Config { - log_level: Option, + log_level: Option, filter: Option, tag: Option, custom_format: Option, } impl Config { - // TODO: Remove on 0.13 version release. - /// **DEPRECATED**, use [`Config::with_max_level()`] instead. - #[deprecated(note = "use `.with_max_level()` instead")] - pub fn with_min_level(self, level: Level) -> Self { - self.with_max_level(level.to_level_filter()) - } - - /// Changes the maximum log level. + /// Change the minimum log level. /// - /// Note, that `Trace` is the maximum level, because it provides the - /// maximum amount of detail in the emitted logs. - /// - /// If `Off` level is provided, then nothing is logged at all. - /// - /// [`log::max_level()`] is considered as the default level. - pub fn with_max_level(mut self, level: LevelFilter) -> Self { + /// All values above the set level are logged. For example, if + /// `Warn` is set, the `Error` is logged too, but `Info` isn't. + pub fn with_min_level(mut self, level: Level) -> Self { self.log_level = Some(level); self } @@ -264,7 +253,7 @@ impl Config { /// # use android_logger::Config; /// android_logger::init_once( /// Config::default() - /// .with_max_level(log::LevelFilter::Trace) + /// .with_min_level(log::Level::Trace) /// .format(|f, record| write!(f, "my_app: {}", record.args())) /// ) /// ``` @@ -460,7 +449,7 @@ pub fn init_once(config: Config) { if let Err(err) = log::set_logger(logger) { debug!("android_logger: log::set_logger failed: {}", err); } else if let Some(level) = log_level { - log::set_max_level(level); + log::set_max_level(level.to_level_filter()); } } @@ -480,10 +469,10 @@ mod tests { fn check_config_values() { // Filter is checked in config_filter_match below. let config = Config::default() - .with_max_level(LevelFilter::Trace) + .with_min_level(Level::Trace) .with_tag("my_app"); - assert_eq!(config.log_level, Some(LevelFilter::Trace)); + assert_eq!(config.log_level, Some(Level::Trace)); assert_eq!(config.tag, Some(CString::new("my_app").unwrap())); } @@ -491,7 +480,7 @@ mod tests { fn log_calls_formatter() { static FORMAT_FN_WAS_CALLED: AtomicBool = AtomicBool::new(false); let config = Config::default() - .with_max_level(LevelFilter::Info) + .with_min_level(Level::Info) .format(|_, _| { FORMAT_FN_WAS_CALLED.store(true, Ordering::SeqCst); Ok(()) @@ -504,12 +493,10 @@ mod tests { } #[test] - fn logger_enabled_threshold() { - let logger = AndroidLogger::new(Config::default().with_max_level(LevelFilter::Info)); + fn logger_always_enabled() { + let logger = AndroidLogger::new(Config::default()); - assert!(logger.enabled(&log::MetadataBuilder::new().level(Level::Warn).build())); - assert!(logger.enabled(&log::MetadataBuilder::new().level(Level::Info).build())); - assert!(!logger.enabled(&log::MetadataBuilder::new().level(Level::Debug).build())); + assert!(logger.enabled(&log::MetadataBuilder::new().build())); } // Test whether the filter gets called correctly. Not meant to be exhaustive for all filter diff --git a/third_party/rust/android_logger/tests/config_log_level.rs b/third_party/rust/android_logger/tests/config_log_level.rs index 864b229f9c0a..79043712f89b 100644 --- a/third_party/rust/android_logger/tests/config_log_level.rs +++ b/third_party/rust/android_logger/tests/config_log_level.rs @@ -3,9 +3,7 @@ extern crate log; #[test] fn config_log_level() { - android_logger::init_once( - android_logger::Config::default().with_max_level(log::LevelFilter::Trace), - ); + android_logger::init_once(android_logger::Config::default().with_min_level(log::Level::Trace)); assert_eq!(log::max_level(), log::LevelFilter::Trace); } diff --git a/third_party/rust/android_logger/tests/multiple_init.rs b/third_party/rust/android_logger/tests/multiple_init.rs index 26f815d521ae..b46f48e66deb 100644 --- a/third_party/rust/android_logger/tests/multiple_init.rs +++ b/third_party/rust/android_logger/tests/multiple_init.rs @@ -3,14 +3,10 @@ extern crate log; #[test] fn multiple_init() { - android_logger::init_once( - android_logger::Config::default().with_max_level(log::LevelFilter::Trace), - ); + android_logger::init_once(android_logger::Config::default().with_min_level(log::Level::Trace)); // Second initialization should be silently ignored - android_logger::init_once( - android_logger::Config::default().with_max_level(log::LevelFilter::Error), - ); + android_logger::init_once(android_logger::Config::default().with_min_level(log::Level::Error)); assert_eq!(log::max_level(), log::LevelFilter::Trace); } diff --git a/third_party/rust/glean-core/.cargo-checksum.json b/third_party/rust/glean-core/.cargo-checksum.json index 99413be1bbd3..bf4f1fbe099c 100644 --- a/third_party/rust/glean-core/.cargo-checksum.json +++ b/third_party/rust/glean-core/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"69b97e31c52d459ccaa045d3207c7b0f61b5771e6e504c5fdd5d63c5df68b224","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"026495898699b54608eb4ec16074ffafc57920d80ccb59961c501a1ea28c9985","build.rs":"4857bea99c6b8c08db8818efa9d3738716f52d3acb68159323957ae52892a3eb","src/common_metric_data.rs":"76b92dec9390d34003084f972a44447f458f7ca9ebbb61b62bf584ab23ac7b4c","src/core/mod.rs":"2f4902ae2095dbb0d2ee6975ad992d6635e394b3d614419417ff0c6f5c806f54","src/core_metrics.rs":"a877e42e0f8b932adb52a5681ad76fd977808cb48c7eeb29b1e4bbe804f1ea96","src/coverage.rs":"49613fd310bd24d779472720975fbe6c97ec370a95eb55f10afa43f67539c942","src/database/mod.rs":"111b65e00e8c77de8942e498a689e15456bfda15302d1c00f5751e27036ce229","src/debug.rs":"90158cc5d488ba67b60d06647e54e59a1d7bdeb906087e4fe4cfab4373c1cc6c","src/dispatcher/global.rs":"320a95bfe8c18fa1c109c4170bb78a23356ed1ef7f7bb5b81dd0bca38875d62a","src/dispatcher/mod.rs":"e9254d698102b97cc4fdf5f52d875271a5504945b35016179d2b8124140782df","src/error.rs":"b93c7d3e243b21bb9eafc95f17860aba1a942b2f2b0a7f43307690f05fece516","src/error_recording.rs":"d7858647808d81173558e12de88f3fbe4e589969e3bd246bfb388f90f8ff3814","src/event_database/mod.rs":"d410a912ec0ca8541620b96a1807ff8057b9dd207c3b0eddabd97b98326bcac9","src/fd_logger.rs":"0c9def6fa53db1a2ab93c85795f8a7df57797bcfd3978146923e151752e291a6","src/glean.udl":"b84c102c75283385da3445fa4102bc90bfcb3007cde7ba43a4d0f5d9a9798613","src/glean_metrics.rs":"9414fb1453d19f6832df33e4c6ef7383d62203e47026bf5bc9552b083101ddd1","src/histogram/exponential.rs":"58bb1770bae45770d92995515d328eb50a7e78726224f779446ae7d1632a6a3e","src/histogram/functional.rs":"1a63a305b48bcef7bc38136b40d916df4bb8f098dc602514ada54a9b091f6951","src/histogram/linear.rs":"4342a1733175d7f97b2b41adb18100537c206100c9fccb5bd13bd782c9cb3c9a","src/histogram/mod.rs":"eeb7aff80806ab76cdce101dc08887b5552f8b4bdf64683f64f767e0f06a889d","src/internal_metrics.rs":"a6c5517b65af0572bf1f6f4125c475a74676f6da04d1ea1f78649ed69fa976bb","src/internal_pings.rs":"f67e3166623cf354f79ea5aa76289276468cdac6e0fe6e6b6f427dcf3fc5367b","src/lib.rs":"26979bbcd6b8b264402040c2af9f67a653f2feb659573eae1ae4b4b3c12c8a58","src/lib_unit_tests.rs":"f7d022dd8c874ca6e2cf4059ec9c415b79dcd90c8d015c0d1ff0b99df447f51f","src/metrics/boolean.rs":"0591043a88e81c77b694cc8124b9e4996e81a46df1402e1bdf364d2885d8215e","src/metrics/counter.rs":"0f46083c1c8f1abfab582391478731cdc9f33bc80fffef4a2e0e64592a2253c0","src/metrics/custom_distribution.rs":"9ca60176837e216da3655b2a3ba08a296444aaa7d966ddd498478fdfb2b21049","src/metrics/datetime.rs":"ca12a426fbc564847d64e6ddcaa3f298065ba4bca0372c638058c20909f626d5","src/metrics/denominator.rs":"7bacb81ea2b81da8775f61544022d35d91f159e1aa494944eaf9536cacc18b4d","src/metrics/event.rs":"f6c276299ad65054758971a46aebd87d3c3db4f00d8bb43eeab5c5e4e06b5bc8","src/metrics/experiment.rs":"48aaf06b32a691500dbc51be95955071947d7760e3b81d30ac8d8d0161c1df3f","src/metrics/labeled.rs":"c6e2200694e3cd623e8369420d3b35759b117ef9e8188fd33afaa81685fdce28","src/metrics/memory_distribution.rs":"574eb3f5752afe0558b0554905d97eb103401eb3834b1815274c909541eef826","src/metrics/memory_unit.rs":"d7a678e5242febd021283b30c0099a9e62729944816a3f17d2d91e2808bc0570","src/metrics/metrics_disabled_config.rs":"2c439b7f2494f417931f38c997a4d10eafadc89aac755bf6d23af325c8836d1d","src/metrics/mod.rs":"2268c29fda8b11872b35d3d87116009e4d1206d69a91ca12f50d7ec9b0248d94","src/metrics/numerator.rs":"442236e1d63b31299f3f073bead683101de995845a638834201c6f30fc03ea90","src/metrics/ping.rs":"02bac8664a0d38a3519fa387513e3ecbb4b54e9367d842f6e52594ecaa514b07","src/metrics/quantity.rs":"915ab10cf1e1666fc2c707bc51232843e914d93eea2a249eb15df28b6a74cd2b","src/metrics/rate.rs":"38a6986387ec3927dbd81d8a881e257674e91bb97ccd43eb6285f691d5e06531","src/metrics/recorded_experiment.rs":"33958abee79d8b55dec4cb5d20742640423713010f76314075cefde18b5c118a","src/metrics/string.rs":"f7ffc07c23bedc1b8579121d931468b0713834fc037f7945267257fdbdf9a5d0","src/metrics/string_list.rs":"db886476bf2a8318f17c6bdcdb4f699b413181497d1271dbec2bcbecf2df96ce","src/metrics/text.rs":"d727bcc14d2c4f946a517ac0110f585bfbe4898f813bdbad68756505529300f6","src/metrics/time_unit.rs":"b7578010c6270a45b30342b59189a862b2ede9dd24e9afae3e90fa6b970b3d24","src/metrics/timespan.rs":"ae1a2966f0a5446327ad2b9ca0738992976350ad334a5e11fd4ee611a690394e","src/metrics/timing_distribution.rs":"57d4b3f19e7382f80cc596406d3d1c191f61bc3c81f92bf137a13c2fa174c822","src/metrics/url.rs":"9bec842b7a811f01c1f0a0deb54b2dac2f8488882e7e9251cd91d18e6b500939","src/metrics/uuid.rs":"f824019fe3e8d8945490b7eb0ac1c6b7b2ffc991543f4b6332d12827955cf420","src/ping/mod.rs":"a381b131fa1581e3f5292ff40c8ce5d044a259e0171c4d2304fb12c1623cdc32","src/scheduler.rs":"129863e31205404a3d1708627a62583324c347d143f976216f769893ec541ea0","src/storage/mod.rs":"3fd0fb9b743a1ec12b8b1fd07f1a99594db030ec47ab4afe255923e6d11a636a","src/system.rs":"e3d1b54e1d39cafe6f4dc7ff5021b08c879733f909951b0e1332b3efa9ed97bd","src/traits/boolean.rs":"be0e130f8043215705becc956d45b126c340568f1b24a396c0af9b4334a41ced","src/traits/counter.rs":"c686d26e131d854cd7a7df83c900ca7c17a03c663a30cf58ab48c7259476ce85","src/traits/custom_distribution.rs":"159a5e26fb2326f5bcdc46979aa9c6481c5f0e93ecf957f668bb3f6988d8b00f","src/traits/datetime.rs":"636ac1456b1b042e38cf5ae6193c5b232ea0b80df62f583a2097891baef9641b","src/traits/event.rs":"3f48aa336854141784d121f7fa9e283f6ff708a9214f9c0aade3a68cc38dda99","src/traits/labeled.rs":"c633c68e70a44e73f8aff88aaab1029c0faded3cad08d822590ed8838f24b4fd","src/traits/memory_distribution.rs":"55bb8f45e948319fbba9d28a50d8742da134b066a42e480887db7c7e435f4096","src/traits/mod.rs":"d0aa19a7cd97326fd2e026635406a5a9403953ced4954443a2bcbca32d868554","src/traits/numerator.rs":"6e4f236bdc448f1bde7a8c249dcd086204c2c69990d3f444e746290929226ed3","src/traits/ping.rs":"8831c106c03afeb458b0b028fa1ce61f056ebf8e82bc0a171a1bff255d920748","src/traits/quantity.rs":"6ffe25c913bef4315573d747308c182de740b2a4e02ba22cd21d0c33ba521f31","src/traits/rate.rs":"f000790440e0f389f0b160526a9a9a266e58d1405915ae56ac550f482858222c","src/traits/string.rs":"0c3c88382ff2e8eba89c7cfe129c4b84e31140af717819533c14919541ad790c","src/traits/string_list.rs":"14e56b62c2c2be1dd8013f12001f235b084abd2a0d5aa2f7932843877af49ac0","src/traits/text.rs":"8af7d3a0c87cfd8c6d33d6ad47532b431055bbdd395f9110da5630222c23cf93","src/traits/timespan.rs":"52be325a9c061916f34c5b638a07a93b4a14aa89fe365783103d2e06b998f547","src/traits/timing_distribution.rs":"7cb59eb55e92516e6b076e2bb2d7fa120f491f01ba873918f93421079cc442ad","src/traits/url.rs":"c27f7add23214ff051078b65b88120b620560d2841a1056c7214d5237e86b9e4","src/traits/uuid.rs":"81322e71c7e847bacaf827a2cd58f6193bdc208355524207f7f38db039da6aa8","src/upload/directory.rs":"f671abed05d57061b59e12b0c6faccdf6765eb632aed9d28599dfdc3bf0c4546","src/upload/mod.rs":"b39da6c8b90af76c6f7403bd7c9d94896142b8a46b02414d171a60a30f7a0405","src/upload/policy.rs":"c250957a37783e74af8002cd80ba06ef9780a389fb0f61b8b665b79688f0a360","src/upload/request.rs":"a57fd6780c4d1411a64b0e2cb981310be87896f047db990f804fdb47d61c0a21","src/upload/result.rs":"7efbbe50e8d36beb3f23e7bfd172d22e1c003472d2dd8055b06f6050c36437c5","src/util.rs":"ee7500434d9758a320dd410f18d7e18da956591e19d2555db87eef9623e4b916","tests/boolean.rs":"76d6014ff108cb6514d9bceb1b2b14749a55b09921f4595a5e30f1bd3546e9f0","tests/common/mod.rs":"bdecd3981eb0ae097ffc2dff59438212385af938fa6e1f3d39d4973b124fb6ca","tests/counter.rs":"46c82058cb1d7c60b340b6dbce998b4ea57333767ff52635d48a65235180e276","tests/custom_distribution.rs":"53530972243670ef58c85a906b70931d14e81ae2e1f69092c71a27e561edff6c","tests/datetime.rs":"ec3c9760e70bb2cbc61ab23281c891bc1ec493c5c545466c29fd13e4f05c2c96","tests/event.rs":"a12a32846666f232f700d5234e78fd9d5c85b45ed84cca1061ee9eedf333e66f","tests/labeled.rs":"e9ea6dba17059d68114efce0c23373be9ceed922bf5e638a2158a6422c75a1c1","tests/memory_distribution.rs":"a5a7aa955e60823ea29a6f4bc96c61e41f1e41f08958aa4854668cf8fe04cde6","tests/ping.rs":"8d480950acc33cbd8da9ed9575266d561f1b4601ed02de15d155227b9e27e6c3","tests/ping_maker.rs":"2a807cb93a7302a3f7f274b3cb266db1961ae4733aacd4279c9f0e94679b55ff","tests/quantity.rs":"55e7dca346fd1d27f0974b78ca3fb12427cb5da2ee637afc08a54f360f947361","tests/rate.rs":"1de571b9f0ee9a9006cbc8a31f91352d3ff1190b50840f0f668b470a7cd2a3a5","tests/storage.rs":"f0c8312bd789d7bda502cd45f35fef6b8591652bd194d07da4d81935ebe69b48","tests/string.rs":"7ece988a4b8efe6932ccb90bfe2f3c8aaea983777e99d7de6028bf6a29459ee6","tests/string_list.rs":"d80d7ed42802e22aa3f255f66c1dcea5ce0548a10f38b311748fd754c5ff9d0e","tests/text.rs":"1d43f6b90a43124311cacf0a6ee16f9e1e9263bcd11fee8b996d6efd81633638","tests/timespan.rs":"d50d75c7d75da3a878d67331cb0df8ae5e6a099ffab474361f71a408e02528d7","tests/timing_distribution.rs":"dbe2c8efa5dfb8037765b50433568c04ba111953822584da1c4931837fdfc060","tests/uuid.rs":"052ad26a6927c56272219340211cf4a059d200f14287b482fe8621d7bce3cc54","uniffi.toml":"6ddc98b686b0925a81abd9d1c769e5c98ac29771b210a1c535931a46dec9a8e3"},"package":"699ab3d674e2618298111987c0053735ef7a531d09264a3aa7d496f5ac2247d6"} \ No newline at end of file +{"files":{"Cargo.toml":"ee2babbb42458f9c72050245c8270538564c5ecef7f879f884227302a07f2aea","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"026495898699b54608eb4ec16074ffafc57920d80ccb59961c501a1ea28c9985","build.rs":"4857bea99c6b8c08db8818efa9d3738716f52d3acb68159323957ae52892a3eb","src/common_metric_data.rs":"76b92dec9390d34003084f972a44447f458f7ca9ebbb61b62bf584ab23ac7b4c","src/core/mod.rs":"2f4902ae2095dbb0d2ee6975ad992d6635e394b3d614419417ff0c6f5c806f54","src/core_metrics.rs":"a877e42e0f8b932adb52a5681ad76fd977808cb48c7eeb29b1e4bbe804f1ea96","src/coverage.rs":"49613fd310bd24d779472720975fbe6c97ec370a95eb55f10afa43f67539c942","src/database/mod.rs":"0567e3ea7cc893ebc6efa78e95ae92180be72f96d2a009e26bf59b43ec567ceb","src/debug.rs":"90158cc5d488ba67b60d06647e54e59a1d7bdeb906087e4fe4cfab4373c1cc6c","src/dispatcher/global.rs":"e97405db6f4eda73cccf9a34ffff65198a1cbb193e0cc0fef7da13e20ba8aae7","src/dispatcher/mod.rs":"e9254d698102b97cc4fdf5f52d875271a5504945b35016179d2b8124140782df","src/error.rs":"b93c7d3e243b21bb9eafc95f17860aba1a942b2f2b0a7f43307690f05fece516","src/error_recording.rs":"d7858647808d81173558e12de88f3fbe4e589969e3bd246bfb388f90f8ff3814","src/event_database/mod.rs":"d410a912ec0ca8541620b96a1807ff8057b9dd207c3b0eddabd97b98326bcac9","src/fd_logger.rs":"0c9def6fa53db1a2ab93c85795f8a7df57797bcfd3978146923e151752e291a6","src/glean.udl":"5e272f89a37e700dba0a0f3326397eb2a256fb853d75bc43f4563324646c7dab","src/glean_metrics.rs":"9414fb1453d19f6832df33e4c6ef7383d62203e47026bf5bc9552b083101ddd1","src/histogram/exponential.rs":"58bb1770bae45770d92995515d328eb50a7e78726224f779446ae7d1632a6a3e","src/histogram/functional.rs":"1a63a305b48bcef7bc38136b40d916df4bb8f098dc602514ada54a9b091f6951","src/histogram/linear.rs":"4342a1733175d7f97b2b41adb18100537c206100c9fccb5bd13bd782c9cb3c9a","src/histogram/mod.rs":"eeb7aff80806ab76cdce101dc08887b5552f8b4bdf64683f64f767e0f06a889d","src/internal_metrics.rs":"5d8db01a4ecc7266893984869008fca40b3d2d1ba862062579eedf0c45e3e28b","src/internal_pings.rs":"f67e3166623cf354f79ea5aa76289276468cdac6e0fe6e6b6f427dcf3fc5367b","src/lib.rs":"6bd2b362bf5156fd36c381719b911829b2887d88299202969f880986901da80e","src/lib_unit_tests.rs":"2991052a9531cf7ef327641135275ece8bad0b223fb93a807ad665a917cd4f5a","src/metrics/boolean.rs":"0591043a88e81c77b694cc8124b9e4996e81a46df1402e1bdf364d2885d8215e","src/metrics/counter.rs":"0f46083c1c8f1abfab582391478731cdc9f33bc80fffef4a2e0e64592a2253c0","src/metrics/custom_distribution.rs":"9ca60176837e216da3655b2a3ba08a296444aaa7d966ddd498478fdfb2b21049","src/metrics/datetime.rs":"ca12a426fbc564847d64e6ddcaa3f298065ba4bca0372c638058c20909f626d5","src/metrics/denominator.rs":"7bacb81ea2b81da8775f61544022d35d91f159e1aa494944eaf9536cacc18b4d","src/metrics/event.rs":"f6c276299ad65054758971a46aebd87d3c3db4f00d8bb43eeab5c5e4e06b5bc8","src/metrics/experiment.rs":"48aaf06b32a691500dbc51be95955071947d7760e3b81d30ac8d8d0161c1df3f","src/metrics/labeled.rs":"80ee352cea14cf51ef26d91a3281c75f4887f834923cd6a272fe7575d335d453","src/metrics/memory_distribution.rs":"574eb3f5752afe0558b0554905d97eb103401eb3834b1815274c909541eef826","src/metrics/memory_unit.rs":"d7a678e5242febd021283b30c0099a9e62729944816a3f17d2d91e2808bc0570","src/metrics/metrics_disabled_config.rs":"2c439b7f2494f417931f38c997a4d10eafadc89aac755bf6d23af325c8836d1d","src/metrics/mod.rs":"2268c29fda8b11872b35d3d87116009e4d1206d69a91ca12f50d7ec9b0248d94","src/metrics/numerator.rs":"442236e1d63b31299f3f073bead683101de995845a638834201c6f30fc03ea90","src/metrics/ping.rs":"02bac8664a0d38a3519fa387513e3ecbb4b54e9367d842f6e52594ecaa514b07","src/metrics/quantity.rs":"915ab10cf1e1666fc2c707bc51232843e914d93eea2a249eb15df28b6a74cd2b","src/metrics/rate.rs":"38a6986387ec3927dbd81d8a881e257674e91bb97ccd43eb6285f691d5e06531","src/metrics/recorded_experiment.rs":"33958abee79d8b55dec4cb5d20742640423713010f76314075cefde18b5c118a","src/metrics/string.rs":"7c78ac5a3fe6d57593a6cc934c3e6223ee912cba0c1a87e51f748e01c406a1ce","src/metrics/string_list.rs":"db886476bf2a8318f17c6bdcdb4f699b413181497d1271dbec2bcbecf2df96ce","src/metrics/text.rs":"5714e4f11161fd1b54b1996af0d770ec69251b1a778ae43de1a5ece95b54163d","src/metrics/time_unit.rs":"b7578010c6270a45b30342b59189a862b2ede9dd24e9afae3e90fa6b970b3d24","src/metrics/timespan.rs":"ae1a2966f0a5446327ad2b9ca0738992976350ad334a5e11fd4ee611a690394e","src/metrics/timing_distribution.rs":"de9ca38bfede658411a9f612b53e0db1cc6ba0ac1ebc054fd80088d0b9e6d18f","src/metrics/url.rs":"bec6aae5b424997b757399e99eea2a44d73f8e1120a6aea508ca86e7bb478791","src/metrics/uuid.rs":"f824019fe3e8d8945490b7eb0ac1c6b7b2ffc991543f4b6332d12827955cf420","src/ping/mod.rs":"d7851e29e7363cad04d48f18ab664bde26e25c246bee94daf6c02ad5031240f7","src/scheduler.rs":"129863e31205404a3d1708627a62583324c347d143f976216f769893ec541ea0","src/storage/mod.rs":"3fd0fb9b743a1ec12b8b1fd07f1a99594db030ec47ab4afe255923e6d11a636a","src/system.rs":"e3d1b54e1d39cafe6f4dc7ff5021b08c879733f909951b0e1332b3efa9ed97bd","src/traits/boolean.rs":"be0e130f8043215705becc956d45b126c340568f1b24a396c0af9b4334a41ced","src/traits/counter.rs":"c686d26e131d854cd7a7df83c900ca7c17a03c663a30cf58ab48c7259476ce85","src/traits/custom_distribution.rs":"159a5e26fb2326f5bcdc46979aa9c6481c5f0e93ecf957f668bb3f6988d8b00f","src/traits/datetime.rs":"636ac1456b1b042e38cf5ae6193c5b232ea0b80df62f583a2097891baef9641b","src/traits/event.rs":"3f48aa336854141784d121f7fa9e283f6ff708a9214f9c0aade3a68cc38dda99","src/traits/labeled.rs":"c633c68e70a44e73f8aff88aaab1029c0faded3cad08d822590ed8838f24b4fd","src/traits/memory_distribution.rs":"55bb8f45e948319fbba9d28a50d8742da134b066a42e480887db7c7e435f4096","src/traits/mod.rs":"d0aa19a7cd97326fd2e026635406a5a9403953ced4954443a2bcbca32d868554","src/traits/numerator.rs":"6e4f236bdc448f1bde7a8c249dcd086204c2c69990d3f444e746290929226ed3","src/traits/ping.rs":"8831c106c03afeb458b0b028fa1ce61f056ebf8e82bc0a171a1bff255d920748","src/traits/quantity.rs":"6ffe25c913bef4315573d747308c182de740b2a4e02ba22cd21d0c33ba521f31","src/traits/rate.rs":"f000790440e0f389f0b160526a9a9a266e58d1405915ae56ac550f482858222c","src/traits/string.rs":"0c3c88382ff2e8eba89c7cfe129c4b84e31140af717819533c14919541ad790c","src/traits/string_list.rs":"14e56b62c2c2be1dd8013f12001f235b084abd2a0d5aa2f7932843877af49ac0","src/traits/text.rs":"8af7d3a0c87cfd8c6d33d6ad47532b431055bbdd395f9110da5630222c23cf93","src/traits/timespan.rs":"52be325a9c061916f34c5b638a07a93b4a14aa89fe365783103d2e06b998f547","src/traits/timing_distribution.rs":"7cb59eb55e92516e6b076e2bb2d7fa120f491f01ba873918f93421079cc442ad","src/traits/url.rs":"c27f7add23214ff051078b65b88120b620560d2841a1056c7214d5237e86b9e4","src/traits/uuid.rs":"81322e71c7e847bacaf827a2cd58f6193bdc208355524207f7f38db039da6aa8","src/upload/directory.rs":"f671abed05d57061b59e12b0c6faccdf6765eb632aed9d28599dfdc3bf0c4546","src/upload/mod.rs":"3ba6fdfe13c268855e75e723ec80de6fc76a1bc96dec5df8b701e0dd45ae5811","src/upload/policy.rs":"c250957a37783e74af8002cd80ba06ef9780a389fb0f61b8b665b79688f0a360","src/upload/request.rs":"a57fd6780c4d1411a64b0e2cb981310be87896f047db990f804fdb47d61c0a21","src/upload/result.rs":"7efbbe50e8d36beb3f23e7bfd172d22e1c003472d2dd8055b06f6050c36437c5","src/util.rs":"ee7500434d9758a320dd410f18d7e18da956591e19d2555db87eef9623e4b916","tests/boolean.rs":"76d6014ff108cb6514d9bceb1b2b14749a55b09921f4595a5e30f1bd3546e9f0","tests/common/mod.rs":"bdecd3981eb0ae097ffc2dff59438212385af938fa6e1f3d39d4973b124fb6ca","tests/counter.rs":"46c82058cb1d7c60b340b6dbce998b4ea57333767ff52635d48a65235180e276","tests/custom_distribution.rs":"149a0e739fb36da3d4af85556566b907e4c43e2f27b66e1ebda3cd7e9c8c7196","tests/datetime.rs":"a991dee34e21a20df518a57b49f4476060b991ec00d519aa4341341085e4d0b3","tests/event.rs":"a12a32846666f232f700d5234e78fd9d5c85b45ed84cca1061ee9eedf333e66f","tests/labeled.rs":"72e065b31b04d7cd166da8f649b409d007508e8c8a3a68af9b6222f3d3306333","tests/memory_distribution.rs":"250db8abcaf4651307483a62c06bd7b34dcdc5691b0d10f8307298a32b0c903c","tests/ping.rs":"398a1018cedc29533253b57db3112ce0e9149bdcbdaa5a977eeee0195f7beb04","tests/ping_maker.rs":"61b49380f8865b626643879079867571377950aea4701da0665e63cbe88083e0","tests/quantity.rs":"e839d504af1c438f6ef98581066d807271900c52511f80e25488497885467fe8","tests/rate.rs":"1de571b9f0ee9a9006cbc8a31f91352d3ff1190b50840f0f668b470a7cd2a3a5","tests/storage.rs":"f0c8312bd789d7bda502cd45f35fef6b8591652bd194d07da4d81935ebe69b48","tests/string.rs":"cbbd68a86275b86e5327c313071cbe210dfa325cece27735eaab381f8007cdf3","tests/string_list.rs":"73857baba228e1627430c500f4fa2456d81906718fed8ae6e8a61123dfcef98f","tests/text.rs":"d8ccf1841c92d2fc44e4e7ca35c14a177d835462d2c77e0b0d26fa2e685a5602","tests/timespan.rs":"ed71fd1e25c82f020917b1746c7d84ea23a207a03fe37b8dee3193366f2b28df","tests/timing_distribution.rs":"57f263576c4f8c5c6ee37de2a84522e62122af425c8da233227253da9705a44a","tests/uuid.rs":"ad073a6782447972dbed8aaa8891af1855861c5e9cccd0d61a018530f4d547f4","uniffi.toml":"6ddc98b686b0925a81abd9d1c769e5c98ac29771b210a1c535931a46dec9a8e3"},"package":"01c3b0c688d31dbe58dd799d771d4ab60d9a20932fa0eac80dbb08f20149f36b"} \ No newline at end of file diff --git a/third_party/rust/glean-core/Cargo.toml b/third_party/rust/glean-core/Cargo.toml index faa9c47d803f..0aa69f82e39d 100644 --- a/third_party/rust/glean-core/Cargo.toml +++ b/third_party/rust/glean-core/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.60" name = "glean-core" -version = "52.3.0" +version = "52.2.0" authors = [ "Jan-Erik Rediger ", "The Glean Team ", @@ -49,7 +49,7 @@ features = ["serde"] version = "0.5" [dependencies.env_logger] -version = "0.10.0" +version = "0.9.0" optional = true default-features = false @@ -98,9 +98,10 @@ version = "0.1.0" version = "0.1.12" [dev-dependencies.env_logger] -version = "0.10.0" +version = "0.9.0" features = [ - "auto-color", + "termcolor", + "atty", "humantime", ] default-features = false @@ -121,7 +122,7 @@ enable_env_logger = ["env_logger"] preinit_million_queue = [] [target."cfg(target_os = \"android\")".dependencies.android_logger] -version = "0.12.0" +version = "0.11.0" default-features = false [target."cfg(target_os = \"ios\")".dependencies.oslog] diff --git a/third_party/rust/glean-core/src/database/mod.rs b/third_party/rust/glean-core/src/database/mod.rs index 363ef10129e8..aebab62e114a 100644 --- a/third_party/rust/glean-core/src/database/mod.rs +++ b/third_party/rust/glean-core/src/database/mod.rs @@ -460,12 +460,7 @@ impl Database { for ping_name in data.storage_names() { if let Err(e) = self.record_per_lifetime(data.inner.lifetime, ping_name, &name, value) { - log::error!( - "Failed to record metric '{}' into {}: {:?}", - data.base_identifier(), - ping_name, - e - ); + log::error!("Failed to record metric into {}: {:?}", ping_name, e); } } } @@ -528,12 +523,7 @@ impl Database { if let Err(e) = self.record_per_lifetime_with(data.inner.lifetime, ping_name, &name, &mut transform) { - log::error!( - "Failed to record metric '{}' into {}: {:?}", - data.base_identifier(), - ping_name, - e - ); + log::error!("Failed to record metric into {}: {:?}", ping_name, e); } } } diff --git a/third_party/rust/glean-core/src/dispatcher/global.rs b/third_party/rust/glean-core/src/dispatcher/global.rs index fec5bb636513..d4eddd870507 100644 --- a/third_party/rust/glean-core/src/dispatcher/global.rs +++ b/third_party/rust/glean-core/src/dispatcher/global.rs @@ -5,7 +5,6 @@ use once_cell::sync::Lazy; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::RwLock; -use std::thread; use super::{DispatchError, DispatchGuard, Dispatcher}; @@ -46,11 +45,6 @@ fn guard() -> DispatchGuard { /// /// [`flush_init`]: fn.flush_init.html pub fn launch(task: impl FnOnce() + Send + 'static) { - let current_thread = thread::current(); - if let Some("glean.shutdown") = current_thread.name() { - log::error!("Tried to launch a task from the shutdown thread. That is forbidden."); - } - let guard = guard(); match guard.launch(task) { Ok(_) => {} diff --git a/third_party/rust/glean-core/src/glean.udl b/third_party/rust/glean-core/src/glean.udl index 3f78864e5876..ed4871255bb4 100644 --- a/third_party/rust/glean-core/src/glean.udl +++ b/third_party/rust/glean-core/src/glean.udl @@ -102,7 +102,7 @@ callback interface OnGleanEvents { // The language SDK can do additional things from within the same initializer thread, // e.g. starting to observe application events for foreground/background behavior. // The observer then needs to call the respective client activity API. - void initialize_finished(); + void on_initialize_finished(); // Trigger the uploader whenever a ping was submitted. // @@ -123,15 +123,6 @@ callback interface OnGleanEvents { // Called when upload is disabled and uploads should be stopped [Throws=CallbackError] void cancel_uploads(); - - // Called on shutdown, before Glean is fully shutdown. - // - // * This MUST NOT put any new tasks on the dispatcher. - // * New tasks will be ignored. - // * This SHOULD NOT block arbitrarily long. - // * Shutdown waits for a maximum of 30 seconds. - [Throws=CallbackError] - void shutdown(); }; // Deserialized experiment data. diff --git a/third_party/rust/glean-core/src/internal_metrics.rs b/third_party/rust/glean-core/src/internal_metrics.rs index 897d04437a26..a3578267de62 100644 --- a/third_party/rust/glean-core/src/internal_metrics.rs +++ b/third_party/rust/glean-core/src/internal_metrics.rs @@ -21,9 +21,6 @@ pub struct AdditionalMetrics { /// A count of the pings submitted, by ping type. pub pings_submitted: LabeledMetric, - - /// Time waited for the uploader at shutdown. - pub shutdown_wait: TimingDistributionMetric, } impl CoreMetrics { @@ -85,18 +82,6 @@ impl AdditionalMetrics { }, None, ), - - shutdown_wait: TimingDistributionMetric::new( - CommonMetricData { - name: "shutdown_wait".into(), - category: "glean.validation".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }, - TimeUnit::Millisecond, - ), } } } @@ -108,10 +93,6 @@ pub struct UploadMetrics { pub pending_pings_directory_size: MemoryDistributionMetric, pub deleted_pings_after_quota_hit: CounterMetric, pub pending_pings: CounterMetric, - pub send_success: TimingDistributionMetric, - pub send_failure: TimingDistributionMetric, - pub in_flight_pings_dropped: CounterMetric, - pub missing_send_ids: CounterMetric, } impl UploadMetrics { @@ -176,48 +157,6 @@ impl UploadMetrics { disabled: false, dynamic_label: None, }), - - send_success: TimingDistributionMetric::new( - CommonMetricData { - name: "send_success".into(), - category: "glean.upload".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }, - TimeUnit::Millisecond, - ), - - send_failure: TimingDistributionMetric::new( - CommonMetricData { - name: "send_failure".into(), - category: "glean.upload".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }, - TimeUnit::Millisecond, - ), - - in_flight_pings_dropped: CounterMetric::new(CommonMetricData { - name: "in_flight_pings_dropped".into(), - category: "glean.upload".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }), - - missing_send_ids: CounterMetric::new(CommonMetricData { - name: "missing_send_ids".into(), - category: "glean.upload".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }), } } } diff --git a/third_party/rust/glean-core/src/lib.rs b/third_party/rust/glean-core/src/lib.rs index 0cfcdb42b5ae..0bf143d0cecd 100644 --- a/third_party/rust/glean-core/src/lib.rs +++ b/third_party/rust/glean-core/src/lib.rs @@ -21,14 +21,10 @@ use std::convert::TryFrom; use std::fmt; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex}; -use std::thread; -use std::time::Duration; - -use crossbeam_channel::unbounded; -use once_cell::sync::{Lazy, OnceCell}; -use uuid::Uuid; use metrics::MetricsDisabledConfig; +use once_cell::sync::{Lazy, OnceCell}; +use uuid::Uuid; mod common_metric_data; mod core; @@ -228,7 +224,7 @@ pub trait OnGleanEvents: Send { /// The language SDK can do additional things from within the same initializer thread, /// e.g. starting to observe application events for foreground/background behavior. /// The observer then needs to call the respective client activity API. - fn initialize_finished(&self); + fn on_initialize_finished(&self); /// Trigger the uploader whenever a ping was submitted. /// @@ -241,17 +237,6 @@ pub trait OnGleanEvents: Send { /// Called when upload is disabled and uploads should be stopped fn cancel_uploads(&self) -> Result<(), CallbackError>; - - /// Called on shutdown, before glean-core is fully shutdown. - /// - /// * This MUST NOT put any new tasks on the dispatcher. - /// * New tasks will be ignored. - /// * This SHOULD NOT block arbitrarily long. - /// * Shutdown waits for a maximum of 30 seconds. - fn shutdown(&self) -> Result<(), CallbackError> { - // empty by default - Ok(()) - } } /// Initializes Glean. @@ -461,7 +446,7 @@ fn initialize_inner( } let state = global_state().lock().unwrap(); - state.callbacks.initialize_finished(); + state.callbacks.on_initialize_finished(); }) .expect("Failed to spawn Glean's init thread"); @@ -488,54 +473,6 @@ pub fn join_init() { } } -/// Call the `shutdown` callback. -/// -/// This calls the shutdown in a separate thread and waits up to 30s for it to finish. -/// If not finished in that time frame it continues. -/// -/// Under normal operation that is fine, as the main process will end -/// and thus the thread will get killed. -fn uploader_shutdown() { - let timer_id = core::with_glean(|glean| glean.additional_metrics.shutdown_wait.start_sync()); - let (tx, rx) = unbounded(); - - let handle = thread::Builder::new() - .name("glean.shutdown".to_string()) - .spawn(move || { - let state = global_state().lock().unwrap(); - if let Err(e) = state.callbacks.shutdown() { - log::error!("Shutdown callback failed: {e:?}"); - } - - // Best-effort sending. The other side might have timed out already. - let _ = tx.send(()).ok(); - }) - .expect("Unable to spawn thread to wait on shutdown"); - - // TODO: 30 seconds? What's a good default here? Should this be configurable? - // Reasoning: - // * If we shut down early we might still be processing pending pings. - // In this case we wait at most 3 times for 1s = 3s before we upload. - // * If we're rate-limited the uploader sleeps for up to 60s. - // Thus waiting 30s will rarely allow another upload. - // * We don't know how long uploads take until we get data from bug 1814592. - let result = rx.recv_timeout(Duration::from_secs(30)); - - let stop_time = time::precise_time_ns(); - core::with_glean(|glean| { - glean - .additional_metrics - .shutdown_wait - .set_stop_and_accumulate(glean, timer_id, stop_time); - }); - - if result.is_err() { - log::warn!("Waiting for upload failed. We're shutting down."); - } else { - let _ = handle.join().ok(); - } -} - /// Shuts down Glean in an orderly fashion. pub fn shutdown() { // Either init was never called or Glean was not fully initialized @@ -563,8 +500,6 @@ pub fn shutdown() { log::error!("Can't shutdown dispatcher thread: {:?}", e); } - uploader_shutdown(); - // Be sure to call this _after_ draining the dispatcher core::with_glean(|glean| { if let Err(e) = glean.persist_ping_lifetime_data() { @@ -638,7 +573,7 @@ pub extern "C" fn glean_enable_logging() { .build(); android_logger::init_once( android_logger::Config::default() - .with_max_level(log::LevelFilter::Debug) + .with_min_level(log::Level::Debug) .with_filter(filter) .with_tag("libglean_ffi"), ); @@ -960,14 +895,6 @@ pub fn glean_test_destroy_glean(clear_stores: bool, data_path: Option) { dispatcher::reset_dispatcher(); - // Only useful if Glean initialization finished successfully - // and set up the storage. - let has_storage = - core::with_opt_glean(|glean| glean.storage_opt().is_some()).unwrap_or(false); - if has_storage { - uploader_shutdown(); - } - if core::global_glean().is_some() { core::with_glean_mut(|glean| { if clear_stores { diff --git a/third_party/rust/glean-core/src/lib_unit_tests.rs b/third_party/rust/glean-core/src/lib_unit_tests.rs index 548e0d2b08bc..ed9baee5207d 100644 --- a/third_party/rust/glean-core/src/lib_unit_tests.rs +++ b/third_party/rust/glean-core/src/lib_unit_tests.rs @@ -27,7 +27,7 @@ pub fn new_glean(tempdir: Option) -> (Glean, tempfile::TempDi #[test] fn path_is_constructed_from_data() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); assert_eq!( "/submit/org-mozilla-glean-test-app/baseline/1/this-is-a-docid", @@ -241,7 +241,7 @@ fn basic_metrics_should_be_cleared_when_uploading_is_disabled() { #[test] fn first_run_date_is_managed_correctly_when_toggling_uploading() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let original_first_run_date = glean .core_metrics @@ -269,7 +269,7 @@ fn first_run_date_is_managed_correctly_when_toggling_uploading() { #[test] fn client_id_is_managed_correctly_when_toggling_uploading() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let original_client_id = glean .core_metrics @@ -611,7 +611,7 @@ fn test_dirty_bit() { fn test_change_metric_type_runtime() { let dir = tempfile::tempdir().unwrap(); - let (glean, _t) = new_glean(Some(dir)); + let (glean, _) = new_glean(Some(dir)); // We attempt to create two metrics: one with a 'string' type and the other // with a 'timespan' type, both being sent in the same pings and having the @@ -670,7 +670,7 @@ fn test_change_metric_type_runtime() { fn timing_distribution_truncation() { let dir = tempfile::tempdir().unwrap(); - let (glean, _t) = new_glean(Some(dir)); + let (glean, _) = new_glean(Some(dir)); let max_sample_time = 1000 * 1000 * 1000 * 60 * 10; for (unit, expected_keys) in &[ @@ -744,7 +744,7 @@ fn timing_distribution_truncation() { fn timing_distribution_truncation_accumulate() { let dir = tempfile::tempdir().unwrap(); - let (glean, _t) = new_glean(Some(dir)); + let (glean, _) = new_glean(Some(dir)); let max_sample_time = 1000 * 1000 * 1000 * 60 * 10; for &unit in &[ @@ -790,7 +790,7 @@ fn timing_distribution_truncation_accumulate() { fn test_setting_debug_view_tag() { let dir = tempfile::tempdir().unwrap(); - let (mut glean, _t) = new_glean(Some(dir)); + let (mut glean, _) = new_glean(Some(dir)); let valid_tag = "valid-tag"; assert!(glean.set_debug_view_tag(valid_tag)); @@ -805,7 +805,7 @@ fn test_setting_debug_view_tag() { fn test_setting_log_pings() { let dir = tempfile::tempdir().unwrap(); - let (mut glean, _t) = new_glean(Some(dir)); + let (mut glean, _) = new_glean(Some(dir)); assert!(!glean.log_pings()); glean.set_log_pings(true); @@ -1064,7 +1064,7 @@ fn test_activity_api() { let _ = env_logger::builder().is_test(true).try_init(); let dir = tempfile::tempdir().unwrap(); - let (mut glean, _t) = new_glean(Some(dir)); + let (mut glean, _) = new_glean(Some(dir)); // Signal that the client was active. glean.handle_client_active(); diff --git a/third_party/rust/glean-core/src/metrics/labeled.rs b/third_party/rust/glean-core/src/metrics/labeled.rs index fa3e6a6a75d8..6ff957c3c4d6 100644 --- a/third_party/rust/glean-core/src/metrics/labeled.rs +++ b/third_party/rust/glean-core/src/metrics/labeled.rs @@ -13,7 +13,7 @@ use crate::Glean; const MAX_LABELS: usize = 16; const OTHER_LABEL: &str = "__other__"; -const MAX_LABEL_LENGTH: usize = 71; +const MAX_LABEL_LENGTH: usize = 61; /// A labeled counter. pub type LabeledCounter = LabeledMetric; @@ -24,6 +24,66 @@ pub type LabeledBoolean = LabeledMetric; /// A labeled string. pub type LabeledString = LabeledMetric; +/// Checks whether the given label is sane. +/// +/// The check corresponds to the following regular expression: +/// +/// ```text +/// ^[a-z_][a-z0-9_-]{0,29}(\\.[a-z_][a-z0-9_-]{0,29})*$ +/// ``` +/// +/// We do a manul check here instead of using a regex, +/// because the regex crate adds to the binary size significantly, +/// and the Glean SDK doesn't use regular expressions anywhere else. +/// +/// Some examples of good and bad labels: +/// +/// Good: +/// * `this.is.fine` +/// * `this_is_fine_too` +/// * `this.is_still_fine` +/// * `thisisfine` +/// * `_.is_fine` +/// * `this.is-fine` +/// * `this-is-fine` +/// Bad: +/// * `this.is.not_fine_due_tu_the_length_being_too_long_i_thing.i.guess` +/// * `1.not_fine` +/// * `this.$isnotfine` +/// * `-.not_fine` +fn matches_label_regex(value: &str) -> bool { + let mut iter = value.chars(); + + loop { + // Match the first letter in the word. + match iter.next() { + Some('_') | Some('a'..='z') => (), + _ => return false, + }; + + // Match subsequent letters in the word. + let mut count = 0; + loop { + match iter.next() { + // We are done, so the whole expression is valid. + None => return true, + // Valid characters. + Some('_') | Some('-') | Some('a'..='z') | Some('0'..='9') => (), + // We ended a word, so iterate over the outer loop again. + Some('.') => break, + // An invalid character + _ => return false, + } + count += 1; + // We allow 30 characters per word, but the first one is handled + // above outside of this loop, so we have a maximum of 29 here. + if count == 29 { + return false; + } + } + } +} + /// A labeled metric. /// /// Labeled metrics allow to record multiple sub-metrics of the same type under different string labels. @@ -278,8 +338,8 @@ pub fn validate_dynamic_label( ); record_error(glean, meta, ErrorType::InvalidLabel, msg, None); true - } else if label.chars().any(|c| !c.is_ascii() || c.is_ascii_control()) { - let msg = format!("label must be printable ascii, got '{}'", label); + } else if !matches_label_regex(label) { + let msg = format!("label must be snake_case, got '{}'", label); record_error(glean, meta, ErrorType::InvalidLabel, msg, None); true } else { diff --git a/third_party/rust/glean-core/src/metrics/string.rs b/third_party/rust/glean-core/src/metrics/string.rs index 5ed7b2c7f166..7f006714d245 100644 --- a/third_party/rust/glean-core/src/metrics/string.rs +++ b/third_party/rust/glean-core/src/metrics/string.rs @@ -150,7 +150,7 @@ mod test { #[test] fn setting_a_long_string_records_an_error() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); let metric = StringMetric::new(CommonMetricData { name: "string_metric".into(), diff --git a/third_party/rust/glean-core/src/metrics/text.rs b/third_party/rust/glean-core/src/metrics/text.rs index 06ad5c0d7817..9fb90f13ad4a 100644 --- a/third_party/rust/glean-core/src/metrics/text.rs +++ b/third_party/rust/glean-core/src/metrics/text.rs @@ -154,7 +154,7 @@ mod test { #[test] fn setting_a_long_string_records_an_error() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); let metric = TextMetric::new(CommonMetricData { name: "text_metric".into(), diff --git a/third_party/rust/glean-core/src/metrics/timing_distribution.rs b/third_party/rust/glean-core/src/metrics/timing_distribution.rs index e339ef8882dd..fdab07ac814b 100644 --- a/third_party/rust/glean-core/src/metrics/timing_distribution.rs +++ b/third_party/rust/glean-core/src/metrics/timing_distribution.rs @@ -123,14 +123,6 @@ impl TimingDistributionMetric { id } - pub(crate) fn start_sync(&self) -> TimerId { - let start_time = time::precise_time_ns(); - let id = self.next_id.fetch_add(1, Ordering::SeqCst).into(); - let metric = self.clone(); - metric.set_start(id, start_time); - id - } - /// **Test-only API (exported for testing purposes).** /// /// Set start time for this metric synchronously. @@ -224,14 +216,9 @@ impl TimingDistributionMetric { return; } - // Let's be defensive here: - // The uploader tries to store some timing distribution metrics, - // but in tests that storage might be gone already. - // Let's just ignore those. - // We do the same for counters. - // This should never happen in real app usage. - if let Some(storage) = glean.storage_opt() { - storage.record_with(glean, &self.meta, |old_value| match old_value { + glean + .storage() + .record_with(glean, &self.meta, |old_value| match old_value { Some(Metric::TimingDistribution(mut hist)) => { hist.accumulate(duration); Metric::TimingDistribution(hist) @@ -242,12 +229,6 @@ impl TimingDistributionMetric { Metric::TimingDistribution(hist) } }); - } else { - log::warn!( - "Couldn't get storage. Can't record timing distribution '{}'.", - self.meta.base_identifier() - ); - } } /// Aborts a previous [`start`](Self::start) call. @@ -265,7 +246,7 @@ impl TimingDistributionMetric { } /// Aborts a previous [`start`](Self::start) call synchronously. - pub(crate) fn cancel_sync(&self, id: TimerId) { + fn cancel_sync(&self, id: TimerId) { let mut map = self.start_times.lock().expect("can't lock timings map"); map.remove(&id); } diff --git a/third_party/rust/glean-core/src/metrics/url.rs b/third_party/rust/glean-core/src/metrics/url.rs index c9eb824a3eba..332286f6280d 100644 --- a/third_party/rust/glean-core/src/metrics/url.rs +++ b/third_party/rust/glean-core/src/metrics/url.rs @@ -168,7 +168,7 @@ mod test { #[test] fn payload_is_correct() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); let metric = UrlMetric::new(CommonMetricData { name: "url_metric".into(), @@ -186,7 +186,7 @@ mod test { #[test] fn does_not_record_url_exceeding_maximum_length() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); let metric = UrlMetric::new(CommonMetricData { name: "url_metric".into(), @@ -224,7 +224,7 @@ mod test { #[test] fn does_not_record_data_urls() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); let metric = UrlMetric::new(CommonMetricData { name: "url_metric".into(), @@ -248,7 +248,7 @@ mod test { #[test] fn url_validation_works_and_records_errors() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); let metric = UrlMetric::new(CommonMetricData { name: "url_metric".into(), diff --git a/third_party/rust/glean-core/src/ping/mod.rs b/third_party/rust/glean-core/src/ping/mod.rs index 42f1ebd951bc..d16e26529341 100644 --- a/third_party/rust/glean-core/src/ping/mod.rs +++ b/third_party/rust/glean-core/src/ping/mod.rs @@ -374,7 +374,7 @@ mod test { #[test] fn sequence_numbers_should_be_reset_when_toggling_uploading() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let ping_maker = PingMaker::new(); assert_eq!(0, ping_maker.get_ping_seq(&glean, "custom")); diff --git a/third_party/rust/glean-core/src/upload/mod.rs b/third_party/rust/glean-core/src/upload/mod.rs index 3af80e9e247b..75f68d984b30 100644 --- a/third_party/rust/glean-core/src/upload/mod.rs +++ b/third_party/rust/glean-core/src/upload/mod.rs @@ -12,7 +12,6 @@ //! API to check the HTTP response from the ping upload and either delete the //! corresponding ping from disk or re-enqueue it for sending. -use std::collections::HashMap; use std::collections::VecDeque; use std::convert::TryInto; use std::path::PathBuf; @@ -22,7 +21,6 @@ use std::thread; use std::time::{Duration, Instant}; use crate::error::ErrorKind; -use crate::TimerId; use crate::{internal_metrics::UploadMetrics, Glean}; use directory::{PingDirectoryManager, PingPayloadsByDirectory}; use policy::Policy; @@ -207,8 +205,6 @@ pub struct PingUploadManager { upload_metrics: UploadMetrics, /// Policies for ping storage, uploading and requests. policy: Policy, - - in_flight: RwLock>, } impl PingUploadManager { @@ -234,7 +230,6 @@ impl PingUploadManager { language_binding_name: language_binding_name.into(), upload_metrics: UploadMetrics::new(), policy: Policy::default(), - in_flight: RwLock::new(HashMap::default()), } } @@ -365,21 +360,6 @@ impl PingUploadManager { return; } - { - let in_flight = self.in_flight.read().unwrap(); - if in_flight.contains_key(document_id) { - log::warn!( - "Attempted to enqueue an in-flight ping {} at {}.", - document_id, - path - ); - self.upload_metrics - .in_flight_pings_dropped - .add_sync(glean, 0); - return; - } - } - log::trace!("Enqueuing ping {} at {}", document_id, path); if let Some(request) = self.build_ping_request(glean, document_id, path, body, headers) { queue.push_back(request) @@ -595,16 +575,6 @@ impl PingUploadManager { } } - { - // Synchronous timer starts. - // We're in the uploader thread anyway. - // But also: No data is stored on disk. - let mut in_flight = self.in_flight.write().unwrap(); - let success_id = self.upload_metrics.send_success.start_sync(); - let failure_id = self.upload_metrics.send_failure.start_sync(); - in_flight.insert(request.document_id.clone(), (success_id, failure_id)); - } - PingUploadTask::Upload { request: queue.pop_front().unwrap(), } @@ -686,31 +656,14 @@ impl PingUploadManager { ) -> UploadTaskAction { use UploadResult::*; - let stop_time = time::precise_time_ns(); - if let Some(label) = status.get_label() { let metric = self.upload_metrics.ping_upload_failure.get(label); metric.add_sync(glean, 1); } - let send_ids = { - let mut lock = self.in_flight.write().unwrap(); - lock.remove(document_id) - }; - - if send_ids.is_none() { - self.upload_metrics.missing_send_ids.add_sync(glean, 1); - } - match status { HttpStatus { code } if (200..=299).contains(&code) => { log::info!("Ping {} successfully sent {}.", document_id, code); - if let Some((success_id, failure_id)) = send_ids { - self.upload_metrics - .send_success - .set_stop_and_accumulate(glean, success_id, stop_time); - self.upload_metrics.send_failure.cancel_sync(failure_id); - } self.directory_manager.delete_file(document_id); } @@ -720,12 +673,6 @@ impl PingUploadManager { document_id, status ); - if let Some((success_id, failure_id)) = send_ids { - self.upload_metrics.send_success.cancel_sync(success_id); - self.upload_metrics - .send_failure - .set_stop_and_accumulate(glean, failure_id, stop_time); - } self.directory_manager.delete_file(document_id); } @@ -735,12 +682,6 @@ impl PingUploadManager { document_id, status ); - if let Some((success_id, failure_id)) = send_ids { - self.upload_metrics.send_success.cancel_sync(success_id); - self.upload_metrics - .send_failure - .set_stop_and_accumulate(glean, failure_id, stop_time); - } self.enqueue_ping_from_file(glean, document_id); self.recoverable_failure_count .fetch_add(1, Ordering::SeqCst); @@ -748,10 +689,6 @@ impl PingUploadManager { Done { .. } => { log::debug!("Uploader signaled Done. Exiting."); - if let Some((success_id, failure_id)) = send_ids { - self.upload_metrics.send_success.cancel_sync(success_id); - self.upload_metrics.send_failure.cancel_sync(failure_id); - } return UploadTaskAction::End; } }; @@ -841,7 +778,7 @@ mod test { #[test] fn doesnt_error_when_there_are_no_pending_pings() { - let (glean, _t) = new_glean(None); + let (glean, _) = new_glean(None); // Try and get the next request. // Verify request was not returned @@ -948,7 +885,7 @@ mod test { #[test] fn clearing_the_queue_doesnt_clear_deletion_request_pings() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); // Register a ping for testing let ping_type = PingType::new("test", true, /* send_if_empty */ true, vec![]); @@ -1070,7 +1007,7 @@ mod test { #[test] fn processes_correctly_server_error_upload_response() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); // Register a ping for testing let ping_type = PingType::new("test", true, /* send_if_empty */ true, vec![]); @@ -1188,7 +1125,7 @@ mod test { #[test] fn adds_debug_view_header_to_requests_when_tag_is_set() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); glean.set_debug_view_tag("valid-tag"); @@ -1643,32 +1580,4 @@ mod test { _ => panic!("Expected upload manager to return a wait task!"), }; } - - #[test] - fn cannot_enqueue_ping_while_its_being_processed() { - let (glean, dir) = new_glean(None); - - let upload_manager = PingUploadManager::no_policy(dir.path()); - - // Enqueue a ping and start processing it - let identifier = &Uuid::new_v4().to_string(); - upload_manager.enqueue_ping(&glean, identifier, PATH, "", None); - assert!(upload_manager.get_upload_task(&glean, false).is_upload()); - - // Attempt to re-enqueue the same ping - upload_manager.enqueue_ping(&glean, identifier, PATH, "", None); - - // No new pings should have been enqueued so the upload task is Done. - assert_eq!( - upload_manager.get_upload_task(&glean, false), - PingUploadTask::done() - ); - - // Process the upload response - upload_manager.process_ping_upload_response( - &glean, - identifier, - UploadResult::http_status(200), - ); - } } diff --git a/third_party/rust/glean-core/tests/custom_distribution.rs b/third_party/rust/glean-core/tests/custom_distribution.rs index 43c69fb26d94..accf9710368a 100644 --- a/third_party/rust/glean-core/tests/custom_distribution.rs +++ b/third_party/rust/glean-core/tests/custom_distribution.rs @@ -52,7 +52,7 @@ mod linear { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); @@ -254,7 +254,7 @@ mod exponential { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/datetime.rs b/third_party/rust/glean-core/tests/datetime.rs index 7e7938690f3c..07a2291875bf 100644 --- a/third_party/rust/glean-core/tests/datetime.rs +++ b/third_party/rust/glean-core/tests/datetime.rs @@ -56,7 +56,7 @@ fn datetime_serializer_should_correctly_serialize_datetime() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/labeled.rs b/third_party/rust/glean-core/tests/labeled.rs index 63a7f2ccc2b6..f77cf8e6e6e1 100644 --- a/third_party/rust/glean-core/tests/labeled.rs +++ b/third_party/rust/glean-core/tests/labeled.rs @@ -231,7 +231,7 @@ fn dynamic_labels_too_long() { None, ); - let metric = labeled.get("1".repeat(72)); + let metric = labeled.get("this_string_has_more_than_thirty_characters"); metric.add_sync(&glean, 1); let snapshot = StorageManager @@ -266,7 +266,15 @@ fn dynamic_labels_regex_mismatch() { None, ); - let labels_not_validating = vec!["non-ASCII�"]; + let labels_not_validating = vec![ + "notSnakeCase", + "", + "with/slash", + "1.not_fine", + "this.$isnotfine", + "-.not_fine", + "this.is_not_fine.2", + ]; let num_non_validating = labels_not_validating.len(); for label in &labels_not_validating { @@ -386,7 +394,7 @@ fn seen_labels_get_reloaded_from_disk() { // Force a reload { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); // Try to store another label labeled.get("new_label").add_sync(&glean, 40); diff --git a/third_party/rust/glean-core/tests/memory_distribution.rs b/third_party/rust/glean-core/tests/memory_distribution.rs index 83ca84ddd5dc..68c5cb1e45c7 100644 --- a/third_party/rust/glean-core/tests/memory_distribution.rs +++ b/third_party/rust/glean-core/tests/memory_distribution.rs @@ -49,7 +49,7 @@ fn serializer_should_correctly_serialize_memory_distribution() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/ping.rs b/third_party/rust/glean-core/tests/ping.rs index 915582acc04e..17514c100ed1 100644 --- a/third_party/rust/glean-core/tests/ping.rs +++ b/third_party/rust/glean-core/tests/ping.rs @@ -34,7 +34,7 @@ fn write_ping_to_disk() { #[test] fn disabling_upload_clears_pending_pings() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let ping = PingType::new("metrics", true, false, vec![]); glean.register_ping_type(&ping); @@ -77,7 +77,7 @@ fn disabling_upload_clears_pending_pings() { #[test] fn deletion_request_only_when_toggled_from_on_to_off() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); // Disabling upload generates a deletion ping glean.set_upload_enabled(false); @@ -103,7 +103,7 @@ fn deletion_request_only_when_toggled_from_on_to_off() { #[test] fn empty_pings_with_flag_are_sent() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let ping1 = PingType::new("custom-ping1", true, true, vec![]); glean.register_ping_type(&ping1); @@ -216,7 +216,7 @@ fn test_pings_submitted_metric() { #[test] fn events_ping_with_metric_but_no_events_is_not_sent() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let events_ping = PingType::new("events", true, true, vec![]); glean.register_ping_type(&events_ping); diff --git a/third_party/rust/glean-core/tests/ping_maker.rs b/third_party/rust/glean-core/tests/ping_maker.rs index e88b23916b98..e0306eccab23 100644 --- a/third_party/rust/glean-core/tests/ping_maker.rs +++ b/third_party/rust/glean-core/tests/ping_maker.rs @@ -161,7 +161,7 @@ fn seq_number_must_be_sequential() { #[test] fn clear_pending_pings() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let ping_maker = PingMaker::new(); let ping_type = PingType::new("store1", true, false, vec![]); glean.register_ping_type(&ping_type); @@ -190,7 +190,7 @@ fn clear_pending_pings() { fn no_pings_submitted_if_upload_disabled() { // Regression test, bug 1603571 - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); let ping_type = PingType::new("store1", true, true, vec![]); glean.register_ping_type(&ping_type); @@ -207,7 +207,7 @@ fn no_pings_submitted_if_upload_disabled() { #[test] fn metadata_is_correctly_added_when_necessary() { - let (mut glean, _t) = new_glean(None); + let (mut glean, _) = new_glean(None); glean.set_debug_view_tag("valid-tag"); let ping_type = PingType::new("store1", true, true, vec![]); glean.register_ping_type(&ping_type); diff --git a/third_party/rust/glean-core/tests/quantity.rs b/third_party/rust/glean-core/tests/quantity.rs index b16c5fd99279..848c45efb4d6 100644 --- a/third_party/rust/glean-core/tests/quantity.rs +++ b/third_party/rust/glean-core/tests/quantity.rs @@ -50,7 +50,7 @@ fn quantity_serializer_should_correctly_serialize_quantities() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/string.rs b/third_party/rust/glean-core/tests/string.rs index 3ccfa8f49479..30c9be07465c 100644 --- a/third_party/rust/glean-core/tests/string.rs +++ b/third_party/rust/glean-core/tests/string.rs @@ -48,7 +48,7 @@ fn string_serializer_should_correctly_serialize_strings() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/string_list.rs b/third_party/rust/glean-core/tests/string_list.rs index 8e1589e8a93f..344894a72fce 100644 --- a/third_party/rust/glean-core/tests/string_list.rs +++ b/third_party/rust/glean-core/tests/string_list.rs @@ -63,7 +63,7 @@ fn stringlist_serializer_should_correctly_serialize_stringlists() { } { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) diff --git a/third_party/rust/glean-core/tests/text.rs b/third_party/rust/glean-core/tests/text.rs index 2592e45899ea..676121519cb4 100644 --- a/third_party/rust/glean-core/tests/text.rs +++ b/third_party/rust/glean-core/tests/text.rs @@ -45,7 +45,7 @@ fn text_serializer_should_correctly_serialize_strings() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/timespan.rs b/third_party/rust/glean-core/tests/timespan.rs index c964c450d435..d69cbe88d386 100644 --- a/third_party/rust/glean-core/tests/timespan.rs +++ b/third_party/rust/glean-core/tests/timespan.rs @@ -52,7 +52,7 @@ fn serializer_should_correctly_serialize_timespans() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/timing_distribution.rs b/third_party/rust/glean-core/tests/timing_distribution.rs index 96f7fae5af14..61831e595bba 100644 --- a/third_party/rust/glean-core/tests/timing_distribution.rs +++ b/third_party/rust/glean-core/tests/timing_distribution.rs @@ -54,7 +54,7 @@ fn serializer_should_correctly_serialize_timing_distribution() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean-core/tests/uuid.rs b/third_party/rust/glean-core/tests/uuid.rs index c9d5015a72da..6c935d52e24e 100644 --- a/third_party/rust/glean-core/tests/uuid.rs +++ b/third_party/rust/glean-core/tests/uuid.rs @@ -72,7 +72,7 @@ fn uuid_serializer_should_correctly_serialize_uuids() { // Make a new Glean instance here, which should force reloading of the data from disk // so we can ensure it persisted, because it has User lifetime { - let (glean, _t) = new_glean(Some(tempdir)); + let (glean, _) = new_glean(Some(tempdir)); let snapshot = StorageManager .snapshot_as_json(glean.storage(), "store1", true) .unwrap(); diff --git a/third_party/rust/glean/.cargo-checksum.json b/third_party/rust/glean/.cargo-checksum.json index a5584b095f16..533a4092b203 100644 --- a/third_party/rust/glean/.cargo-checksum.json +++ b/third_party/rust/glean/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"0ec3bb60b6512567be647f2ba367bda935a68abf4fedcf0dc6d38f8bc43ddb3f","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"5627cc81e6187ab6c2b4dff061af16d559edcab64ba786bac39daa69c703c595","src/common_test.rs":"de47b53dcca37985c0a2b8c02daecbf32309aa54f5a4dd9290719c2c1fd0fa55","src/configuration.rs":"4ca9be0a49a9c50f4ebe868d4bfa04fe27619c871a436911f850b4dcf6e7a7b2","src/core_metrics.rs":"dd17b482613894af08b51a2cff6dc1e84a6dbd853c14a55566e6698348941ced","src/lib.rs":"2eb1b09f2f8a649729cd27222f0889eed7b50940fc7e2bb27de54abbdac439df","src/net/http_uploader.rs":"43812a70d19a38e8d7a093c8076c2b6345372c3c861b0f3511428762700a65e0","src/net/mod.rs":"e36e170a8e53530f8705988eea694ed7c55f50bb0ce403c0facbfb75ce03ac7f","src/private/event.rs":"02bbebf545695812e5055741cc0b5f3c99eda2039e684e26fcdd5f087ed15fe3","src/private/mod.rs":"0364ecf5f0439443a5b209583f4ff2c474b79f7c253c981ab0b7cdc528368698","src/private/ping.rs":"cbdc57f41fc9d46e56b4dfff91ac683753d1f8b3ecd0aa9bc3419e3595b8b81b","src/system.rs":"6eae5b41c15eba9cad6dbd116abe3519ee3e1fe034e79bdd692b029829a8c384","src/test.rs":"d367c85a106df58272b8a779da1769664ba8a39357fd650d9f21c21855b38906","tests/common/mod.rs":"37cd4c48e140c793b852ae09fb3e812da28a4412977295015bcbffd632fcf294","tests/init_fails.rs":"28fd7726e76ca1295eb0905eca0b2ec65b0accfa28432c9ff90ec8f92616fc79","tests/never_init.rs":"1f33b8ce7ca3514b57b48cc16d98408974c85cf8aa7d13257ffc2ad878ebb295","tests/no_time_to_init.rs":"e7df75b47897fbf2c860a2e1c1c225b57598b8d1a39125ca897fe8d825bf0338","tests/overflowing_preinit.rs":"7ad4b2274dd9240b53430859a4eb1d2597cf508a5a678333f3d3abbadd2ed4a7","tests/persist_ping_lifetime.rs":"81415dc1d74743f02269f0d0dfa524003147056853f080276972e64a0b761d3c","tests/persist_ping_lifetime_nopanic.rs":"18379d3ffbf4a2c8c684c04ff7a0660b86dfbbb447db2d24dfed6073cb7ddf8f","tests/schema.rs":"ea93fcf68e00ae803031dba9b93edac0713f17e375287c32c35512ba69d5f100","tests/simple.rs":"b099034b0599bdf4650e0fa09991a8413fc5fbf397755fc06c8963d4c7c8dfa6","tests/test-shutdown-blocking.sh":"9b16a01c190c7062474dd92182298a3d9a27928c8fa990340fdd798e6cdb7ab2","tests/upload_timing.rs":"d044fce7c783133e385671ea37d674e5a1b4120cae7b07708dcd825addfa0ee3"},"package":"aa4d34f9ae46bd3e68c5bb672762e7391843daedd609506a70b6b35ac6fea051"} \ No newline at end of file +{"files":{"Cargo.toml":"4bc54950917443a58e03b3cfb7b82a5ae696823e000fef651a4e70beab427360","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"5627cc81e6187ab6c2b4dff061af16d559edcab64ba786bac39daa69c703c595","src/common_test.rs":"de47b53dcca37985c0a2b8c02daecbf32309aa54f5a4dd9290719c2c1fd0fa55","src/configuration.rs":"4ca9be0a49a9c50f4ebe868d4bfa04fe27619c871a436911f850b4dcf6e7a7b2","src/core_metrics.rs":"dd17b482613894af08b51a2cff6dc1e84a6dbd853c14a55566e6698348941ced","src/lib.rs":"51fbcce68289ff8733e85143692b811683ff3c630e8323d7a0b9701a001ad491","src/net/http_uploader.rs":"43812a70d19a38e8d7a093c8076c2b6345372c3c861b0f3511428762700a65e0","src/net/mod.rs":"e05e61860f5828caa529c3ea75a2fff7371bfa3dce057077a74c09baf41a568a","src/private/event.rs":"02bbebf545695812e5055741cc0b5f3c99eda2039e684e26fcdd5f087ed15fe3","src/private/mod.rs":"0364ecf5f0439443a5b209583f4ff2c474b79f7c253c981ab0b7cdc528368698","src/private/ping.rs":"cbdc57f41fc9d46e56b4dfff91ac683753d1f8b3ecd0aa9bc3419e3595b8b81b","src/system.rs":"6eae5b41c15eba9cad6dbd116abe3519ee3e1fe034e79bdd692b029829a8c384","src/test.rs":"d367c85a106df58272b8a779da1769664ba8a39357fd650d9f21c21855b38906","tests/common/mod.rs":"37cd4c48e140c793b852ae09fb3e812da28a4412977295015bcbffd632fcf294","tests/init_fails.rs":"28fd7726e76ca1295eb0905eca0b2ec65b0accfa28432c9ff90ec8f92616fc79","tests/never_init.rs":"1f33b8ce7ca3514b57b48cc16d98408974c85cf8aa7d13257ffc2ad878ebb295","tests/no_time_to_init.rs":"e7df75b47897fbf2c860a2e1c1c225b57598b8d1a39125ca897fe8d825bf0338","tests/overflowing_preinit.rs":"7ad4b2274dd9240b53430859a4eb1d2597cf508a5a678333f3d3abbadd2ed4a7","tests/persist_ping_lifetime.rs":"81415dc1d74743f02269f0d0dfa524003147056853f080276972e64a0b761d3c","tests/persist_ping_lifetime_nopanic.rs":"18379d3ffbf4a2c8c684c04ff7a0660b86dfbbb447db2d24dfed6073cb7ddf8f","tests/schema.rs":"030ff2b88c56f1f9a3c580277a9311ccc579f25e44f2a89f2afc09d7c4ddf054","tests/simple.rs":"b099034b0599bdf4650e0fa09991a8413fc5fbf397755fc06c8963d4c7c8dfa6"},"package":"3dea54c0198181ff3bd8c7d39bdc69f22a4c0504da5dd9138666edef084e26be"} \ No newline at end of file diff --git a/third_party/rust/glean/Cargo.toml b/third_party/rust/glean/Cargo.toml index e24ced5a30d5..9d436bb930be 100644 --- a/third_party/rust/glean/Cargo.toml +++ b/third_party/rust/glean/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.60" name = "glean" -version = "52.3.0" +version = "52.2.0" authors = [ "Jan-Erik Rediger ", "The Glean Team ", @@ -43,7 +43,7 @@ features = ["serde"] version = "0.5" [dependencies.glean-core] -version = "52.3.0" +version = "52.2.0" [dependencies.inherent] version = "1" @@ -75,9 +75,10 @@ features = ["v4"] version = "0.3.0" [dev-dependencies.env_logger] -version = "0.10.0" +version = "0.9.0" features = [ - "auto-color", + "termcolor", + "atty", "humantime", ] default-features = false diff --git a/third_party/rust/glean/src/lib.rs b/third_party/rust/glean/src/lib.rs index dac7467ab28b..100f78105b62 100644 --- a/third_party/rust/glean/src/lib.rs +++ b/third_party/rust/glean/src/lib.rs @@ -70,7 +70,7 @@ struct GleanEvents { } impl glean_core::OnGleanEvents for GleanEvents { - fn initialize_finished(&self) { + fn on_initialize_finished(&self) { // intentionally left empty } @@ -89,11 +89,6 @@ impl glean_core::OnGleanEvents for GleanEvents { // intentionally left empty Ok(()) } - - fn shutdown(&self) -> Result<(), glean_core::CallbackError> { - self.upload_manager.shutdown(); - Ok(()) - } } fn initialize_internal(cfg: Configuration, client_info: ClientInfoMetrics) -> Option<()> { diff --git a/third_party/rust/glean/src/net/mod.rs b/third_party/rust/glean/src/net/mod.rs index cc1e14f3d63a..184c995f642e 100644 --- a/third_party/rust/glean/src/net/mod.rs +++ b/third_party/rust/glean/src/net/mod.rs @@ -7,15 +7,17 @@ //! This doesn't perform the actual upload but rather handles //! retries, upload limitations and error tracking. -use std::sync::{atomic::Ordering, Arc, Mutex}; -use std::thread::{self, JoinHandle}; +use std::sync::{ + atomic::{AtomicBool, Ordering}, + Arc, +}; +use std::thread; use std::time::Duration; use glean_core::upload::PingUploadTask; pub use glean_core::upload::{PingRequest, UploadResult, UploadTaskAction}; pub use http_uploader::*; -use thread_state::{AtomicState, State}; mod http_uploader; @@ -43,8 +45,7 @@ pub(crate) struct UploadManager { struct Inner { server_endpoint: String, uploader: Box, - thread_running: AtomicState, - handle: Mutex>>, + thread_running: AtomicBool, } impl UploadManager { @@ -62,8 +63,7 @@ impl UploadManager { inner: Arc::new(Inner { server_endpoint, uploader: new_uploader, - thread_running: AtomicState::new(State::Stopped), - handle: Mutex::new(None), + thread_running: AtomicBool::new(false), }), } } @@ -76,12 +76,7 @@ impl UploadManager { if self .inner .thread_running - .compare_exchange( - State::Stopped, - State::Running, - Ordering::SeqCst, - Ordering::SeqCst, - ) + .compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst) .is_err() { return; @@ -89,9 +84,7 @@ impl UploadManager { let inner = Arc::clone(&self.inner); - // Need to lock before we start so that noone thinks we're not running. - let mut handle = self.inner.handle.lock().unwrap(); - let thread = thread::Builder::new() + thread::Builder::new() .name("glean.upload".into()) .spawn(move || { log::trace!("Started glean.upload thread"); @@ -108,15 +101,9 @@ impl UploadManager { let result = inner.uploader.upload(upload_url, request.body, headers); // Process the upload response. match glean_core::glean_process_ping_upload_response(doc_id, result) { - UploadTaskAction::Next => (), + UploadTaskAction::Next => continue, UploadTaskAction::End => break, } - - let status = inner.thread_running.load(Ordering::SeqCst); - // asked to shut down. let's do it. - if status == State::ShuttingDown { - break; - } } PingUploadTask::Wait { time } => { log::trace!("Instructed to wait for {:?}ms", time); @@ -130,92 +117,9 @@ impl UploadManager { } } - // Clear the running flag to signal that this thread is done, - // but only if there's no shutdown thread. - let _ = inner.thread_running.compare_exchange( - State::Running, - State::Stopped, - Ordering::SeqCst, - Ordering::SeqCst, - ); + // Clear the running flag to signal that this thread is done. + inner.thread_running.store(false, Ordering::SeqCst); }) .expect("Failed to spawn Glean's uploader thread"); - *handle = Some(thread); - } - - pub(crate) fn shutdown(&self) { - // mark as shutting down. - self.inner - .thread_running - .store(State::ShuttingDown, Ordering::SeqCst); - - // take the thread handle out. - let mut handle = self.inner.handle.lock().unwrap(); - let thread = handle.take(); - - if let Some(thread) = thread { - thread - .join() - .expect("couldn't join on the uploader thread."); - } - } -} - -mod thread_state { - use std::sync::atomic::{AtomicU8, Ordering}; - - #[derive(Debug, PartialEq)] - #[repr(u8)] - pub enum State { - Stopped = 0, - Running = 1, - ShuttingDown = 2, - } - - #[derive(Debug)] - pub struct AtomicState(AtomicU8); - - impl AtomicState { - const fn to_u8(val: State) -> u8 { - val as u8 - } - - fn from_u8(val: u8) -> State { - #![allow(non_upper_case_globals)] - const U8_Stopped: u8 = State::Stopped as u8; - const U8_Running: u8 = State::Running as u8; - const U8_ShuttingDown: u8 = State::ShuttingDown as u8; - match val { - U8_Stopped => State::Stopped, - U8_Running => State::Running, - U8_ShuttingDown => State::ShuttingDown, - _ => panic!("Invalid enum discriminant"), - } - } - - pub const fn new(v: State) -> AtomicState { - AtomicState(AtomicU8::new(Self::to_u8(v))) - } - - pub fn load(&self, order: Ordering) -> State { - Self::from_u8(self.0.load(order)) - } - - pub fn store(&self, val: State, order: Ordering) { - self.0.store(Self::to_u8(val), order) - } - - pub fn compare_exchange( - &self, - current: State, - new: State, - success: Ordering, - failure: Ordering, - ) -> Result { - self.0 - .compare_exchange(Self::to_u8(current), Self::to_u8(new), success, failure) - .map(Self::from_u8) - .map_err(Self::from_u8) - } } } diff --git a/third_party/rust/glean/tests/schema.rs b/third_party/rust/glean/tests/schema.rs index 2bd4511b330f..a3bb592a7961 100644 --- a/third_party/rust/glean/tests/schema.rs +++ b/third_party/rust/glean/tests/schema.rs @@ -13,8 +13,8 @@ use serde_json::Value; use glean::net::UploadResult; use glean::private::*; use glean::{ - traits, ClientInfoMetrics, CommonMetricData, ConfigurationBuilder, HistogramType, MemoryUnit, - TimeUnit, + traits, ClientInfoMetrics, CommonMetricData, Configuration, ConfigurationBuilder, + HistogramType, MemoryUnit, TimeUnit, }; const SCHEMA_JSON: &str = include_str!("../../../glean.1.schema.json"); @@ -45,10 +45,32 @@ impl traits::ExtraKeys for SomeExtras { } } +// Create a new instance of Glean with a temporary directory. +// We need to keep the `TempDir` alive, so that it's not deleted before we stop using it. +fn new_glean(configuration: Option) -> tempfile::TempDir { + let dir = tempfile::tempdir().unwrap(); + let tmpname = dir.path().to_path_buf(); + + let cfg = match configuration { + Some(c) => c, + None => ConfigurationBuilder::new(true, tmpname, GLOBAL_APPLICATION_ID) + .with_server_endpoint("invalid-test-host") + .build(), + }; + + let client_info = ClientInfoMetrics { + app_build: env!("CARGO_PKG_VERSION").to_string(), + app_display_version: env!("CARGO_PKG_VERSION").to_string(), + channel: Some("testing".to_string()), + }; + + glean::initialize(cfg, client_info); + + dir +} + #[test] fn validate_against_schema() { - let _ = env_logger::builder().try_init(); - let schema = load_schema(); let (s, r) = crossbeam_channel::bounded::>(1); @@ -79,14 +101,7 @@ fn validate_against_schema() { .with_server_endpoint("invalid-test-host") .with_uploader(ValidatingUploader { sender: s }) .build(); - - let client_info = ClientInfoMetrics { - app_build: env!("CARGO_PKG_VERSION").to_string(), - app_display_version: env!("CARGO_PKG_VERSION").to_string(), - channel: Some("testing".to_string()), - }; - - glean::initialize(cfg, client_info); + let _ = new_glean(Some(cfg)); const PING_NAME: &str = "test-ping"; diff --git a/third_party/rust/glean/tests/test-shutdown-blocking.sh b/third_party/rust/glean/tests/test-shutdown-blocking.sh deleted file mode 100755 index 2f5d82acf0b5..000000000000 --- a/third_party/rust/glean/tests/test-shutdown-blocking.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Test harness for testing the RLB processes from the outside. -# -# Some behavior can only be observed when properly exiting the process running Glean, -# e.g. when an uploader runs in another thread. -# On exit the threads will be killed, regardless of their state. - -# Remove the temporary data path on all exit conditions -cleanup() { - if [ -n "$datapath" ]; then - rm -r "$datapath" - fi -} -trap cleanup INT ABRT TERM EXIT - -tmp="${TMPDIR:-/tmp}" -datapath=$(mktemp -d "${tmp}/glean_long_running.XXXX") - -cargo run --example long-running -- "$datapath" -count=$(ls -1q "$datapath/pending_pings" | wc -l) - -if [[ "$count" -eq 0 ]]; then - echo "test result: ok." - exit 0 -else - echo "test result: FAILED." - exit 101 -fi diff --git a/third_party/rust/glean/tests/upload_timing.rs b/third_party/rust/glean/tests/upload_timing.rs deleted file mode 100644 index 1dd073bebb33..000000000000 --- a/third_party/rust/glean/tests/upload_timing.rs +++ /dev/null @@ -1,225 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -//! This integration test should model how the RLB is used when embedded in another Rust application -//! (e.g. FOG/Firefox Desktop). -//! -//! We write a single test scenario per file to avoid any state keeping across runs -//! (different files run as different processes). - -mod common; - -use std::io::Read; -use std::sync::atomic::{AtomicUsize, Ordering}; -use std::thread; -use std::time; - -use crossbeam_channel::{bounded, Sender}; -use flate2::read::GzDecoder; -use serde_json::Value as JsonValue; - -use glean::net; -use glean::ConfigurationBuilder; - -pub mod metrics { - #![allow(non_upper_case_globals)] - - use glean::{ - private::BooleanMetric, private::TimingDistributionMetric, CommonMetricData, Lifetime, - TimeUnit, - }; - - pub static sample_boolean: once_cell::sync::Lazy = - once_cell::sync::Lazy::new(|| { - BooleanMetric::new(CommonMetricData { - name: "sample_boolean".into(), - category: "test.metrics".into(), - send_in_pings: vec!["validation".into()], - disabled: false, - lifetime: Lifetime::Ping, - ..Default::default() - }) - }); - - // The following are duplicated from `glean-core/src/internal_metrics.rs` - // so we can use the test APIs to query them. - - pub static send_success: once_cell::sync::Lazy = - once_cell::sync::Lazy::new(|| { - TimingDistributionMetric::new( - CommonMetricData { - name: "send_success".into(), - category: "glean.upload".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }, - TimeUnit::Millisecond, - ) - }); - - pub static send_failure: once_cell::sync::Lazy = - once_cell::sync::Lazy::new(|| { - TimingDistributionMetric::new( - CommonMetricData { - name: "send_failure".into(), - category: "glean.upload".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }, - TimeUnit::Millisecond, - ) - }); - - pub static shutdown_wait: once_cell::sync::Lazy = - once_cell::sync::Lazy::new(|| { - TimingDistributionMetric::new( - CommonMetricData { - name: "shutdown_wait".into(), - category: "glean.validation".into(), - send_in_pings: vec!["metrics".into()], - lifetime: Lifetime::Ping, - disabled: false, - dynamic_label: None, - }, - TimeUnit::Millisecond, - ) - }); -} - -mod pings { - use glean::private::PingType; - use once_cell::sync::Lazy; - - #[allow(non_upper_case_globals)] - pub static validation: Lazy = - Lazy::new(|| glean::private::PingType::new("validation", true, true, vec![])); -} - -// Define a fake uploader that sleeps. -#[derive(Debug)] -struct FakeUploader { - calls: AtomicUsize, - sender: Sender, -} - -impl net::PingUploader for FakeUploader { - fn upload( - &self, - _url: String, - body: Vec, - _headers: Vec<(String, String)>, - ) -> net::UploadResult { - let calls = self.calls.fetch_add(1, Ordering::SeqCst); - let decode = |body: Vec| { - let mut gzip_decoder = GzDecoder::new(&body[..]); - let mut s = String::with_capacity(body.len()); - - gzip_decoder - .read_to_string(&mut s) - .ok() - .map(|_| &s[..]) - .or_else(|| std::str::from_utf8(&body).ok()) - .and_then(|payload| serde_json::from_str(payload).ok()) - .unwrap() - }; - - match calls { - // First goes through as is. - 0 => net::UploadResult::http_status(200), - // Second briefly sleeps - 1 => { - thread::sleep(time::Duration::from_millis(100)); - net::UploadResult::http_status(200) - } - // Third one fails - 2 => net::UploadResult::http_status(404), - // Fourth one fast again - 3 => { - self.sender.send(decode(body)).unwrap(); - net::UploadResult::http_status(200) - } - // Last one is the metrics ping, a-ok. - _ => { - self.sender.send(decode(body)).unwrap(); - net::UploadResult::http_status(200) - } - } - } -} - -/// Test scenario: Different timings for upload on success and failure. -/// -/// The app is initialized, in turn Glean gets initialized without problems. -/// A custom ping is submitted multiple times to trigger upload. -/// A metrics ping is submitted to get the upload timing data. -/// -/// And later the whole process is shutdown. -#[test] -fn upload_timings() { - common::enable_test_logging(); - - // Create a custom configuration to use a validating uploader. - let dir = tempfile::tempdir().unwrap(); - let tmpname = dir.path().to_path_buf(); - let (tx, rx) = bounded(1); - - let cfg = ConfigurationBuilder::new(true, tmpname.clone(), "glean-upload-timing") - .with_server_endpoint("invalid-test-host") - .with_use_core_mps(false) - .with_uploader(FakeUploader { - calls: AtomicUsize::new(0), - sender: tx, - }) - .build(); - common::initialize(cfg); - - // Wait for init to finish, - // otherwise we might be to quick with calling `shutdown`. - let _ = metrics::sample_boolean.test_get_value(None); - - // fast - pings::validation.submit(None); - // slow - pings::validation.submit(None); - // failed - pings::validation.submit(None); - // fast - pings::validation.submit(None); - - // wait for the last ping - let _body = rx.recv().unwrap(); - - assert_eq!( - 3, - metrics::send_success.test_get_value(None).unwrap().count, - "Successful pings: two fast, one slow" - ); - assert_eq!( - 1, - metrics::send_failure.test_get_value(None).unwrap().count, - "One failed ping" - ); - - // This is awkward, but it's what gets us very close to just starting a new process with a - // fresh Glean. - // This also calls `glean::shutdown();` internally, waiting on the uploader. - let data_path = Some(tmpname.display().to_string()); - glean_core::glean_test_destroy_glean(false, data_path); - - let cfg = ConfigurationBuilder::new(true, tmpname, "glean-upload-timing") - .with_server_endpoint("invalid-test-host") - .with_use_core_mps(false) - .build(); - common::initialize(cfg); - - assert_eq!( - 1, - metrics::shutdown_wait.test_get_value(None).unwrap().count, - "Measured time waiting for shutdown exactly once" - ); -} diff --git a/toolkit/components/glean/Cargo.toml b/toolkit/components/glean/Cargo.toml index 0bb22d5dc78a..cfebde4177d7 100644 --- a/toolkit/components/glean/Cargo.toml +++ b/toolkit/components/glean/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "MPL-2.0" [dependencies] -glean = "52.3.0" +glean = "52.2.0" log = "0.4" nserror = { path = "../../../xpcom/rust/nserror" } nsstring = { path = "../../../xpcom/rust/nsstring" } diff --git a/toolkit/components/glean/api/Cargo.toml b/toolkit/components/glean/api/Cargo.toml index 1df28c23a192..2abf73b7604e 100644 --- a/toolkit/components/glean/api/Cargo.toml +++ b/toolkit/components/glean/api/Cargo.toml @@ -9,7 +9,7 @@ license = "MPL-2.0" [dependencies] bincode = "1.0" chrono = "0.4.10" -glean = "52.3.0" +glean = "52.2.0" inherent = "1.0.0" log = "0.4" nsstring = { path = "../../../../xpcom/rust/nsstring", optional = true } diff --git a/toolkit/components/glean/api/src/private/labeled.rs b/toolkit/components/glean/api/src/private/labeled.rs index a1313aa4678d..7fc43301bff0 100644 --- a/toolkit/components/glean/api/src/private/labeled.rs +++ b/toolkit/components/glean/api/src/private/labeled.rs @@ -307,7 +307,9 @@ mod test { None, ); - metric.get(&"1".repeat(72)).set(true); + metric + .get("this_string_has_more_than_thirty_characters") + .set(true); assert_eq!( 1, diff --git a/toolkit/components/glean/tests/browser/browser_labeled_gifft.js b/toolkit/components/glean/tests/browser/browser_labeled_gifft.js index 858e28419fb3..2203424e82fc 100644 --- a/toolkit/components/glean/tests/browser/browser_labeled_gifft.js +++ b/toolkit/components/glean/tests/browser/browser_labeled_gifft.js @@ -26,7 +26,7 @@ add_task(async () => { undefined, Glean.testOnlyIpc.aLabeledCounter.__other__.testGetValue() ); - Glean.testOnlyIpc.aLabeledCounter["1".repeat(72)].add(3); + Glean.testOnlyIpc.aLabeledCounter.InvalidLabel.add(3); Assert.throws( () => Glean.testOnlyIpc.aLabeledCounter.__other__.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, @@ -40,7 +40,7 @@ add_task(async () => { { a_label: 1, another_label: 2, - ["1".repeat(72)]: 3, + InvalidLabel: 3, }, value ); diff --git a/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js b/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js index bac716e76492..73a9da9be2bd 100644 --- a/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js +++ b/toolkit/components/glean/tests/xpcshell/test_GIFFTIPC.js @@ -101,7 +101,7 @@ add_task({ skip_if: () => runningInParent }, async function run_child_stuff() { // Has to be different from aLabeledCounter so the error we record doesn't // get in the way. - Glean.testOnlyIpc.anotherLabeledCounter["1".repeat(72)].add(INVALID_COUNTERS); + Glean.testOnlyIpc.anotherLabeledCounter.InvalidLabel.add(INVALID_COUNTERS); Glean.testOnlyIpc.irate.addToNumerator(IRATE_NUMERATOR); Glean.testOnlyIpc.irate.addToDenominator(IRATE_DENOMINATOR); @@ -221,7 +221,7 @@ add_task( ); Assert.deepEqual( { - ["1".repeat(72)]: INVALID_COUNTERS, + InvalidLabel: INVALID_COUNTERS, }, value ); diff --git a/toolkit/components/glean/tests/xpcshell/test_Glean.js b/toolkit/components/glean/tests/xpcshell/test_Glean.js index d30f5be5fee4..cfab9d77ff85 100644 --- a/toolkit/components/glean/tests/xpcshell/test_Glean.js +++ b/toolkit/components/glean/tests/xpcshell/test_Glean.js @@ -268,19 +268,18 @@ add_task(async function test_fog_labels_conform() { Glean.testOnly.mabelsLabelMaker["dot.separated"].testGetValue() ); Glean.testOnly.mabelsLabelMaker.camelCase.set("wednesday"); - Assert.equal( - "wednesday", - Glean.testOnly.mabelsLabelMaker.camelCase.testGetValue() - ); - const veryLong = "1".repeat(72); - Glean.testOnly.mabelsLabelMaker[veryLong].set("seventy-two"); Assert.throws( - () => Glean.testOnly.mabelsLabelMaker[veryLong].testGetValue(), + () => Glean.testOnly.mabelsLabelMaker.camelCase.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, "Should throw because of an invalid label." ); - // This test should _now_ throw because we are calling data after an invalid - // label has been set. + Assert.throws( + () => Glean.testOnly.mabelsLabelMaker.__other__.testGetValue(), + /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, + "Should throw because of an invalid label." + ); + // This test _should_ throw because we are calling data after an invalid label + // has been set. Assert.throws( () => Glean.testOnly.mabelsLabelMaker["dot.separated"].testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, @@ -309,7 +308,7 @@ add_task(async function test_fog_labeled_boolean_works() { undefined, Glean.testOnly.mabelsLikeBalloons.__other__.testGetValue() ); - Glean.testOnly.mabelsLikeBalloons["1".repeat(72)].set(true); + Glean.testOnly.mabelsLikeBalloons.InvalidLabel.set(true); Assert.throws( () => Glean.testOnly.mabelsLikeBalloons.__other__.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, @@ -338,7 +337,7 @@ add_task(async function test_fog_labeled_counter_works() { undefined, Glean.testOnly.mabelsKitchenCounters.__other__.testGetValue() ); - Glean.testOnly.mabelsKitchenCounters["1".repeat(72)].add(1); + Glean.testOnly.mabelsKitchenCounters.InvalidLabel.add(1); Assert.throws( () => Glean.testOnly.mabelsKitchenCounters.__other__.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, @@ -367,7 +366,7 @@ add_task(async function test_fog_labeled_string_works() { undefined, Glean.testOnly.mabelsBalloonStrings.__other__.testGetValue() ); - Glean.testOnly.mabelsBalloonStrings["1".repeat(72)].set("valid"); + Glean.testOnly.mabelsBalloonStrings.InvalidLabel.set("valid"); Assert.throws( () => Glean.testOnly.mabelsBalloonStrings.__other__.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/ diff --git a/toolkit/components/glean/tests/xpcshell/test_GleanIPC.js b/toolkit/components/glean/tests/xpcshell/test_GleanIPC.js index 95d14cfa2744..182a58484129 100644 --- a/toolkit/components/glean/tests/xpcshell/test_GleanIPC.js +++ b/toolkit/components/glean/tests/xpcshell/test_GleanIPC.js @@ -71,7 +71,7 @@ add_task({ skip_if: () => runningInParent }, async function run_child_stuff() { COUNTERS_WITH_JUNK_ON_THEM ); - Glean.testOnly.mabelsBathroomCounters["1".repeat(72)].add(INVALID_COUNTERS); + Glean.testOnly.mabelsBathroomCounters.InvalidLabel.add(INVALID_COUNTERS); Glean.testOnlyIpc.irate.addToNumerator(44); Glean.testOnlyIpc.irate.addToDenominator(14); diff --git a/toolkit/components/glean/tests/xpcshell/test_JOG.js b/toolkit/components/glean/tests/xpcshell/test_JOG.js index a8ecb9d73c84..c18ce8cb74fd 100644 --- a/toolkit/components/glean/tests/xpcshell/test_JOG.js +++ b/toolkit/components/glean/tests/xpcshell/test_JOG.js @@ -381,9 +381,7 @@ add_task(async function test_jog_labeled_boolean_works() { Assert.equal(false, Glean.jogCat.jogLabeledBool.label_2.testGetValue()); // What about invalid/__other__? Assert.equal(undefined, Glean.jogCat.jogLabeledBool.__other__.testGetValue()); - Glean.jogCat.jogLabeledBool.NowValidLabel.set(true); - Assert.ok(Glean.jogCat.jogLabeledBool.NowValidLabel.testGetValue()); - Glean.jogCat.jogLabeledBool["1".repeat(72)].set(true); + Glean.jogCat.jogLabeledBool.InvalidLabel.set(true); Assert.throws( () => Glean.jogCat.jogLabeledBool.__other__.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, @@ -452,7 +450,7 @@ add_task(async function test_jog_labeled_counter_works() { undefined, Glean.jogCat.jogLabeledCounter.__other__.testGetValue() ); - Glean.jogCat.jogLabeledCounter["1".repeat(72)].add(1); + Glean.jogCat.jogLabeledCounter.InvalidLabel.add(1); Assert.throws( () => Glean.jogCat.jogLabeledCounter.__other__.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/, @@ -490,7 +488,7 @@ add_task(async function test_jog_labeled_counter_with_static_labels_works() { undefined, Glean.jogCat.jogLabeledCounterWithLabels.__other__.testGetValue() ); - Glean.jogCat.jogLabeledCounterWithLabels["1".repeat(72)].add(1); + Glean.jogCat.jogLabeledCounterWithLabels.InvalidLabel.add(1); // TODO:(bug 1766515) - This should throw. /*Assert.throws( () => Glean.jogCat.jogLabeledCounterWithLabels.__other__.testGetValue(), @@ -526,7 +524,7 @@ add_task(async function test_jog_labeled_string_works() { undefined, Glean.jogCat.jogLabeledString.__other__.testGetValue() ); - Glean.jogCat.jogLabeledString["1".repeat(72)].set("valid"); + Glean.jogCat.jogLabeledString.InvalidLabel.set("valid"); Assert.throws( () => Glean.jogCat.jogLabeledString.__other__.testGetValue(), /NS_ERROR_LOSS_OF_SIGNIFICANT_DATA/ @@ -563,7 +561,7 @@ add_task(async function test_jog_labeled_string_with_labels_works() { undefined, Glean.jogCat.jogLabeledStringWithLabels.__other__.testGetValue() ); - Glean.jogCat.jogLabeledStringWithLabels["1".repeat(72)].set("valid"); + Glean.jogCat.jogLabeledStringWithLabels.InvalidLabel.set("valid"); // TODO:(bug 1766515) - This should throw. /*Assert.throws( () => Glean.jogCat.jogLabeledStringWithLabels.__other__.testGetValue(), diff --git a/toolkit/components/glean/tests/xpcshell/test_JOGIPC.js b/toolkit/components/glean/tests/xpcshell/test_JOGIPC.js index 45ab9026fa6b..2df5a934ba6a 100644 --- a/toolkit/components/glean/tests/xpcshell/test_JOGIPC.js +++ b/toolkit/components/glean/tests/xpcshell/test_JOGIPC.js @@ -154,12 +154,12 @@ add_task({ skip_if: () => runningInParent }, async function run_child_stuff() { Glean.jogIpc.jogLabeledCounter.label_1.add(COUNTERS_1); Glean.jogIpc.jogLabeledCounter.label_2.add(COUNTERS_2); - Glean.jogIpc.jogLabeledCounterErr["1".repeat(72)].add(INVALID_COUNTERS); + Glean.jogIpc.jogLabeledCounterErr.InvalidLabel.add(INVALID_COUNTERS); Glean.jogIpc.jogLabeledCounterWithLabels.label_1.add(COUNTERS_1); Glean.jogIpc.jogLabeledCounterWithLabels.label_2.add(COUNTERS_2); - Glean.jogIpc.jogLabeledCounterWithLabelsErr["1".repeat(72)].add( + Glean.jogIpc.jogLabeledCounterWithLabelsErr.InvalidLabel.add( INVALID_COUNTERS );