From 980da84e7fe4edfe08c7048510d1069a64c779e1 Mon Sep 17 00:00:00 2001 From: Alexander Koz Date: Mon, 10 Jun 2024 20:52:05 +0400 Subject: [PATCH] update cargo and other deps --- Cargo.lock | 203 ++++++++++++++++++----------------- cargo/Cargo.toml | 6 +- cargo/src/assets/mod.rs | 18 ++-- cargo/src/build/mod.rs | 12 +-- cargo/src/build/rustflags.rs | 4 +- cargo/src/cli/mod.rs | 8 +- cargo/src/layout/mod.rs | 2 +- cargo/src/main.rs | 4 +- cargo/src/package/mod.rs | 2 +- cargo/src/proc/logging.rs | 8 +- cargo/src/proc/utils.rs | 6 +- cargo/src/utils/logging.rs | 4 +- cargo/src/utils/mod.rs | 2 +- cargo/src/utils/workspace.rs | 6 +- support/addr2line/Cargo.toml | 4 +- 15 files changed, 151 insertions(+), 138 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac06f807..844d1fd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,12 +49,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - [[package]] name = "annotate-snippets" version = "0.10.2" @@ -600,9 +594,9 @@ dependencies = [ [[package]] name = "cargo" -version = "0.78.1" +version = "0.79.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6305e39d08315644d79a5ae09a0745dfb3a43b5b5e318e55dbda3f12031c5dc" +checksum = "e89822dd6c8eb196a1c5e73ebc063ba8bcbb7970ed8d7933d8431923adeca295" dependencies = [ "annotate-snippets", "anstream", @@ -658,13 +652,15 @@ dependencies = [ "serde_json", "sha1", "shell-escape", - "supports-hyperlinks 2.1.0", + "supports-hyperlinks", + "supports-unicode 2.1.0", "tar", "tempfile", "time", "toml", - "toml_edit 0.21.1", + "toml_edit 0.22.14", "tracing", + "tracing-chrome", "tracing-subscriber", "unicase", "unicode-width", @@ -730,7 +726,7 @@ dependencies = [ [[package]] name = "cargo-playdate" -version = "0.5.0-beta.2" +version = "0.5.0-beta.3" dependencies = [ "anstyle", "anyhow", @@ -790,9 +786,9 @@ dependencies = [ [[package]] name = "cargo-util-schemas" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63d2780ac94487eb9f1fea7b0d56300abc9eb488800854ca217f102f5caccca" +checksum = "475c285966a396a948f69b4947390a16d454de19d0801df374c7618622c6e8fc" dependencies = [ "semver", "serde", @@ -1808,9 +1804,9 @@ dependencies = [ [[package]] name = "gix" -version = "0.57.1" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd025382892c7b500a9ce1582cd803f9c2ebfe44aff52e9c7f86feee7ced75e" +checksum = "31887c304d9a935f3e5494fb5d6a0106c34e965168ec0db9b457424eedd0c741" dependencies = [ "gix-actor", "gix-attributes", @@ -1858,14 +1854,13 @@ dependencies = [ "prodash", "smallvec", "thiserror", - "unicode-normalization", ] [[package]] name = "gix-actor" -version = "0.29.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da27b5ab4ab5c75ff891dccd48409f8cc53c28a79480f1efdd33184b2dc1d958" +checksum = "0a7bb9fad6125c81372987c06469601d37e1a2d421511adb69971b9083517a8a" dependencies = [ "bstr", "btoi", @@ -1877,9 +1872,9 @@ dependencies = [ [[package]] name = "gix-attributes" -version = "0.21.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6de7603d6bcefcf9a1d87779c4812b14665f71bc870df7ce9ca4c4b309de18" +checksum = "eefb48f42eac136a4a0023f49a54ec31be1c7a9589ed762c45dcb9b953f7ecc8" dependencies = [ "bstr", "gix-glob", @@ -1924,9 +1919,9 @@ dependencies = [ [[package]] name = "gix-commitgraph" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8dcbf434951fa477063e05fea59722615af70dc2567377e58c2f7853b010fc" +checksum = "f7b102311085da4af18823413b5176d7c500fb2272eaf391cfa8635d8bcb12c4" dependencies = [ "bstr", "gix-chunk", @@ -1938,9 +1933,9 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.33.1" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367304855b369cadcac4ee5fb5a3a20da9378dd7905106141070b79f85241079" +checksum = "e62bf2073b6ce3921ffa6d8326f645f30eec5fc4a8e8a4bc0fcb721a2f3f69dc" dependencies = [ "bstr", "gix-config-value", @@ -1972,9 +1967,9 @@ dependencies = [ [[package]] name = "gix-credentials" -version = "0.23.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380cf3a7c31763743ae6403ec473281d54bfa05628331d09518a350ad5a0971f" +checksum = "5c70146183bd3c7119329a3c7392d1aa0e0adbe48d727f4df31828fe6d8fdaa1" dependencies = [ "bstr", "gix-command", @@ -2001,9 +1996,9 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.39.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6a0454f8c42d686f17e7f084057c717c082b7dbb8209729e4e8f26749eb93a" +checksum = "cbdcb5e49c4b9729dd1c361040ae5c3cd7c497b2260b18c954f62db3a63e98cf" dependencies = [ "bstr", "gix-hash", @@ -2013,12 +2008,13 @@ dependencies = [ [[package]] name = "gix-discover" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d7b2896edc3d899d28a646ccc6df729827a6600e546570b2783466404a42d6" +checksum = "b4669218f3ec0cbbf8f16857b32200890f8ca585f36f5817242e4115fe4551af" dependencies = [ "bstr", "dunce", + "gix-fs", "gix-hash", "gix-path", "gix-ref", @@ -2028,9 +2024,9 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.37.2" +version = "0.38.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50270e8dcc665f30ba0735b17984b9535bdf1e646c76e638e007846164d57af" +checksum = "ac7045ac9fe5f9c727f38799d002a7ed3583cd777e3322a7c4b43e3cf437dc69" dependencies = [ "bytes", "crc32fast", @@ -2038,6 +2034,7 @@ dependencies = [ "flate2", "gix-hash", "gix-trace", + "gix-utils", "libc", "once_cell", "parking_lot 0.12.3", @@ -2049,9 +2046,9 @@ dependencies = [ [[package]] name = "gix-filter" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f598c1d688bf9d57f428ed7ee70c3e786d6f0cc7ed1aeb3c982135af41f6e516" +checksum = "9240862840fb740d209422937195e129e4ed3da49af212383260134bea8f6c1a" dependencies = [ "bstr", "encoding_rs", @@ -2070,18 +2067,19 @@ dependencies = [ [[package]] name = "gix-fs" -version = "0.9.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7555c23a005537434bbfcb8939694e18cad42602961d0de617f8477cc2adecdd" +checksum = "e2184c40e7910529677831c8b481acf788ffd92427ed21fad65b6aa637e631b8" dependencies = [ "gix-features", + "gix-utils", ] [[package]] name = "gix-glob" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6232f18b262770e343dcdd461c0011c9b9ae27f0c805e115012aa2b902c1b8" +checksum = "c2a29ad0990cf02c48a7aac76ed0dbddeb5a0d070034b83675cc3bbf937eace4" dependencies = [ "bitflags 2.5.0", "bstr", @@ -2112,21 +2110,22 @@ dependencies = [ [[package]] name = "gix-ignore" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f356ce440c60aedb7e72f3447f352f9c5e64352135c8cf33e838f49760fd2643" +checksum = "640dbeb4f5829f9fc14d31f654a34a0350e43a24e32d551ad130d99bf01f63f1" dependencies = [ "bstr", "gix-glob", "gix-path", + "gix-trace", "unicode-bom", ] [[package]] name = "gix-index" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e50e63df6c8d4137f7fb882f27643b3a9756c468a1a2cdbe1ce443010ca8778" +checksum = "1d7152181ba8f0a3addc5075dd612cea31fc3e252b29c8be8c45f4892bf87426" dependencies = [ "bitflags 2.5.0", "bstr", @@ -2149,9 +2148,9 @@ dependencies = [ [[package]] name = "gix-lock" -version = "12.0.1" +version = "13.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40a439397f1e230b54cf85d52af87e5ea44cc1e7748379785d3f6d03d802b00" +checksum = "e7c359f81f01b8352063319bcb39789b7ea0887b406406381106e38c4a34d049" dependencies = [ "gix-tempfile", "gix-utils", @@ -2171,9 +2170,9 @@ dependencies = [ [[package]] name = "gix-negotiate" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6820bb5e9e259f6ad052826037452ca023d4f248c5d710dce067d89685dd582" +checksum = "a163adb84149e522e991cbe27250a6e01de56f98cd05b174614ce3f8a4e8b140" dependencies = [ "bitflags 2.5.0", "gix-commitgraph", @@ -2187,9 +2186,9 @@ dependencies = [ [[package]] name = "gix-object" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c89402e8faa41b49fde348665a8f38589e461036475af43b6b70615a6a313a2" +checksum = "693ce9d30741506cb082ef2d8b797415b48e032cce0ab23eff894c19a7e4777b" dependencies = [ "bstr", "btoi", @@ -2206,13 +2205,14 @@ dependencies = [ [[package]] name = "gix-odb" -version = "0.56.1" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ae6da873de41c6c2b73570e82c571b69df5154dcd8f46dfafc6687767c33b1" +checksum = "8ba2fa9e81f2461b78b4d81a807867667326c84cdab48e0aed7b73a593aa1be4" dependencies = [ "arc-swap", "gix-date", "gix-features", + "gix-fs", "gix-hash", "gix-object", "gix-pack", @@ -2225,9 +2225,9 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.46.1" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "782b4d42790a14072d5c400deda9851f5765f50fe72bca6dece0da1cd6f05a9a" +checksum = "8da5f3e78c96b76c4e6fe5e8e06b76221e4a0ee9a255aa935ed1fdf68988dfd8" dependencies = [ "clru", "gix-chunk", @@ -2282,9 +2282,9 @@ dependencies = [ [[package]] name = "gix-pathspec" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cdb0ee9517c04f89bcaf6366fe893a17154ecb02d88b5c8174f27f1091d1247" +checksum = "9cbd49750edb26b0a691e5246fc635fa554d344da825cd20fa9ee0da9c1b761f" dependencies = [ "bitflags 2.5.0", "bstr", @@ -2310,20 +2310,20 @@ dependencies = [ [[package]] name = "gix-protocol" -version = "0.43.1" +version = "0.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca52738435991105f3bbd7f3a3a42cdf84c9992a78b9b7b1de528b3c022cfdd" +checksum = "a905cd00946ed8ed6f4f2281f98a889c5b3d38361cd94b8d5a5771d25ab33b99" dependencies = [ "bstr", - "btoi", "gix-credentials", "gix-date", "gix-features", "gix-hash", "gix-transport", + "gix-utils", "maybe-async", "thiserror", - "winnow 0.5.40", + "winnow 0.6.13", ] [[package]] @@ -2339,9 +2339,9 @@ dependencies = [ [[package]] name = "gix-ref" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d9bd1984638d8f3511a2fcbe84fcedb8a5b5d64df677353620572383f42649" +checksum = "5818958994ad7879fa566f5441ebcc48f0926aa027b28948e6fbf6578894dc31" dependencies = [ "gix-actor", "gix-date", @@ -2352,6 +2352,7 @@ dependencies = [ "gix-object", "gix-path", "gix-tempfile", + "gix-utils", "gix-validate", "memmap2", "thiserror", @@ -2360,9 +2361,9 @@ dependencies = [ [[package]] name = "gix-refspec" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be219df5092c1735abb2a53eccdf775e945eea6986ee1b6e7a5896dccc0be704" +checksum = "613aa4d93034c5791d13bdc635e530f4ddab1412ddfb4a8215f76213177b61c7" dependencies = [ "bstr", "gix-hash", @@ -2374,9 +2375,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa78e1df3633bc937d4db15f8dca2abdb1300ca971c0fabcf9fa97e38cf4cd9f" +checksum = "288f6549d7666db74dc3f169a9a333694fc28ecd2f5aa7b2c979c89eb556751a" dependencies = [ "bstr", "gix-date", @@ -2390,9 +2391,9 @@ dependencies = [ [[package]] name = "gix-revwalk" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702de5fe5c2bbdde80219f3a8b9723eb927466e7ecd187cfd1b45d986408e45f" +checksum = "5b9b4d91dfc5c14fee61a28c65113ded720403b65a0f46169c0460f731a5d03c" dependencies = [ "gix-commitgraph", "gix-date", @@ -2417,9 +2418,9 @@ dependencies = [ [[package]] name = "gix-submodule" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d438409222de24dffcc9897f04a9f97903a19fe4835b598ab3bb9b6e0f5e35" +checksum = "73182f6c1f5ed1ed94ba16581ac62593d5e29cd1c028b2af618f836283b8f8d4" dependencies = [ "bstr", "gix-config", @@ -2432,9 +2433,9 @@ dependencies = [ [[package]] name = "gix-tempfile" -version = "12.0.1" +version = "13.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8ef376d718b1f5f119b458e21b00fbf576bc9d4e26f8f383d29f5ffe3ba3eaa" +checksum = "a761d76594f4443b675e85928e4902dec333273836bd386906f01e7e346a0d11" dependencies = [ "gix-fs", "libc", @@ -2451,9 +2452,9 @@ checksum = "f924267408915fddcd558e3f37295cc7d6a3e50f8bd8b606cee0808c3915157e" [[package]] name = "gix-transport" -version = "0.40.1" +version = "0.41.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be01a22053e9395a409fcaeed879d94f4fcffeb4f46de7143275fbf5e5b39770" +checksum = "cf8e5f72ec9cad9ee44714b9a4ec7427b540a2418b62111f5e3a715bebe1ed9d" dependencies = [ "base64", "bstr", @@ -2470,9 +2471,9 @@ dependencies = [ [[package]] name = "gix-traverse" -version = "0.36.2" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65109e445ba7a409b48f34f570a4d7db72eade1dc1bcff81990a490e86c07161" +checksum = "bfc30c5b5e4e838683b59e1b0574ce6bc1c35916df9709aaab32bb7751daf08b" dependencies = [ "gix-commitgraph", "gix-date", @@ -2486,9 +2487,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.26.1" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0f17cceb7552a231d1fec690bc2740c346554e3be6f5d2c41dfa809594dc44" +checksum = "0db829ebdca6180fbe32be7aed393591df6db4a72dbbc0b8369162390954d1cf" dependencies = [ "bstr", "gix-features", @@ -2520,9 +2521,9 @@ dependencies = [ [[package]] name = "gix-worktree" -version = "0.29.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53982f8abff0789a9599e644108a1914da61a4d0dede8e45037e744dcb008d52" +checksum = "ca36bb3dc54038c66507dc75c4d8edbee2d6d5cc45227b4eb508ad13dd60a006" dependencies = [ "bstr", "gix-attributes", @@ -2621,15 +2622,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", - "allocator-api2", "serde", ] [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ "hashbrown 0.14.5", ] @@ -3265,9 +3265,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", "pkg-config", @@ -3507,8 +3507,8 @@ dependencies = [ "miette-derive", "owo-colors", "supports-color", - "supports-hyperlinks 3.0.0", - "supports-unicode", + "supports-hyperlinks", + "supports-unicode 3.0.0", "terminal_size", "textwrap", "thiserror", @@ -4339,7 +4339,7 @@ dependencies = [ [[package]] name = "playdate-symbolize" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "async-stream", @@ -4743,9 +4743,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ "bitflags 2.5.0", "fallible-iterator 0.3.0", @@ -5233,19 +5233,19 @@ dependencies = [ [[package]] name = "supports-hyperlinks" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0a1e5168041f5f3ff68ff7d95dcb9c8749df29f6e7e89ada40dd4c9de404ee" + +[[package]] +name = "supports-unicode" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" +checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" dependencies = [ "is-terminal", ] -[[package]] -name = "supports-hyperlinks" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0a1e5168041f5f3ff68ff7d95dcb9c8749df29f6e7e89ada40dd4c9de404ee" - [[package]] name = "supports-unicode" version = "3.0.0" @@ -5636,8 +5636,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", - "serde", - "serde_spanned", "toml_datetime", "winnow 0.5.40", ] @@ -5736,6 +5734,17 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "tracing-chrome" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf0a738ed5d6450a9fb96e86a23ad808de2b727fd1394585da5cdd6788ffe724" +dependencies = [ + "serde_json", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "tracing-core" version = "0.1.32" diff --git a/cargo/Cargo.toml b/cargo/Cargo.toml index 187b4d39..9cda1354 100644 --- a/cargo/Cargo.toml +++ b/cargo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-playdate" -version = "0.5.0-beta.2" +version = "0.5.0-beta.3" readme = "README.md" description = "Build tool for neat yellow console." keywords = ["playdate", "build", "cargo", "plugin", "cargo-subcommand"] @@ -31,10 +31,10 @@ clap_lex = "0.7" dirs.workspace = true fs_extra.workspace = true -cargo = "0.78" +cargo = "0.79" cargo-util = "0.2.11" cargo-platform = "0.1.8" -cargo-util-schemas = "0.2.0" +cargo-util-schemas = "0.3.0" semver.workspace = true serde = { workspace = true, features = ["derive"] } diff --git a/cargo/src/assets/mod.rs b/cargo/src/assets/mod.rs index 1ed07b82..10ac7e80 100644 --- a/cargo/src/assets/mod.rs +++ b/cargo/src/assets/mod.rs @@ -130,14 +130,14 @@ pub mod proto { // clean layout if needed: if !cfg.dry_run && cfg.compile_options.build_config.force_rebuild { - if !matches!(cfg.workspace.config().shell().verbosity(), Verbosity::Quiet) { + if !matches!(cfg.workspace.gctx().shell().verbosity(), Verbosity::Quiet) { cfg.log().status("Clean", format!("assets for {}", key.id)); } layout.clean()?; } - let mut locked = layout.lock_mut(cfg.workspace.config())?; + let mut locked = layout.lock_mut(cfg.workspace.gctx())?; locked.prepare()?; // path of build-plan file: @@ -425,7 +425,7 @@ pub fn build<'cfg>(config: &'cfg Config) -> CargoResult> { let mut options = HashMap::new(); if !config.dry_run && config.compile_options.build_config.force_rebuild { - if !matches!(config.workspace.config().shell().verbosity(), Verbosity::Quiet) { + if !matches!(config.workspace.gctx().shell().verbosity(), Verbosity::Quiet) { config.log() .status("Clean", format!("assets for {}", package.package_id())); } @@ -470,7 +470,7 @@ pub fn build<'cfg>(config: &'cfg Config) -> CargoResult> { // TODO: list deps in the plan for (package, metadata) in packages { - let locked = layout.lock_mut(config.workspace.config())?; + let locked = layout.lock_mut(config.workspace.gctx())?; let dev = has_dev && package.package_id() == target_pid; let err_msg = |err| format!("{err}, caused when planning assets for {}.", package.package_id()); @@ -517,12 +517,12 @@ pub fn build<'cfg>(config: &'cfg Config) -> CargoResult> { .chain(plan.dev.as_ref().into_iter().map(|plan| (plan, AssetKind::Dev))) { let message = plan.printable_serializable(package.package_id(), kind); - config.workspace.config().shell().print_json(&message)?; + config.workspace.gctx().shell().print_json(&message)?; } } } else { config.workspace - .config() + .gctx() .shell() .verbose(|shell| { for (package, plan) in plans.iter() { @@ -605,7 +605,7 @@ pub fn build<'cfg>(config: &'cfg Config) -> CargoResult> { // finally apply plans: if !config.dry_run && !config.compile_options.build_config.build_plan && !plans.is_empty() { - let mut locked = layout.lock_mut(config.workspace.config())?; + let mut locked = layout.lock_mut(config.workspace.gctx())?; locked.prepare()?; for (dependency, mut plan) in plans.into_iter() { @@ -764,8 +764,8 @@ pub fn build<'cfg>(config: &'cfg Config) -> CargoResult> { if config.compile_options.build_config.build_plan { - config.workspace.config().shell().out().flush()?; - config.workspace.config().shell().err().flush()?; + config.workspace.gctx().shell().out().flush()?; + config.workspace.gctx().shell().err().flush()?; std::process::exit(0); } diff --git a/cargo/src/build/mod.rs b/cargo/src/build/mod.rs index 0ff11a95..88ff0c5c 100644 --- a/cargo/src/build/mod.rs +++ b/cargo/src/build/mod.rs @@ -125,7 +125,7 @@ pub fn build<'cfg>(config: &'cfg Config<'cfg>) -> CargoResult(config: &'cfg Config, layout.as_ref(), package_crate_name, Some(artifact.name.as_ref()), - ).lock(config.workspace.config())?; + ).lock(config.workspace.gctx())?; pdl.as_mut().prepare()?; let product = if artifact.ck.is_playdate() { @@ -445,7 +445,7 @@ fn build_library<'cfg, Layout, S>(config: &'cfg Config, "{} of {}{}", artifact.ct, artifact.package, - if config.workspace.config().extra_verbose() { + if config.workspace.gctx().extra_verbose() { format!(" from {}", artifact.path.as_relative_to_root(config).display()) } else { Default::default() @@ -464,7 +464,7 @@ fn build_library<'cfg, Layout, S>(config: &'cfg Config, layout.as_ref(), package_crate_name, Some(artifact.name.as_ref()), - ).lock(config.workspace.config())?; + ).lock(config.workspace.gctx())?; pdl.as_mut().prepare()?; let product = if artifact.ck.is_playdate() { @@ -511,8 +511,8 @@ fn build_library<'cfg, Layout, S>(config: &'cfg Config, }); // Print gcc's output in verbose mode only! - let quiet = config.workspace.config().shell().verbosity() == Verbosity::Quiet; - let extra_verbose = config.workspace.config().extra_verbose(); + let quiet = config.workspace.gctx().shell().verbosity() == Verbosity::Quiet; + let extra_verbose = config.workspace.gctx().extra_verbose(); gcc.stderr(if quiet { Stdio::null() } else { Stdio::inherit() }); gcc.stdout(if extra_verbose { Stdio::inherit() diff --git a/cargo/src/build/rustflags.rs b/cargo/src/build/rustflags.rs index 3a046882..192be554 100644 --- a/cargo/src/build/rustflags.rs +++ b/cargo/src/build/rustflags.rs @@ -52,7 +52,7 @@ impl Rustflags { if config.no_gcc { // export LINK MAP: let target_dir = config.workspace - .config() + .gctx() .target_dir() .unwrap_or_default() .unwrap_or_else(|| Filesystem::new("target".into())) @@ -103,7 +103,7 @@ impl Rustflags { let existing = [&device_target, &config.host_target].into_iter() .filter_map(|ck| { config.workspace - .config() + .gctx() .target_cfg_triple(ck.short_name()) .ok() .and_then(|tcfg| tcfg.rustflags) diff --git a/cargo/src/cli/mod.rs b/cargo/src/cli/mod.rs index c53a2557..d8b47b49 100644 --- a/cargo/src/cli/mod.rs +++ b/cargo/src/cli/mod.rs @@ -17,7 +17,7 @@ use cargo::core::{Workspace, VirtualManifest, WorkspaceConfig, WorkspaceRootConf use cargo::core::compiler::{CompileTarget, CompileKind}; use cargo::ops::CompileOptions; use cargo::util::command_prelude::{ArgMatchesExt, CompileMode, ProfileChecking}; -use cargo::util::Config as CargoConfig; +use cargo::util::GlobalContext as CargoConfig; use cargo::util::CargoResult; use clap_lex::SeekFrom; @@ -196,7 +196,7 @@ pub fn initialize_from(args: impl IntoIterator + AsRe matches.check_optional_opts(&workspace, &compile_options)?; } - let rustc = workspace.config().load_global_rustc(Some(&workspace))?; + let rustc = workspace.gctx().load_global_rustc(Some(&workspace))?; let host_target = CompileTarget::new(&rustc.host)?; @@ -365,7 +365,7 @@ fn presented_dangerous_global_args_values<'m>(matches: &'m ArgMatches, fn compile_options(cmd: &Cmd, matches: &ArgMatches, ws: &Workspace<'_>) -> CargoResult { - let cfg = ws.config(); + let cfg = ws.gctx(); let mut compile_options = match cmd { // allow multiple crates: Cmd::Build | Cmd::Package | Cmd::Migrate | Cmd::Assets => { @@ -373,7 +373,7 @@ fn compile_options(cmd: &Cmd, matches: &ArgMatches, ws: &Workspace<'_>) -> Cargo }, Cmd::New | Cmd::Init => { - let mut opts = CompileOptions::new(ws.config(), CompileMode::Check { test: false })?; + let mut opts = CompileOptions::new(ws.gctx(), CompileMode::Check { test: false })?; opts.build_config .requested_kinds .push(PlaydateTarget::Device.into()); diff --git a/cargo/src/layout/mod.rs b/cargo/src/layout/mod.rs index a8084c40..d3110930 100644 --- a/cargo/src/layout/mod.rs +++ b/cargo/src/layout/mod.rs @@ -5,7 +5,7 @@ mod cargo; mod playdate; use ::cargo::CargoResult; -use ::cargo::Config; +use ::cargo::GlobalContext as Config; use ::cargo::util::FileLock; use ::cargo::util::Filesystem; diff --git a/cargo/src/main.rs b/cargo/src/main.rs index d5587713..f0c1b885 100644 --- a/cargo/src/main.rs +++ b/cargo/src/main.rs @@ -13,7 +13,7 @@ use std::borrow::Cow; use anyhow::bail; use cargo::core::Verbosity; use cargo::core::compiler::{CrateType, CompileKind}; -use cargo::util::{CargoResult, Config as CargoConfig}; +use cargo::util::{CargoResult, GlobalContext as CargoConfig}; use config::Config; use anstyle::AnsiColor as Color; @@ -42,7 +42,7 @@ fn main() -> CargoResult<()> { |err| { #[cfg(debug_assertions)] eprintln!("Error: {err:?}"); - let config = config.workspace.config(); + let config = config.workspace.gctx(); config.shell().set_verbosity(Verbosity::Normal); config.shell().error(err).ok(); std::process::exit(1); diff --git a/cargo/src/package/mod.rs b/cargo/src/package/mod.rs index 608cc122..43ccc09e 100644 --- a/cargo/src/package/mod.rs +++ b/cargo/src/package/mod.rs @@ -238,7 +238,7 @@ fn package_multi_target<'p>(config: &Config, let layout_target_name = Name::with_names(package.name().as_str(), products.first().map(|p| &p.name)); let mut layout = CrossTargetLayout::new(config, package.package_id(), Some(layout_target_name))?.lock(config.workspace - .config())?; + .gctx())?; if let Some(assets) = assets { debug_assert_eq!( layout.as_ref().assets_layout(config).root(), diff --git a/cargo/src/proc/logging.rs b/cargo/src/proc/logging.rs index ef58ba6d..0c77f826 100644 --- a/cargo/src/proc/logging.rs +++ b/cargo/src/proc/logging.rs @@ -68,14 +68,14 @@ pub fn cmd_logged(config: &Config, mut cmd: Command) -> CargoResult { if let Ok(error) = std::str::from_utf8(stderr) { config.log().status_err(format!("{tool} stderr:\n{error}")); } else { - config.workspace.config().shell().status_header(&tool)?; + config.workspace.gctx().shell().status_header(&tool)?; config.workspace - .config() + .gctx() .shell() .err() .write_all("stderr:\n".as_bytes())?; - config.workspace.config().shell().err().write_all(stderr)?; - config.workspace.config().shell().err().write_all(b"\n")?; + config.workspace.gctx().shell().err().write_all(stderr)?; + config.workspace.gctx().shell().err().write_all(b"\n")?; } } diff --git a/cargo/src/proc/utils.rs b/cargo/src/proc/utils.rs index 9ef7e76d..d9bfd6d7 100644 --- a/cargo/src/proc/utils.rs +++ b/cargo/src/proc/utils.rs @@ -42,7 +42,7 @@ pub fn cargo_proxy_with>(cfg: &Config, pub fn cargo(cfg: Option<&Config>) -> CargoResult { let mut proc = cargo_cmd(cfg); - if let Some(cfg) = cfg.map(|cfg| cfg.workspace.config()) { + if let Some(cfg) = cfg.map(|cfg| cfg.workspace.gctx()) { // transparent env: cfg.env_config()?.iter().for_each(|(k, v)| { let value = v.resolve(cfg); @@ -72,7 +72,7 @@ pub fn cargo(cfg: Option<&Config>) -> CargoResult { pub fn cargo_cmd(cfg: Option<&Config>) -> std::process::Command { fn cargo_path<'t>(cfg: Option<&'t Config<'t>>) -> (Cow<'t, Path>, Option<&str>) { if let Some(cfg) = cfg { - let path = cfg.workspace.config().cargo_exe().log_err().ok().map(Cow::from); + let path = cfg.workspace.gctx().cargo_exe().log_err().ok().map(Cow::from); if path.is_some() && path == std::env::current_exe().log_err().ok().map(Into::into) { // Seems to we're in standalone mode. cargo_path(None) @@ -115,7 +115,7 @@ pub fn read_cargo_json(cfg: &Config, mut cmd: Command) -> C let output = cmd.output()?; if !output.status.success() { - cfg.workspace.config().shell().err().write_all(&output.stderr)?; + cfg.workspace.gctx().shell().err().write_all(&output.stderr)?; output.status.exit_ok()?; } diff --git a/cargo/src/utils/logging.rs b/cargo/src/utils/logging.rs index 56651f3c..29cfc43d 100644 --- a/cargo/src/utils/logging.rs +++ b/cargo/src/utils/logging.rs @@ -127,14 +127,14 @@ impl Config<'_> { #[must_use] pub fn log(&self) -> CargoLogger> { CargoLogger( - self.workspace.config().shell(), + self.workspace.gctx().shell(), self.compile_options.build_config.emit_json(), ) } pub fn log_extra_verbose(&self, mut callback: F) where F: FnMut(CargoLogger>) { - if self.workspace.config().extra_verbose() { + if self.workspace.gctx().extra_verbose() { callback(self.log()) } } diff --git a/cargo/src/utils/mod.rs b/cargo/src/utils/mod.rs index fb89f99d..a674417f 100644 --- a/cargo/src/utils/mod.rs +++ b/cargo/src/utils/mod.rs @@ -27,7 +27,7 @@ pub struct LazyBuildContext<'a, 'cfg> { impl<'a, 'cfg> LazyBuildContext<'a, 'cfg> { pub fn new(config: &'cfg Config) -> CargoResult { - let options = CompileOptions::new(config.workspace.config(), CompileMode::Check { test: false })?; + let options = CompileOptions::new(config.workspace.gctx(), CompileMode::Check { test: false })?; Ok(Self { bcx: Lazy::new(), interner: UnitInterner::new(), workspace: &config.workspace, diff --git a/cargo/src/utils/workspace.rs b/cargo/src/utils/workspace.rs index aaafb2c2..61098889 100644 --- a/cargo/src/utils/workspace.rs +++ b/cargo/src/utils/workspace.rs @@ -24,6 +24,7 @@ impl<'t> Config<'t> { Ok(members) } + #[deprecated(since = "0.5", note = "TODO: use unit_graph instead")] /// Returns a list of targets that are requested by the user. /// Resolved by requested spec initially, with fallback to all possible targets. pub fn possible_targets_ext(&'t self) -> CargoResult>> { @@ -37,6 +38,7 @@ impl<'t> Config<'t> { Ok(possible) } + #[deprecated(since = "0.5", note = "TODO: use unit_graph instead")] /// Returns a list of potential targets that are requested by the user. pub fn possible_targets(&'t self) -> CargoResult>> { let packages = self.members_with_features()?.into_iter().map(|(p, _)| p); @@ -44,6 +46,7 @@ impl<'t> Config<'t> { Ok(members) } + #[deprecated(since = "0.5", note = "TODO: use unit_graph instead")] pub fn possible_targets_with(&'t self, members: impl IntoIterator) -> impl Iterator> { @@ -57,6 +60,7 @@ impl<'t> Config<'t> { }) } + #[deprecated(since = "0.5", note = "TODO: determine from unit_graph instead")] pub fn possible_compile_kinds(&'t self) -> CargoResult> { let member_kinds = self.members_with_features()?.into_iter().flat_map(|(p, _)| { p.manifest() @@ -79,7 +83,7 @@ impl<'t> Config<'t> { pub fn target_info(&self, kind: CompileKind) -> CargoResult { TargetInfo::new( - self.workspace.config(), + self.workspace.gctx(), &self.possible_compile_kinds()?, &self.rustc, kind, diff --git a/support/addr2line/Cargo.toml b/support/addr2line/Cargo.toml index 8500370d..c7839737 100644 --- a/support/addr2line/Cargo.toml +++ b/support/addr2line/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "playdate-symbolize" -version = "0.1.2" +version = "0.1.3" readme = "README.md" description = "Tools for symbolise addresses from bin (pdex.elf) and Playdate's trace or crashlog." keywords = ["playdate", "bin", "elf", "addr2line", "utility"] @@ -48,7 +48,7 @@ workspace = true optional = true [dependencies.rusqlite] -version = "0.30" +version = "0.31" features = ["bundled"] [dependencies.utils]