diff --git a/Cargo.lock b/Cargo.lock index 1b75a897..766ccd3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,12 +4,12 @@ version = 4 [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.2.16", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -17,13 +17,22 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] +[[package]] +name = "alloca" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4" +dependencies = [ + "cc", +] + [[package]] name = "allocator-api2" version = "0.2.21" @@ -47,9 +56,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "annotate-snippets" -version = "0.11.5" +version = "0.12.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4" +checksum = "15580ece6ea97cbf832d60ba19c021113469480852c6a2a6beb0db28f097bf1f" dependencies = [ "anstyle", "unicode-width", @@ -57,9 +66,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -72,50 +81,50 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "once_cell", - "windows-sys 0.59.0", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "async-channel" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" dependencies = [ "concurrent-queue", "event-listener-strategy", @@ -125,22 +134,23 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.1" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" dependencies = [ "async-task", "concurrent-queue", "fastrand", "futures-lite", + "pin-project-lite", "slab", ] [[package]] name = "async-fs" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" dependencies = [ "async-lock", "blocking", @@ -149,28 +159,27 @@ dependencies = [ [[package]] name = "async-io" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" dependencies = [ - "async-lock", + "autocfg", "cfg-if", "concurrent-queue", "futures-io", "futures-lite", "parking", "polling", - "rustix 0.38.44", + "rustix", "slab", - "tracing", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "async-lock" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" dependencies = [ "event-listener", "event-listener-strategy", @@ -190,9 +199,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" dependencies = [ "async-channel", "async-io", @@ -203,15 +212,14 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 0.38.44", - "tracing", + "rustix", ] [[package]] name = "async-signal" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" dependencies = [ "async-io", "async-lock", @@ -219,10 +227,10 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.44", + "rustix", "signal-hook-registry", "slab", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -239,9 +247,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "bitflags" @@ -251,15 +259,24 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "block2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] [[package]] name = "blocking" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" dependencies = [ "async-channel", "async-task", @@ -270,9 +287,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "serde", @@ -280,9 +297,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "cast" @@ -292,10 +309,11 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.20" +version = "1.2.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a" +checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -303,9 +321,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -342,9 +360,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -352,9 +370,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -364,9 +382,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.47" +version = "4.5.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06f5378ea264ad4f82bbc826628b5aad714a75abf6ece087e923010eb937fb6" +checksum = "39615915e2ece2550c0149addac32fb5bd312c657f43845bb9088cb9c8a7c992" dependencies = [ "clap", "clap_lex", @@ -376,9 +394,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck", "proc-macro2", @@ -388,9 +406,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "clio" @@ -408,9 +426,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "concurrent-queue" @@ -421,17 +439,11 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "const_fn" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" - [[package]] name = "const_format" -version = "0.2.34" +version = "0.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" dependencies = [ "const_format_proc_macros", ] @@ -455,25 +467,24 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "criterion" -version = "0.5.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +checksum = "4d883447757bb0ee46f233e9dc22eb84d93a9508c9b868687b274fc431d886bf" dependencies = [ + "alloca", "anes", "cast", "ciborium", "clap", "criterion-plot", - "is-terminal", "itertools", "num-traits", - "once_cell", "oorandom", + "page_size", "plotters", "rayon", "regex", "serde", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -481,9 +492,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.5.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +checksum = "ed943f81ea2faa8dcecbbfa50164acf95d555afec96a27871663b300e387b2e4" dependencies = [ "cast", "itertools", @@ -516,29 +527,42 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "ctrlc" -version = "3.4.6" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697b5419f348fd5ae2478e8018cb016c00a5881c7f46c717de98ffd135a5651c" +checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" dependencies = [ + "dispatch2", "nix", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "deranged" -version = "0.4.0" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", ] +[[package]] +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.10.0", + "block2", + "libc", + "objc2", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -570,19 +594,19 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.11" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -607,36 +631,30 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "file-id" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bc904b9bbefcadbd8e3a9fb0d464a9b979de6324c03b3c663e8994f46a5be36" +checksum = "e1fc6a637b6dc58414714eddd9170ff187ecb0933d4c7024d1abbd23a3cc26e9" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] -name = "filetime" -version = "0.2.25" +name = "find-msvc-tools" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys 0.59.0", -] +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "foldhash" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -700,9 +718,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ "fastrand", "futures-core", @@ -754,34 +772,23 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasip2", ] [[package]] name = "git2" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5220b8ba44c68a9a7f7a7659e864dd73692e417ef0211bea133c7b74e031eeb9" +checksum = "3e2b37e2f62729cdada11f0e6b3b6fe383c69c29fc619e391223e12856af308c" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.10.0", "libc", "libgit2-sys", "log", @@ -790,32 +797,33 @@ dependencies = [ [[package]] name = "globset" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata", + "regex-syntax", ] [[package]] name = "half" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", + "zerocopy", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", @@ -830,21 +838,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - -[[package]] -name = "hermit-abi" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "iai" @@ -854,9 +850,9 @@ checksum = "71a816c97c42258aa5834d07590b718b4c9a598944cd39a52dc25b351185d678" [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -878,21 +874,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -901,104 +898,66 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ - "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", + "icu_locale_core", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -1007,9 +966,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -1017,15 +976,15 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.23" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.9", + "regex-automata", "same-file", "walkdir", "winapi-util", @@ -1033,13 +992,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", "hashbrown", "serde", + "serde_core", ] [[package]] @@ -1048,7 +1008,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.10.0", "inotify-sys", "libc", ] @@ -1064,13 +1024,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ - "hermit-abi 0.5.0", + "hermit-abi", "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1081,24 +1041,24 @@ checksum = "1fe266d2e243c931d8190177f20bf7f24eed45e96f39e87dc49a27b32d12d407" [[package]] name = "is_executable" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a1b5bad6f9072935961dfbf1cced2f3d129963d091b6f69f007fe04e758ae2" +checksum = "baabb8b4867b26294d818bf3f651a454b6901431711abb96e296245888d6e8c4" dependencies = [ - "winapi", + "windows-sys 0.60.2", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1111,19 +1071,19 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.2", + "getrandom", "libc", ] [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", @@ -1131,9 +1091,9 @@ dependencies = [ [[package]] name = "kqueue" -version = "1.0.8" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" +checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" dependencies = [ "kqueue-sys", "libc", @@ -1157,15 +1117,15 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libgit2-sys" -version = "0.18.1+1.9.0" +version = "0.18.3+1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" +checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" dependencies = [ "cc", "libc", @@ -1173,22 +1133,11 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.9.0", - "libc", - "redox_syscall", -] - [[package]] name = "libz-sys" -version = "1.1.22" +version = "1.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" dependencies = [ "cc", "libc", @@ -1204,43 +1153,36 @@ checksum = "29fc123b2f6600099ca18248f69e3ee02b09c4188c0d98e9a690d90dec3e408a" [[package]] name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.27" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "macro_rules_attribute" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a82271f7bc033d84bbca59a3ce3e4159938cb08a9c3aebbe54d215131518a13" +checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520" dependencies = [ "macro_rules_attribute-proc_macro", "paste", @@ -1248,44 +1190,44 @@ dependencies = [ [[package]] name = "macro_rules_attribute-proc_macro" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dd856d451cc0da70e2ef2ce95a18e39a93b7558bedf10201ad28503f918568" +checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "mio" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi", + "windows-sys 0.61.2", ] [[package]] name = "nix" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.10.0", "cfg-if", "cfg_aliases", "libc", @@ -1293,12 +1235,11 @@ dependencies = [ [[package]] name = "notify" -version = "8.0.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" +checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "bitflags 2.9.0", - "filetime", + "bitflags 2.10.0", "fsevent-sys", "inotify", "kqueue", @@ -1307,14 +1248,14 @@ dependencies = [ "mio", "notify-types", "walkdir", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "notify-debouncer-full" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d88b1a7538054351c8258338df7c931a590513fb3745e8c15eb9ff4199b8d1" +checksum = "375bd3a138be7bfeff3480e4a623df4cbfb55b79df617c055cd810ba466fa078" dependencies = [ "file-id", "log", @@ -1331,12 +1272,11 @@ checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "overload", - "winapi", + "windows-sys 0.61.2", ] [[package]] @@ -1356,11 +1296,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -1373,12 +1313,33 @@ dependencies = [ "libc", ] +[[package]] +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "oorandom" version = "11.1.5" @@ -1386,16 +1347,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] -name = "overload" -version = "0.1.1" +name = "owo-colors" +version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" [[package]] -name = "owo-colors" -version = "4.2.0" +name = "page_size" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] [[package]] name = "parking" @@ -1405,9 +1370,9 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -1415,15 +1380,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-link", ] [[package]] @@ -1434,9 +1399,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" @@ -1497,17 +1462,25 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.4" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.4.0", + "hermit-abi", "pin-project-lite", - "rustix 0.38.44", - "tracing", - "windows-sys 0.59.0", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", ] [[package]] @@ -1518,33 +1491,33 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -1552,9 +1525,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -1562,56 +1535,41 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.11" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.10.0", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "rustc-stable-hash" @@ -1621,35 +1579,22 @@ checksum = "781442f29170c5c93b7185ad559492601acdc71d5bb0706f5868094f45cfcd08" [[package]] name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "linux-raw-sys", + "windows-sys 0.61.2", ] [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -1674,18 +1619,28 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -1694,49 +1649,37 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "shadow-rs" -version = "0.38.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ec14cc798c29f4bf74a6c4299c657c04d4e9fba03875c1f0eec569af03aed89" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" dependencies = [ - "const_format", - "git2", - "is_debug", - "time", - "tzdb 0.6.1", + "serde_core", ] [[package]] name = "shadow-rs" -version = "1.1.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d5625ed609cf66d7e505e7d487aca815626dc4ebb6c0dd07637ca61a44651a6" +checksum = "72d18183cef626bce22836103349c7050d73db799be0171386b80947d157ae32" dependencies = [ "const_format", "git2", "is_debug", "time", - "tzdb 0.7.2", + "tzdb", ] [[package]] @@ -1756,27 +1699,24 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" dependencies = [ "libc", ] [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smol" @@ -1810,9 +1750,9 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "strsim" @@ -1822,9 +1762,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.101" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -1833,9 +1773,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", @@ -1844,15 +1784,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.19.1" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom", "once_cell", - "rustix 1.0.5", - "windows-sys 0.59.0", + "rustix", + "windows-sys 0.61.2", ] [[package]] @@ -1882,18 +1822,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", @@ -1902,19 +1842,18 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] name = "time" -version = "0.3.41" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", "itoa", @@ -1929,15 +1868,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" dependencies = [ "num-conv", "time-core", @@ -1945,9 +1884,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -1965,38 +1904,48 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "toml_edit" -version = "0.22.25" +version = "0.23.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10558ed0bd2a1562e630926a2d1f0b98c827da99fabd3fe20920a59642504485" +checksum = "5d7cbc3b4b49633d57a0509303158ca50de80ae32c265093b24c414705807832" dependencies = [ "indexmap", - "serde", + "serde_core", "serde_spanned", "toml_datetime", - "toml_write", + "toml_parser", + "toml_writer", "winnow", ] [[package]] -name = "toml_write" -version = "0.1.0" +name = "toml_parser" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28391a4201ba7eb1984cfeb6862c0b3ea2cfe23332298967c749dddc0d6cd976" +checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -2005,9 +1954,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -2016,9 +1965,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" dependencies = [ "once_cell", "valuable", @@ -2037,14 +1986,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -2055,70 +2004,41 @@ dependencies = [ [[package]] name = "tz-rs" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33851b15c848fad2cf4b105c6bb66eb9512b6f6c44a4b13f57c53c73c707e2b4" -dependencies = [ - "const_fn", -] - -[[package]] -name = "tz-rs" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1450bf2b99397e72070e7935c89facaa80092ac812502200375f1f7d33c71a1" - -[[package]] -name = "tzdb" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b580f6b365fa89f5767cdb619a55d534d04a4e14c2d7e5b9a31e94598687fb1" -dependencies = [ - "iana-time-zone", - "tz-rs 0.6.14", - "tzdb_data 0.1.5", -] +checksum = "14eff19b8dc1ace5bf7e4d920b2628ae3837f422ff42210cb1567cbf68b5accf" [[package]] name = "tzdb" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be2ea5956f295449f47c0b825c5e109022ff1a6a53bb4f77682a87c2341fbf5" +checksum = "56d4e985b6dda743ae7fd4140c28105316ffd75bc58258ee6cc12934e3eb7a0c" dependencies = [ "iana-time-zone", - "tz-rs 0.7.0", - "tzdb_data 0.2.2", -] - -[[package]] -name = "tzdb_data" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d69ad05cd8412d9f6e7df6ac91e50ea557687cc1b734339cb6742e547704663" -dependencies = [ - "tz-rs 0.6.14", + "tz-rs", + "tzdb_data", ] [[package]] name = "tzdb_data" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c4c81d75033770e40fbd3643ce7472a1a9fd301f90b7139038228daf8af03ec" +checksum = "42302a846dea7ab786f42dc5f519387069045acff793e1178d9368414168fe95" dependencies = [ - "tz-rs 0.7.0", + "tz-rs", ] [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unicode-xid" @@ -2128,21 +2048,16 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -2185,50 +2100,37 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2236,31 +2138,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" dependencies = [ "js-sys", "wasm-bindgen", @@ -2290,8 +2192,7 @@ dependencies = [ "parking_lot", "serde", "serde_json", - "shadow-rs 0.38.1", - "shadow-rs 1.1.1", + "shadow-rs", "smol", "thiserror", "toml_edit", @@ -2301,7 +2202,7 @@ dependencies = [ "werk-parser", "werk-runner", "werk-util", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2337,7 +2238,7 @@ dependencies = [ "ahash", "annotate-snippets", "anyhow", - "bitflags 2.9.0", + "bitflags 2.10.0", "futures", "globset", "ignore", @@ -2346,7 +2247,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "regex", - "regex-syntax 0.8.5", + "regex-syntax", "rustc-stable-hash", "serde", "smol", @@ -2375,13 +2276,12 @@ dependencies = [ [[package]] name = "which" -version = "7.0.3" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" +checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" dependencies = [ - "either", "env_home", - "rustix 1.0.5", + "rustix", "winsafe", ] @@ -2403,11 +2303,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2418,9 +2318,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", @@ -2431,9 +2331,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", @@ -2442,9 +2342,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", @@ -2453,24 +2353,24 @@ dependencies = [ [[package]] name = "windows-link" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-result" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ "windows-link", ] @@ -2492,36 +2392,37 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.52.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ "windows-targets", ] [[package]] name = "windows-sys" -version = "0.59.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-targets", + "windows-link", ] [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -2532,9 +2433,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" @@ -2544,9 +2445,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" @@ -2556,15 +2457,15 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" @@ -2574,9 +2475,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" @@ -2586,9 +2487,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" @@ -2598,9 +2499,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" @@ -2610,15 +2511,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.52.6" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.7" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] @@ -2630,33 +2531,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "write16" -version = "1.0.0" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -2664,9 +2555,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", @@ -2676,18 +2567,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" dependencies = [ "proc-macro2", "quote", @@ -2715,11 +2606,22 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + [[package]] name = "zerovec" -version = "0.10.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -2728,9 +2630,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index dc6d623b..93734517 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,9 +30,9 @@ regex = "1.11.1" regex-syntax = "0.8.5" serde = { version = "1.0.215", features = ["derive"] } smol = "2.0.2" -toml_edit = "0.22.22" +toml_edit = "0.23.9" futures = "0.3.31" -annotate-snippets = "0.11.5" +annotate-snippets = "0.12.10" anstream = "0.6.18" [workspace.lints.clippy] diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 4d45ed19..56a4cd10 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -27,7 +27,7 @@ anstream.workspace = true winnow.workspace = true [dev-dependencies] -criterion = "0.5.1" +criterion = "0.8.1" iai = "0.1" [lib] diff --git a/tests/fail/ambiguous_build_recipe.txt b/tests/fail/ambiguous_build_recipe.txt index cdebd81a..18d349f4 100644 --- a/tests/fail/ambiguous_build_recipe.txt +++ b/tests/fail/ambiguous_build_recipe.txt @@ -1,11 +1,12 @@ error[R0011]: ambiguous pattern match: /foofoo + | +note: first pattern here --> /INPUT:3:7 | 3 | build "%foo" { - | ------ note: first pattern here -4 | info "" -5 | } -6 | -7 | build "foo%" { - | ------ note: second pattern here + | ------ +note: second pattern here + --> /INPUT:7:7 | +7 | build "foo%" { + | ------ diff --git a/tests/fail/ambiguous_path_resolution.txt b/tests/fail/ambiguous_path_resolution.txt index 04997507..7908b7b2 100644 --- a/tests/fail/ambiguous_path_resolution.txt +++ b/tests/fail/ambiguous_path_resolution.txt @@ -1,9 +1,12 @@ error[E0032]: ambiguous path resolution: /bar exists in the workspace, but also matches a build recipe --> /INPUT:6:10 | -5 | build "bar" { - | ----- note: matched this build recipe 6 | info "" | ^^^^^^^ ambiguous path resolution: /bar exists in the workspace, but also matches a build recipe | + ::: /INPUT:5:7 + | +5 | build "bar" { + | ----- matched this build recipe + | = help: use `<...:out-dir>` or `<...:workspace>` to disambiguate between paths in the workspace and the output directory diff --git a/tests/fail/duplicate_config.txt b/tests/fail/duplicate_config.txt index 9f95f67c..e0b1beda 100644 --- a/tests/fail/duplicate_config.txt +++ b/tests/fail/duplicate_config.txt @@ -1,8 +1,10 @@ error[E0033]: duplicate config statement --> /INPUT:2:1 | -1 | config foo = "a" - | ---------------- note: previous config statement here 2 | config foo = "b" | ^^^^^^^^^^^^^^^^ duplicate config statement | + ::: /INPUT:1:1 + | +1 | config foo = "a" + | ---------------- previous config statement here diff --git a/tests/fail/include_missing.txt b/tests/fail/include_missing.txt index 4af47cf4..66ef5bfd 100644 --- a/tests/fail/include_missing.txt +++ b/tests/fail/include_missing.txt @@ -3,4 +3,3 @@ error[E0027]: error including '/does-not-exist.werk': file not found | 1 | include "does-not-exist.werk" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error including '/does-not-exist.werk': file not found - | diff --git a/tests/fail/include_self.txt b/tests/fail/include_self.txt index 4ce1bbe1..853635b9 100644 --- a/tests/fail/include_self.txt +++ b/tests/fail/include_self.txt @@ -7,5 +7,4 @@ error[E0035]: same file included twice: /included ::: /INPUT:1:1 | 1 | include "included" - | ------------------ note: already included here - | + | ------------------ already included here diff --git a/tests/fail/include_twice.txt b/tests/fail/include_twice.txt index fbeb9c68..cbf89b64 100644 --- a/tests/fail/include_twice.txt +++ b/tests/fail/include_twice.txt @@ -1,8 +1,10 @@ error[E0035]: same file included twice: /included --> /INPUT:2:1 | -1 | include "included" - | ------------------ note: already included here 2 | include "included" | ^^^^^^^^^^^^^^^^^^ same file included twice: /included | + ::: /INPUT:1:1 + | +1 | include "included" + | ------------------ already included here diff --git a/tests/fail/include_with_default.txt b/tests/fail/include_with_default.txt index 0d583eb6..c403546f 100644 --- a/tests/fail/include_with_default.txt +++ b/tests/fail/include_with_default.txt @@ -4,9 +4,9 @@ error[E0036]: `default` statements are not allowed in included files 1 | default target="foo" | ^^^^^^^^^^^^^^^^^^^^ `default` statements are not allowed in included files | - ::: /INPUT:1:1 + = help: move `default` statements to the top-level Werkfile +note: included here + --> /INPUT:1:1 | 1 | include "included" - | ------------------ note: included here - | - = help: move `default` statements to the top-level Werkfile + | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/fail/include_with_error.txt b/tests/fail/include_with_error.txt index f6d6b180..f0ae9999 100644 --- a/tests/fail/include_with_error.txt +++ b/tests/fail/include_with_error.txt @@ -1,14 +1,14 @@ error[P1001]: parse error - --> /included:1:1 + --> /included:1:7 | 1 | let a= | - ^ expected expression | | - | info: while parsing `let` statement + | while parsing `let` statement | - ::: /INPUT:1:1 + = help: expressions must start with a value, or an `env`, `glob`, `which`, or `shell` operation +note: included here + --> /INPUT:1:1 | 1 | include "included" - | ------------------ note: included here - | - = help: expressions must start with a value, or an `env`, `glob`, `which`, or `shell` operation + | ^^^^^^^^^^^^^^^^^^ diff --git a/tests/mock_io.rs b/tests/mock_io.rs index 3618be02..afcf940e 100644 --- a/tests/mock_io.rs +++ b/tests/mock_io.rs @@ -243,8 +243,11 @@ impl<'a> Test<'a> { let ast = match werk_parser::parse_werk(self.source) { Ok(ast) => ast, Err(err) => { - return Err(Error::Eval(EvalError::Parse(DiagnosticFileId(0), err)) - .into_diagnostic_error(&*self as _)); + return Err(Error::Eval(EvalError::Parse(werk_parser::ErrorInFile { + file: DiagnosticFileId(0), + error: err, + })) + .into_diagnostic_error(&*self as _)); } }; self.reload_test_pragmas(&ast); @@ -863,10 +866,9 @@ pub fn touch_fs(fs: &mut MockDir, path: &std::path::Path, now: SystemTime) -> st } } else { match occupied_entry.into_mut() { - MockDirEntry::File(..) => Err(std::io::Error::new( - std::io::ErrorKind::Other, - "touch file below file", - )), + MockDirEntry::File(..) => { + Err(std::io::Error::other("touch file below file")) + } MockDirEntry::Dir(subdir) => touch_fs(subdir, rest, now), } } diff --git a/werk-cli/Cargo.toml b/werk-cli/Cargo.toml index aa91624d..7a35695d 100644 --- a/werk-cli/Cargo.toml +++ b/werk-cli/Cargo.toml @@ -12,7 +12,7 @@ path = "main.rs" [dependencies] ahash.workspace = true -annotate-snippets = "0.11.5" +annotate-snippets.workspace = true anstream.workspace = true anstyle-query = "1.1.2" anyhow = "1.0.93" @@ -23,7 +23,7 @@ line-span = "0.1.5" num_cpus = "1.16.0" owo-colors = "4.1.0" parking_lot.workspace = true -shadow-rs = "1.1.1" +shadow-rs = "1.4.0" smol.workspace = true thiserror.workspace = true toml_edit.workspace = true @@ -36,7 +36,7 @@ werk-util.workspace = true anstyle = "1.0.10" serde.workspace = true serde_json = "1.0.137" -notify-debouncer-full = "0.5.0" +notify-debouncer-full = "0.6.0" ctrlc = { version = "3.4.5", features = ["termination"] } futures.workspace = true libc = "0.2.169" @@ -44,11 +44,14 @@ clap_complete = { version = "4.5.44", features = ["unstable-dynamic"] } [target.'cfg(windows)'.dependencies] # Needed to get terminal width. -windows-sys = { version = "0.59.0", features = [ +windows-sys = { version = "0.61.2", features = [ "Win32_System_Console", "Win32_Foundation", + "Win32_Security", + "Win32_Storage", + "Win32_Storage_FileSystem", ] } [build-dependencies] -shadow-rs = "0.38.0" +shadow-rs = "1.4.0" diff --git a/werk-cli/render/ansi.rs b/werk-cli/render/ansi.rs index 812fe3fd..365472d5 100644 --- a/werk-cli/render/ansi.rs +++ b/werk-cli/render/ansi.rs @@ -353,7 +353,6 @@ impl Renderer { fn warning(&mut self, _task_id: Option, warning: &Warning) { // TODO: Dedup warnings based on span and ID. - let diagnostic = warning.as_diagnostic(); // TODO: Get the term width. let renderer = annotate_snippets::Renderer::styled(); @@ -362,7 +361,7 @@ impl Renderer { out, "{} {}", "[warn]".bright_yellow(), - diagnostic.display(&state.source_map, &renderer) + renderer.render(&warning.as_diagnostic(&state.source_map)) ) }); } diff --git a/werk-fs/path.rs b/werk-fs/path.rs index 94329a37..815bafca 100644 --- a/werk-fs/path.rs +++ b/werk-fs/path.rs @@ -257,7 +257,7 @@ impl Path { #[inline] #[must_use] - pub fn ancestors(&self) -> Ancestors { + pub fn ancestors(&self) -> Ancestors<'_> { Ancestors { path: Some(self) } } @@ -401,7 +401,7 @@ impl Path { #[inline] #[must_use] - pub fn components(&self) -> Components { + pub fn components(&self) -> Components<'_> { Components { path: Some(self) } } @@ -433,7 +433,7 @@ impl Path { } #[inline] - pub fn normalize(&self) -> Result>, PathError> { + pub fn normalize(&self) -> Result>, PathError> { Normalize::normalize(self).map_err(Into::into) } } diff --git a/werk-fs/traits.rs b/werk-fs/traits.rs index 353a20e7..e2440c5b 100644 --- a/werk-fs/traits.rs +++ b/werk-fs/traits.rs @@ -88,10 +88,7 @@ impl<'a> Normalize<'a> for &'a std::path::Path { std::path::Component::CurDir => {} std::path::Component::ParentDir => { if !buf.pop() { - return Err(std::io::Error::new( - std::io::ErrorKind::Other, - TooManyParents, - )); + return Err(std::io::Error::other(TooManyParents)); } } _ => buf.push(c), diff --git a/werk-parser/error.rs b/werk-parser/error.rs index 6324b7d3..15f7567a 100644 --- a/werk-parser/error.rs +++ b/werk-parser/error.rs @@ -1,6 +1,7 @@ use std::sync::Arc; -use werk_util::{AnnotateLevelExt, DiagnosticFileId, Level, Offset, Span}; +use annotate_snippets::{AnnotationKind, Snippet}; +use werk_util::{DiagnosticFileId, DiagnosticSourceMap, Level, Offset, Span}; use winnow::{error::AddContext, stream::Location}; use crate::parser::{Input, Parser}; @@ -83,108 +84,51 @@ pub struct ErrorInFile { } impl> werk_util::AsDiagnostic for ErrorInFile { - fn as_diagnostic(&self) -> werk_util::Diagnostic { - let level = Level::Error; - let file_id = self.file; + fn as_diagnostic<'a>( + &'a self, + source_map: &'a dyn DiagnosticSourceMap, + ) -> Vec> { let error = self.error.as_ref(); - let context = error - .context - .as_ref() - .map(|context| { - context.iter().filter_map(|(offset, c)| match c { - ErrContext::WhileParsing(thing) => Some(werk_util::DiagnosticAnnotation { - span: offset.to_span().with_file(file_id), - level: Level::Info, - message: format!("while parsing {thing}"), - }), - ErrContext::Note(note) => Some(werk_util::DiagnosticAnnotation { - span: offset.to_span().with_file(file_id), - level: Level::Note, - message: (*note).to_string(), - }), - _ => None, - }) - }) - .into_iter() - .flatten(); - - let hints = error - .context - .as_ref() - .map(|context| { - context.iter().filter_map(|c| { - if let ErrContext::Hint(h) = c.1 { - Some(h.to_string()) - } else { - None - } - }) - }) - .into_iter() - .flatten(); - - let span = error.span().with_file(file_id); - - match error.fail { - Failure::Unknown => { - level - .diagnostic("P9999") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, "no error message; this is a parser bug"), - ))) - } - Failure::Expected(expected) => level - .diagnostic("P1001") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, format_args!("expected {expected}")), - ))), - Failure::Unexpected(unexpected) => level - .diagnostic("P2001") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, format_args!("unexpected {unexpected}")), - ))), - Failure::ExpectedKeyword(expected) => level - .diagnostic("P1002") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, format_args!("expected keyword `{expected}`")), - ))), - Failure::InvalidEscapeChar(ch) => level - .diagnostic("P1003") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, format_args!("invalid escape sequence: '{ch}'")), - ))), - Failure::InvalidInterpolationOp => level - .diagnostic("P1004") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, "invalid interpolation operator"), - ))), - Failure::ExpectedChar(ch) => level - .diagnostic("P1005") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, format_args!("expected character {ch}")), - ))), - Failure::ValidRegex(ref error) => level - .diagnostic("P0100") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, format_args!("invalid regex pattern: {error}")), - ))), - Failure::ParseInt(ref parse_int_error) => level - .diagnostic("P0101") - .title("parse error") - .annotations(context.chain(Some( - span.annotation(level, format_args!("invalid integer: {parse_int_error}")), - ))), - } - .footers(hints) + let source = source_map + .get_source(self.file) + .expect("input file is not in the source map"); + let group = Level::ERROR + .primary_title("parse error") + .id(error.fail.id()) + .element( + Snippet::source(source.source) + .path(source.file) + .annotation( + AnnotationKind::Primary + .span(error.span().into()) + .label(error.fail.to_string()), + ) + .annotations(error.context().iter().filter_map(|(offset, c)| { + match c { + ErrContext::WhileParsing(thing) => Some( + AnnotationKind::Context + .span(offset.to_span().into()) + .label(format!("while parsing {thing}")), + ), + ErrContext::Note(note) => Some( + AnnotationKind::Context + .span(offset.to_span().into()) + .label((*note).to_string()), + ), + _ => None, + } + })), + ) + .elements(error.context().iter().filter_map(|(_offset, c)| { + if let ErrContext::Hint(note) = c { + Some(Level::HELP.message(*note)) + } else { + None + } + })); + + vec![group] } } @@ -219,6 +163,24 @@ pub enum Failure { ParseInt(#[from] std::num::ParseIntError), } +impl Failure { + #[inline] + #[must_use] + pub fn id(&self) -> &'static str { + match self { + Failure::Unknown => "P9999", + Failure::Expected(_) => "P1001", + Failure::Unexpected(_) => "P2001", + Failure::ExpectedKeyword(_) => "P1002", + Failure::InvalidEscapeChar(_) => "P1003", + Failure::InvalidInterpolationOp => "P1004", + Failure::ExpectedChar(_) => "P1005", + Failure::ValidRegex(_) => "P0100", + Failure::ParseInt(_) => "P0101", + } + } +} + impl winnow::error::FromExternalError, std::num::ParseIntError> for ModalErr { #[inline] fn from_external_error(input: &Input<'_>, e: std::num::ParseIntError) -> Self { diff --git a/werk-parser/tests/fail/build_ident_name.txt b/werk-parser/tests/fail/build_ident_name.txt index 9941c0c3..8586ea15 100644 --- a/werk-parser/tests/fail/build_ident_name.txt +++ b/werk-parser/tests/fail/build_ident_name.txt @@ -1,10 +1,10 @@ error[P1001]: parse error - --> INPUT:1:1 + --> INPUT:1:7 | 1 | build foo {} | - ^ expected pattern literal | | - | info: while parsing build recipe + | while parsing build recipe | = help: `build` must be followed by a pattern literal = help: use string interpolation to use variables in recipe names diff --git a/werk-parser/tests/fail/default_invalid_value.txt b/werk-parser/tests/fail/default_invalid_value.txt index a2009e25..44a8c053 100644 --- a/werk-parser/tests/fail/default_invalid_value.txt +++ b/werk-parser/tests/fail/default_invalid_value.txt @@ -3,4 +3,3 @@ error[P1001]: parse error | 1 | default target = hello | ^ expected string literal - | diff --git a/werk-parser/tests/fail/expr_trailing_pipe.txt b/werk-parser/tests/fail/expr_trailing_pipe.txt index 8c67f360..70173434 100644 --- a/werk-parser/tests/fail/expr_trailing_pipe.txt +++ b/werk-parser/tests/fail/expr_trailing_pipe.txt @@ -1,9 +1,9 @@ error[P1001]: parse error - --> INPUT:1:1 + --> INPUT:1:17 | 1 | let foo = bar | | - ^ expected a chaining expression | | - | info: while parsing `let` statement + | while parsing `let` statement | = help: one of `join`, `flatten`, `map`, `match`, `env`, `glob`, `which`, `shell`, a string, or a sub-expression in parentheses diff --git a/werk-parser/tests/fail/invalid_escape.txt b/werk-parser/tests/fail/invalid_escape.txt index a9ec898b..803323f4 100644 --- a/werk-parser/tests/fail/invalid_escape.txt +++ b/werk-parser/tests/fail/invalid_escape.txt @@ -1,9 +1,8 @@ error[P1003]: parse error - --> INPUT:1:9 + --> INPUT:1:12 | 1 | let a = "\p" | - - ^ invalid escape sequence: 'p' | | | - | | info: while parsing string literal - | info: while parsing `let` statement - | + | | while parsing string literal + | while parsing `let` statement diff --git a/werk-parser/tests/fail/let_no_eq.txt b/werk-parser/tests/fail/let_no_eq.txt index 9e76a8b3..f7127ef2 100644 --- a/werk-parser/tests/fail/let_no_eq.txt +++ b/werk-parser/tests/fail/let_no_eq.txt @@ -1,9 +1,9 @@ error[P1005]: parse error - --> INPUT:1:1 + --> INPUT:1:11 | 1 | let hello | - ^ expected character = | | - | info: while parsing `let` statement + | while parsing `let` statement | = help: `let ` must be followed by a `=` diff --git a/werk-parser/tests/fail/let_no_ident.txt b/werk-parser/tests/fail/let_no_ident.txt index a37b7e7a..c56b448d 100644 --- a/werk-parser/tests/fail/let_no_ident.txt +++ b/werk-parser/tests/fail/let_no_ident.txt @@ -1,9 +1,9 @@ error[P1001]: parse error - --> INPUT:1:1 + --> INPUT:1:5 | 1 | let = "hello" | - ^ expected identifier | | - | info: while parsing `let` statement + | while parsing `let` statement | = help: `let` must be followed by an identifier diff --git a/werk-parser/tests/fail/let_no_value.txt b/werk-parser/tests/fail/let_no_value.txt index 06b7bd07..791bd4e7 100644 --- a/werk-parser/tests/fail/let_no_value.txt +++ b/werk-parser/tests/fail/let_no_value.txt @@ -1,9 +1,9 @@ error[P1001]: parse error - --> INPUT:1:1 + --> INPUT:1:11 | 1 | let foo = | - ^ expected expression | | - | info: while parsing `let` statement + | while parsing `let` statement | = help: expressions must start with a value, or an `env`, `glob`, `which`, or `shell` operation diff --git a/werk-parser/tests/fail/match_no_arrow.txt b/werk-parser/tests/fail/match_no_arrow.txt index bd482538..5b877635 100644 --- a/werk-parser/tests/fail/match_no_arrow.txt +++ b/werk-parser/tests/fail/match_no_arrow.txt @@ -1,10 +1,10 @@ error[P1002]: parse error - --> INPUT:1:17 + --> INPUT:1:31 | 1 | let foo = bar | match { "foo" } | - - ^ expected keyword `=>` | | | - | | info: while parsing match - | info: while parsing `let` statement + | | while parsing match + | while parsing `let` statement | = help: pattern must be followed by `=>` in `match` diff --git a/werk-parser/tests/fail/match_unterminated.txt b/werk-parser/tests/fail/match_unterminated.txt index 7beaebd8..bedfeac6 100644 --- a/werk-parser/tests/fail/match_unterminated.txt +++ b/werk-parser/tests/fail/match_unterminated.txt @@ -1,10 +1,10 @@ error[P1001]: parse error - --> INPUT:1:17 + --> INPUT:1:25 | 1 | let foo = bar | match { | - - ^ expected pattern literal | | | - | | info: while parsing match - | info: while parsing `let` statement + | | while parsing match + | while parsing `let` statement | = help: `match` arm must start with a pattern diff --git a/werk-parser/tests/fail/spawn_in_build_recipe.txt b/werk-parser/tests/fail/spawn_in_build_recipe.txt index 8c43171f..18236672 100644 --- a/werk-parser/tests/fail/spawn_in_build_recipe.txt +++ b/werk-parser/tests/fail/spawn_in_build_recipe.txt @@ -1,8 +1,8 @@ error[P1001]: parse error - --> INPUT:1:1 + --> INPUT:2:5 | 1 | build "foo" { - | - info: while parsing build recipe + | - while parsing build recipe 2 | spawn "bar" | ^ expected build recipe statement | diff --git a/werk-parser/tests/fail/spawn_in_build_recipe_run_block.txt b/werk-parser/tests/fail/spawn_in_build_recipe_run_block.txt index bb628d99..731d7070 100644 --- a/werk-parser/tests/fail/spawn_in_build_recipe_run_block.txt +++ b/werk-parser/tests/fail/spawn_in_build_recipe_run_block.txt @@ -1,10 +1,10 @@ error[P2001]: parse error - --> INPUT:2:5 + --> INPUT:3:9 | 1 | build "foo" { - | - info: while parsing build recipe + | - while parsing build recipe 2 | run { - | - info: while parsing run + | - while parsing run 3 | spawn "bar" | ^ unexpected spawn statement | diff --git a/werk-parser/tests/fail/task_string_name.txt b/werk-parser/tests/fail/task_string_name.txt index b03f8aa4..07d5f9c6 100644 --- a/werk-parser/tests/fail/task_string_name.txt +++ b/werk-parser/tests/fail/task_string_name.txt @@ -1,9 +1,9 @@ error[P1001]: parse error - --> INPUT:1:1 + --> INPUT:1:6 | 1 | task "hello" {} | - ^ expected identifier | | - | info: while parsing task recipe + | while parsing task recipe | = help: `task` must be followed by an identifier diff --git a/werk-runner/Cargo.toml b/werk-runner/Cargo.toml index 60dc7b0a..edde224d 100644 --- a/werk-runner/Cargo.toml +++ b/werk-runner/Cargo.toml @@ -16,7 +16,7 @@ tracing.workspace = true parking_lot.workspace = true indexmap.workspace = true futures.workspace = true -which = "7.0.0" +which = "8.0.0" globset = "0.4.15" walkdir = "2.5.0" ahash = "0.8.11" diff --git a/werk-runner/error.rs b/werk-runner/error.rs index f07f127f..c3dcf0ea 100644 --- a/werk-runner/error.rs +++ b/werk-runner/error.rs @@ -1,7 +1,8 @@ use std::sync::Arc; +use annotate_snippets::{AnnotationKind, Snippet}; use werk_fs::Absolute; -use werk_util::{AnnotateLevelExt, DiagnosticFileId, DiagnosticSpan, Level}; +use werk_util::{DiagnosticFileId, DiagnosticSourceMap, DiagnosticSpan, Level}; use crate::{OwnedDependencyChain, ShellCommandLine, TaskId, Value, depfile::DepfileError}; @@ -151,11 +152,12 @@ impl From for Error { } impl werk_util::AsDiagnostic for Error { - fn as_diagnostic(&self) -> werk_util::Diagnostic { - let level = Level::Error; - + fn as_diagnostic<'a>( + &'a self, + source_map: &'a dyn DiagnosticSourceMap, + ) -> Vec> { let id = match self { - Error::Eval(eval_error) => return eval_error.as_diagnostic(), + Error::Eval(eval_error) => return eval_error.as_diagnostic(source_map), Error::Io(..) => "R0001", Error::CommandNotFound(..) => "R0002", Error::NoRuleToBuildTarget(..) => "R0003", @@ -177,16 +179,36 @@ impl werk_util::AsDiagnostic for Error { Error::Custom(..) => "R9999", }; - let diag = level.diagnostic(id).title(self); // Use the Display impl from thiserror. + // Use the Display impl from thiserror. + let mut diag = vec![annotate_snippets::Group::with_title( + Level::ERROR.primary_title(self.to_string()).id(id), + )]; // Additional context and help - match self { - Error::AmbiguousPattern(err) => diag.annotations([ - err.pattern1.annotation(Level::Note, "first pattern here"), - err.pattern2.annotation(Level::Note, "second pattern here"), - ]), - _ => diag, + if let Error::AmbiguousPattern(err) = self { + let first_source = source_map + .get_source(err.pattern1.file) + .expect("valid file ID"); + let second_source = source_map + .get_source(err.pattern2.file) + .expect("valid file ID"); + diag.push( + Level::NOTE.secondary_title("first pattern here").element( + Snippet::source(first_source.source) + .path(first_source.file) + .annotation(AnnotationKind::Context.span(err.pattern1.span.into())), + ), + ); + diag.push( + Level::NOTE.secondary_title("second pattern here").element( + Snippet::source(second_source.source) + .path(second_source.file) + .annotation(AnnotationKind::Context.span(err.pattern2.span.into())), + ), + ); } + + diag } } @@ -335,8 +357,8 @@ pub enum EvalError { ), #[error("`default` statements are not allowed in included files")] DefaultInInclude(DiagnosticSpan), - #[error("{1}")] - Parse(DiagnosticFileId, werk_parser::Error), + #[error("{}", .0.error)] + Parse(werk_parser::ErrorInFile), } /// Error in an `include` statement. @@ -392,15 +414,18 @@ impl EvalError { | EvalError::IncludeError(span, ..) | EvalError::IncludeDuplicate(span, ..) | EvalError::DefaultInInclude(span) => *span, - EvalError::Parse(file, err) => file.span(err.span()), + EvalError::Parse(err) => err.file.span(err.error.span()), } } } impl werk_util::AsDiagnostic for EvalError { - fn as_diagnostic(&self) -> werk_util::Diagnostic { - let level = Level::Error; + fn as_diagnostic<'a>( + &'a self, + source_map: &'a dyn DiagnosticSourceMap, + ) -> Vec> { let span = self.span(); + let source = source_map.get_source(span.file).expect("valid file ID"); let id = match self { EvalError::InvalidEdition(..) => "E0001", @@ -440,38 +465,65 @@ impl werk_util::AsDiagnostic for EvalError { EvalError::AssertCustomFailed(..) => "E0031", EvalError::AmbiguousPathResolution(..) => "E0032", EvalError::IncludeError(_, err) => { - return err - .as_diagnostic() - .annotation(span.annotation(Level::Note, "included here")); + let mut groups = err.as_diagnostic(source_map); + groups.push( + Level::NOTE.secondary_title("included here").element( + Snippet::source(source.source) + .path(source.file) + .annotation(AnnotationKind::Primary.span(span.span.into())), + ), + ); + return groups; } EvalError::IncludeDuplicate(..) => "E0035", EvalError::DefaultInInclude(..) => "E0036", - EvalError::Parse(file, err) => { - return err.with_file_ref(*file).as_diagnostic(); + EvalError::Parse(err) => { + return err.as_diagnostic(source_map); } }; - let diag = level - .diagnostic(id) - .title(self) // Use the `Display` implementation from thiserror. - .annotation(span.annotation(level, self)); + let title = self.to_string(); + + let diag = Level::ERROR + .primary_title(title.clone()) // Use the `Display` implementation from thiserror. + .id(id) + .element( + Snippet::source(source.source) + .path(source.file) + .annotation(AnnotationKind::Primary.span(span.span.into()).label(title)), + ); // Help messages and additional context. - match self { - EvalError::NoSuchCaptureGroup(..) => diag.footer( + let diag = match self { + EvalError::NoSuchCaptureGroup(..) => diag.element(Level::HELP.message( "pattern capture groups are zero-indexed, starting from 0", - ), - EvalError::AmbiguousPathResolution(_, err) => diag - .annotation(err.build_recipe.annotation(Level::Note, "matched this build recipe")) - .footer("use `<...:out-dir>` or `<...:workspace>` to disambiguate between paths in the workspace and the output directory"), - EvalError::DuplicateConfigStatement(_, previous_span) => diag - .annotation(previous_span.annotation(Level::Note, "previous config statement here")), - EvalError::ExpectedInt(..) => diag.footer("integers are stringly typed in array index operations, so \"0\" is the first element"), - EvalError::IndexOutOfBounds(..) => diag.footer("arrays are indexed from zero, and negative indices refer to elements from the end of the array"), - EvalError::IncludeDuplicate(_, Some(previous_span), _) => diag.annotation(previous_span.annotation(Level::Note, "already included here")), - EvalError::DefaultInInclude(_) => diag.footer("move `default` statements to the top-level Werkfile"), + )), + EvalError::AmbiguousPathResolution(_, err) => { + let previous_definition_file = source_map.get_source(err.build_recipe.file).expect("invalid file ID"); + diag + .element( + Snippet::source(previous_definition_file.source) + .path(previous_definition_file.file) + .annotation(AnnotationKind::Context.span(err.build_recipe.span.into()).label("matched this build recipe"))) + .element(Level::HELP.message("use `<...:out-dir>` or `<...:workspace>` to disambiguate between paths in the workspace and the output directory")) + }, + EvalError::DuplicateConfigStatement(_, previous_span) => { + let previous_definition_file = source_map.get_source(previous_span.file).expect("invalid file ID"); + diag + .element(Snippet::source(previous_definition_file.source).path(previous_definition_file.file).annotation(AnnotationKind::Context.span(previous_span.span.into()).label("previous config statement here"))) + }, + EvalError::ExpectedInt(..) => diag.element(Level::HELP.message("integers are stringly typed in array index operations, so \"0\" is the first element")), + EvalError::IndexOutOfBounds(..) => diag.element(Level::HELP.message("arrays are indexed from zero, and negative indices refer to elements from the end of the array")), + EvalError::IncludeDuplicate(_, Some(previous_span), _) => { + let previous_definition_file = source_map.get_source(previous_span.file).expect("invalid file ID"); + diag + .element(Snippet::source(previous_definition_file.source).path(previous_definition_file.file).annotation(AnnotationKind::Context.span(previous_span.span.into()).label("already included here"))) + }, + EvalError::DefaultInInclude(_) => diag.element(Level::HELP.message("move `default` statements to the top-level Werkfile")), _ => diag, - } + }; + + vec![diag] } } diff --git a/werk-runner/eval/string.rs b/werk-runner/eval/string.rs index 8113d2c6..b3275eab 100644 --- a/werk-runner/eval/string.rs +++ b/werk-runner/eval/string.rs @@ -557,7 +557,7 @@ fn eval_string_interpolation_stem( scope: &P, span: DiagnosticSpan, stem: ast::InterpolationStem, -) -> Result { +) -> Result, EvalError> { Ok(match stem { ast::InterpolationStem::Implied => scope .get(Lookup::Implied) diff --git a/werk-runner/runner.rs b/werk-runner/runner.rs index 7c0fcd5e..94aab2f9 100644 --- a/werk-runner/runner.rs +++ b/werk-runner/runner.rs @@ -8,8 +8,8 @@ use werk_util::{Annotated, AsDiagnostic, DiagnosticSpan, Symbol, cancel}; use crate::{ AmbiguousPatternError, BuildRecipeScope, ChildCaptureOutput, ChildLinesStream, Env, Error, - Outdatedness, OutdatednessTracker, Reason, Scope as _, ShellCommandLine, TaskRecipeScope, - Value, Warning, Workspace, WorkspaceSettings, + Outdatedness, OutdatednessTracker, Reason, Scope as _, ShellCommandLine, StringValue, + TaskRecipeScope, Value, Warning, Workspace, WorkspaceSettings, depfile::Depfile, eval::{self, Eval}, ir, @@ -368,6 +368,7 @@ impl<'a> Inner<'a> { } #[tracing::instrument(level = "debug", skip_all, fields(target_file))] + #[allow(clippy::too_many_lines)] async fn execute_build_recipe( self: &Arc, task_id: TaskId, @@ -422,77 +423,16 @@ impl<'a> Inner<'a> { let mut check_implicit_depfile_was_generated = None; if let Some(depfile) = evaluated.depfile { - let depfile_path = werk_fs::Path::new(&depfile) - .and_then(|p| p.absolutize(werk_fs::Path::ROOT)) - .map_err(|err| Error::InvalidTargetPath(depfile.string.clone(), err))?; - let dep = self.get_depfile_build_spec(&depfile_path)?; - - // Make the `depfile` variable available to the recipe body. - scope.set( - Symbol::from("depfile"), - Eval::inherent(Value::String(depfile.clone())), - ); - - match dep { - DepfileSpec::Recipe(depfile_recipe_match_data) => { - tracing::debug!( - "Building depfile with recipe: {}", - depfile_recipe_match_data.recipe.pattern - ); - // Depfile is explicitly generated by a recipe - build it. - let dep_reasons = self - .clone() - .build_dependencies( - vec![TaskSpec::Recipe(ir::RecipeMatch::Build( - depfile_recipe_match_data, - ))], - dep_chain, - out_mtime, - ) - .await?; - outdatedness.add_reasons(dep_reasons); - } - DepfileSpec::ImplicitlyGenerated(path_buf) => { - tracing::debug!("Assuming implicitly generated depfile"); - check_implicit_depfile_was_generated = Some(path_buf); - } - } - let is_implicit_depfile = check_implicit_depfile_was_generated.is_some(); - - if let Some(depfile_entry) = self.workspace.get_existing_output_file(&depfile_path)? { - // The depfile was generated, either by a build recipe or by a - // previous run of this recipe. Parse it and add its - // dependencies! - tracing::debug!("Parsing depfile: {}", depfile_entry.path.display()); - let depfile_contents = self.workspace.io.read_file(&depfile_entry.path)?; - let depfile = Depfile::parse(&depfile_contents)?; - for dep in &depfile.deps { - // Translate the filesystem path produced by the compiler into an - // abstract path within the workspace. Normally this will be a file - // inside the output directory. - let dep = dep.as_path().normalize()?; - let abstract_path = self.workspace.unresolve_path(&dep).map_err(|err| { - Error::InvalidPathInDepfile(dep.display().to_string(), err) - })?; - tracing::debug!("Discovered depfile dependency: {abstract_path}"); - explicit_dependency_specs.push(self.get_build_spec_relaxed(&abstract_path)?); - } - } else if is_implicit_depfile { - // The implicit depfile was not generated yet, in this run - // or a previous run. Add that as a reason to rebuild the - // main recipe. Note that this causes the main recipe to - // always be outdated if it fails to generate the depfile! - outdatedness.add_reason(Reason::Missing(Absolute::symbolicate(depfile_path))); - } else { - // If the depfile is generated by a rule, it is an error if that - // rule did not generate the depfile. If it is implicit, it's - // fine if it doesn't exist yet. - if !self.workspace.io.is_dry_run() { - return Err(Error::DepfileNotFound( - depfile_path.into_owned().into_inner(), - )); - } - } + check_implicit_depfile_was_generated = self + .build_or_check_depfile( + &mut scope, + &depfile, + &mut explicit_dependency_specs, + dep_chain, + out_mtime, + &mut outdatedness, + ) + .await?; } // Build dependencies! @@ -556,6 +496,93 @@ impl<'a> Inner<'a> { result } + async fn build_or_check_depfile( + self: &Arc, + scope: &mut BuildRecipeScope<'_>, + depfile: &StringValue, + explicit_dependency_specs: &mut Vec>, + dep_chain: DepChainEntry<'_>, + out_mtime: Option, + outdatedness: &mut OutdatednessTracker<'_>, + ) -> Result>, Error> { + let mut check_implicit_depfile_was_generated = None; + + let depfile_path = werk_fs::Path::new(depfile) + .and_then(|p| p.absolutize(werk_fs::Path::ROOT)) + .map_err(|err| Error::InvalidTargetPath(depfile.string.clone(), err))?; + let dep = self.get_depfile_build_spec(&depfile_path)?; + + // Make the `depfile` variable available to the recipe body. + scope.set( + Symbol::from("depfile"), + Eval::inherent(Value::String(depfile.clone())), + ); + + match dep { + DepfileSpec::Recipe(depfile_recipe_match_data) => { + tracing::debug!( + "Building depfile with recipe: {}", + depfile_recipe_match_data.recipe.pattern + ); + // Depfile is explicitly generated by a recipe - build it. + let dep_reasons = self + .clone() + .build_dependencies( + vec![TaskSpec::Recipe(ir::RecipeMatch::Build( + depfile_recipe_match_data, + ))], + dep_chain, + out_mtime, + ) + .await?; + outdatedness.add_reasons(dep_reasons); + } + DepfileSpec::ImplicitlyGenerated(path_buf) => { + tracing::debug!("Assuming implicitly generated depfile"); + check_implicit_depfile_was_generated = Some(path_buf); + } + } + let is_implicit_depfile = check_implicit_depfile_was_generated.is_some(); + + if let Some(depfile_entry) = self.workspace.get_existing_output_file(&depfile_path)? { + // The depfile was generated, either by a build recipe or by a + // previous run of this recipe. Parse it and add its + // dependencies! + tracing::debug!("Parsing depfile: {}", depfile_entry.path.display()); + let depfile_contents = self.workspace.io.read_file(&depfile_entry.path)?; + let depfile = Depfile::parse(&depfile_contents)?; + for dep in &depfile.deps { + // Translate the filesystem path produced by the compiler into an + // abstract path within the workspace. Normally this will be a file + // inside the output directory. + let dep = dep.as_path().normalize()?; + let abstract_path = self + .workspace + .unresolve_path(&dep) + .map_err(|err| Error::InvalidPathInDepfile(dep.display().to_string(), err))?; + tracing::debug!("Discovered depfile dependency: {abstract_path}"); + explicit_dependency_specs.push(self.get_build_spec_relaxed(&abstract_path)?); + } + } else if is_implicit_depfile { + // The implicit depfile was not generated yet, in this run + // or a previous run. Add that as a reason to rebuild the + // main recipe. Note that this causes the main recipe to + // always be outdated if it fails to generate the depfile! + outdatedness.add_reason(Reason::Missing(Absolute::symbolicate(depfile_path))); + } else { + // If the depfile is generated by a rule, it is an error if that + // rule did not generate the depfile. If it is implicit, it's + // fine if it doesn't exist yet. + if !self.workspace.io.is_dry_run() { + return Err(Error::DepfileNotFound( + depfile_path.into_owned().into_inner(), + )); + } + } + + Ok(check_implicit_depfile_was_generated) + } + async fn execute_task_recipe( self: &Arc, task_id: TaskId, diff --git a/werk-runner/value.rs b/werk-runner/value.rs index 54842a20..870f5679 100644 --- a/werk-runner/value.rs +++ b/werk-runner/value.rs @@ -486,7 +486,7 @@ impl Value { } #[must_use] - pub fn display_friendly(&self, max_width: usize) -> DisplayFriendly { + pub fn display_friendly(&self, max_width: usize) -> DisplayFriendly<'_> { DisplayFriendly(self, max_width) } } diff --git a/werk-runner/warning.rs b/werk-runner/warning.rs index 4cf48f88..fb4d915f 100644 --- a/werk-runner/warning.rs +++ b/werk-runner/warning.rs @@ -1,5 +1,6 @@ +use annotate_snippets::{AnnotationKind, Snippet}; use werk_fs::Absolute; -use werk_util::{AnnotateLevelExt as _, DiagnosticSpan, Level}; +use werk_util::{DiagnosticSourceMap, DiagnosticSpan, Level}; #[derive(Clone, Debug, thiserror::Error)] pub enum Warning { @@ -27,70 +28,86 @@ pub enum Warning { ZombieChild, } -impl werk_util::AsDiagnostic for Warning { - fn as_diagnostic(&self) -> werk_util::Diagnostic { - let level = Level::Warning; - +impl Warning { + #[must_use] + pub fn id(&self) -> &'static str { match self { - Warning::NoPatternStem(span) => level - .diagnostic("W0010") - .annotation(span.annotation(level, - "this string uses `%`, but it will evaluate to an empty string", - )) - .footer("perhaps you meant to escape the literal character: `\\%`"), - Warning::NoImpliedValue(span) => level - .diagnostic("W0011") - .annotation(span.annotation(level, - - "this string uses the implicit value `{}` or `<>`, but the current expression has no implicit value", - )).footer("use an expression chain `lhs | rhs` to introduce an implicit value"), - Warning::IgnoringUnresolvedPath(span, path) => level - .diagnostic("W0020") - .annotation(span.annotation(level, + Warning::NoPatternStem(_) => "W0010", + Warning::NoImpliedValue(_) => "W0011", + Warning::IgnoringUnresolvedPath(_, _) => "W0020", + Warning::IgnoringNonAbsolutePath(_, _) => "W0021", + Warning::IgnoringPathOutsideOutputDirectory(_, _) => "W0022", + Warning::IgnoringFileNotFound(_, _) => "W0023", + Warning::DepfileNotGenerated(_, _) => "W0030", + Warning::WarningExpression(_, _) => "W9999", + Warning::UnusedDefine(_) => "W1000", + Warning::OutputDirectoryChanged(..) => "W1001", + Warning::ZombieChild => "W1002", + } + } - format!("path `{path}` is not resolved"), - )), - Warning::IgnoringNonAbsolutePath(span, path_buf) => level - .diagnostic("W0021") - .annotation(span.annotation(level, + #[must_use] + pub fn span(&self) -> Option { + match self { + Warning::NoPatternStem(span) + | Warning::NoImpliedValue(span) + | Warning::IgnoringUnresolvedPath(span, _) + | Warning::IgnoringNonAbsolutePath(span, _) + | Warning::IgnoringPathOutsideOutputDirectory(span, _) + | Warning::IgnoringFileNotFound(span, _) + | Warning::DepfileNotGenerated(span, _) + | Warning::WarningExpression(span, _) => Some(*span), + Warning::UnusedDefine(_) + | Warning::OutputDirectoryChanged(..) + | Warning::ZombieChild => None, + } + } +} - format!("path `{}` is not absolute", path_buf.display()), - )) - .footer("use \"<...>\" to convert abstract paths to native OS paths"), - Warning::IgnoringPathOutsideOutputDirectory(span, absolute) => level - .diagnostic("W0022") - .annotation(span.annotation(level, +impl werk_util::AsDiagnostic for Warning { + fn as_diagnostic<'a>( + &'a self, + source_map: &'a dyn DiagnosticSourceMap, + ) -> Vec> { + let title = Level::WARNING.primary_title(self.to_string()).id(self.id()); + let span = self.span(); + let source = span.map(|span| source_map.get_source(span.file).expect("invalid file ID")); + let snippet = source.map(|source| Snippet::source(source.source).path(source.file)); - format!("path `{}` is outside the output directory", absolute.display()), - )) - .footer("use \"<...:out-dir>\" to unambiguously produce an absolute path in the output directory"), - Warning::IgnoringFileNotFound(span, absolute) => level - .diagnostic("W0023") - .annotation(span.annotation(level, + let group = match self { + Warning::NoPatternStem(span) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label("this string uses `%`, but it will evaluate to an empty string"))).element(Level::HELP.message("perhaps you meant to escape the literal character: `\\%`")) + }, + Warning::NoImpliedValue(span) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label("this string uses the implicit value `{}` or `<>`, but the current expression has no implicit value"))).element(Level::HELP.message("use an expression chain `lhs | rhs` to introduce an implicit value")) + } + Warning::IgnoringUnresolvedPath(span, path) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label(format!("path `{path}` is not resolved")))) + } + Warning::IgnoringNonAbsolutePath(span, path_buf) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label(format!("path `{}` is not absolute", path_buf.display())))).element(Level::HELP.message("use \"<...>\" to convert abstract paths to native OS paths")) + } + Warning::IgnoringPathOutsideOutputDirectory(span, absolute) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label(format!("path `{}` is outside the output directory", absolute.display())))).element(Level::HELP.message("use \"<...:out-dir>\" to unambiguously produce an absolute path in the output directory")) + } + Warning::IgnoringFileNotFound(span, absolute) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label(format!("file `{}` not found", absolute.display())))) + } + Warning::DepfileNotGenerated(span, absolute) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label(format!("depfile `{}` was not generated", absolute.display())))) + .element(Level::HELP.message("pass `-MMD`, `-MF`, or similar flags to your compiler to implicitly generate a depfile, or add a recipe to generate the depfile")) + } + Warning::WarningExpression(span, message) => { + title.element(snippet.unwrap().annotation(AnnotationKind::Primary.span(span.span.into()).label(message))) + } + Warning::UnusedDefine(key) => { + title.element(Level::HELP.message(format!("no `config` statement exists with the name `{key}`"))) + .element(Level::HELP.message("maybe a `let` statement should be changed to a `config` statement?")) + } - format!("file `{}` not found", absolute.display()), - )), - Warning::DepfileNotGenerated(span, absolute) => level - .diagnostic("W0030") - .annotation(span.annotation(level, + Warning::OutputDirectoryChanged(..) | Warning::ZombieChild => annotate_snippets::Group::with_title(title), + }; - format!("expected this rule to write `{}`", absolute.display()), - )) - .footer( - "pass `-MMD`, `-MF`, or similar flags to your compiler to implicitly generate a depfile",) - .footer( - "or add a recipe to generate the depfile" - ), - Warning::WarningExpression(span, message) => level - .diagnostic("W9999") - .annotation(span.annotation(level, message)), - Warning::UnusedDefine(key) => level - .diagnostic("W1000") - .footer(format_args!("no `config` statement exists with the name `{key}`")) - .footer("maybe a `let` statement should be changed to a `config` statement?"), - Warning::OutputDirectoryChanged(..) => level - .diagnostic("W1001"), - Warning::ZombieChild => level.diagnostic("W1002"), - }.title(self) // Use Display impl from thiserror + vec![group] } } diff --git a/werk-runner/workspace.rs b/werk-runner/workspace.rs index bb929478..e640fd05 100644 --- a/werk-runner/workspace.rs +++ b/werk-runner/workspace.rs @@ -102,7 +102,7 @@ pub struct Workspace { // through the `Io` trait, and never directly. output_directory: Absolute, // Using IndexMap to ensure that the ordering of glob results is well-defined. - workspace_files: IndexMap, DirEntry, ahash::RandomState>, + files: IndexMap, DirEntry, ahash::RandomState>, /// The contents of `/.werk-cache.toml`. werk_cache: Mutex, /// Caches of expensive runtime values (glob, which, env). @@ -169,7 +169,7 @@ impl Workspace { manifest, project_root, output_directory: settings.output_directory.clone(), - workspace_files, + files: workspace_files, werk_cache: Mutex::new(werk_cache), runtime_caches: Mutex::new(Caches { glob_cache: HashMap::default(), @@ -228,7 +228,8 @@ impl Workspace { source: &str, ) -> Result { let file = self.register_werkfile_source(path, source, None)?; - let ast = werk_parser::parse_werk(source).map_err(|err| EvalError::Parse(file, err))?; + let ast = werk_parser::parse_werk(source) + .map_err(|err| EvalError::Parse(werk_parser::ErrorInFile { file, error: err }))?; self.eval_werkfile(file, ast, false) } @@ -333,7 +334,12 @@ impl Workspace { let id = self.register_werkfile_source(&included_file, &source, Some(file.span(stmt.span)))?; werk_parser::parse_werk(&source) - .map_err(|err| EvalError::Parse(id, err)) + .map_err(|err| { + EvalError::Parse(werk_parser::ErrorInFile { + file: id, + error: err, + }) + }) .and_then(|ast| self.eval_werkfile(id, ast, true)) .map_err(|err| match err { EvalError::IncludeDuplicate(..) => err, @@ -484,7 +490,7 @@ impl Workspace { pub fn workspace_files( &self, ) -> impl ExactSizeIterator, &DirEntry)> + '_ { - self.workspace_files.iter() + self.files.iter() } #[inline] @@ -502,7 +508,7 @@ impl Workspace { } pub fn get_project_file(&self, path: &Absolute) -> Option<&DirEntry> { - self.workspace_files.get(path) + self.files.get(path) } pub fn get_existing_project_or_output_file( @@ -579,7 +585,7 @@ impl Workspace { // Note: Workspace files are already sorted. let matches = self - .workspace_files + .files .iter() .filter_map(|(path, entry)| { if entry.metadata.is_file && matcher.is_match(path.as_os_path()) { diff --git a/werk-util/Cargo.toml b/werk-util/Cargo.toml index 2b3d10ef..9a38b54d 100644 --- a/werk-util/Cargo.toml +++ b/werk-util/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] ahash.workspace = true -hashbrown = "0.15.2" +hashbrown = "0.16.1" parking_lot.workspace = true serde.workspace = true annotate-snippets.workspace = true diff --git a/werk-util/diagnostic.rs b/werk-util/diagnostic.rs index e741538c..db563749 100644 --- a/werk-util/diagnostic.rs +++ b/werk-util/diagnostic.rs @@ -3,42 +3,6 @@ use indexmap::{IndexMap, map::Entry}; use crate::DiagnosticSpan; -pub trait AnnotateLevelExt { - fn diagnostic(self, id: &'static str) -> Diagnostic; - fn annotation( - self, - span: impl Into, - message: impl std::fmt::Display, - ) -> DiagnosticAnnotation; -} - -impl AnnotateLevelExt for Level { - #[inline] - #[must_use] - fn diagnostic(self, id: &'static str) -> Diagnostic { - Diagnostic { - id, - level: self, - title: String::new(), - annotations: vec![], - footer: vec![], - } - } - - #[must_use] - fn annotation( - self, - span: impl Into, - message: impl std::fmt::Display, - ) -> DiagnosticAnnotation { - DiagnosticAnnotation { - span: span.into(), - level: self, - message: message.to_string(), - } - } -} - #[derive(Clone, Copy)] pub struct Annotated { pub repository: R, @@ -59,7 +23,7 @@ impl Annotated { &'a self, renderer: &'a annotate_snippets::Renderer, ) -> impl std::fmt::Display + 'a { - self.error.display(&self.repository, renderer) + Display(&self.error, &self.repository, renderer) } } @@ -253,98 +217,11 @@ impl DiagnosticSourceMap for DiagnosticSource<'_> { } } -#[derive(Debug, Clone)] -pub struct Diagnostic { - pub id: &'static str, - pub level: Level, - /// Title on the first line. - pub title: String, - /// Snippets and annotations. - pub annotations: Vec, - /// Help strings in the footer. - pub footer: Vec, -} - -impl Diagnostic { - #[must_use] - pub fn id(mut self, id: &'static str) -> Self { - self.id = id; - self - } - - #[must_use] - pub fn title(mut self, title: impl std::fmt::Display) -> Self { - self.title = title.to_string(); - self - } - - #[must_use] - pub fn annotations( - mut self, - annotations: impl IntoIterator, - ) -> Self { - self.annotations.extend(annotations); - self - } - - #[must_use] - pub fn annotation(mut self, snippet: DiagnosticAnnotation) -> Self { - self.annotations.push(snippet); - self - } - - #[must_use] - pub fn footers(mut self, footers: impl IntoIterator) -> Self { - self.footer.extend(footers); - self - } - - #[must_use] - pub fn footer(mut self, footer: impl std::fmt::Display) -> Self { - self.footer.push(footer.to_string()); - self - } -} - -impl AsRef for Diagnostic { - #[inline] - fn as_ref(&self) -> &Diagnostic { - self - } -} - -impl Diagnostic { - #[inline] - #[must_use] - pub fn new(id: &'static str) -> Self { - Self { - id, - level: Level::Error, - title: String::new(), - annotations: Vec::new(), - footer: Vec::new(), - } - } - - pub fn display<'a>( - &'a self, - source_files: &'a dyn DiagnosticSourceMap, - renderer: &'a annotate_snippets::Renderer, - ) -> impl std::fmt::Display + 'a { - Display(self, source_files, renderer) - } -} - pub trait AsDiagnostic { - fn as_diagnostic(&self) -> Diagnostic; - - fn display<'a>( + fn as_diagnostic<'a>( &'a self, - source_files: &'a dyn DiagnosticSourceMap, - render: &'a annotate_snippets::Renderer, - ) -> impl std::fmt::Display + 'a { - Display(self.as_diagnostic(), source_files, render) - } + source_map: &'a dyn DiagnosticSourceMap, + ) -> Vec>; fn into_diagnostic_error(self, source_files: R) -> Annotated where @@ -358,52 +235,21 @@ pub trait AsDiagnostic { } struct Display<'a, D>( - D, + &'a D, &'a dyn DiagnosticSourceMap, &'a annotate_snippets::Renderer, ); -impl> std::fmt::Display for Display<'_, D> { +impl std::fmt::Display for Display<'_, D> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - let diag = self.0.as_ref(); - - // Group annotations by file, but preserve their order. - let snippets = diag - .annotations - .chunk_by(|a, b| a.span.file == b.span.file) - .filter_map(|annotations| { - let file_id = annotations[0].span.file; // `chunk_by` guarantees non-empty chunks. - let source = self.1.get_source(file_id)?; - Some( - annotate_snippets::Snippet::source(source.source) - .origin(source.file) - .fold(true) - .annotations(annotations.iter().map(|annotation| { - annotation - .level - .span(annotation.span.span.into()) - .label(&annotation.message) - })), - ) - }); - - let message = diag - .level - .title(&diag.title) - .id(diag.id) - .snippets(snippets) - .footers( - diag.footer - .iter() - .map(|footer| annotate_snippets::Level::Help.title(footer)), - ); - let rendered = self.2.render(message); - rendered.fmt(f) + let report = self.0.as_diagnostic(self.1); + let rendered = self.2.render(&report); + f.write_str(&rendered) } } #[derive(Debug, Clone)] pub struct DiagnosticAnnotation { pub span: DiagnosticSpan, - pub level: Level, + pub level: Level<'static>, pub message: String, } diff --git a/werk-util/semantic_hash.rs b/werk-util/semantic_hash.rs index c0938b1c..cd195220 100644 --- a/werk-util/semantic_hash.rs +++ b/werk-util/semantic_hash.rs @@ -52,6 +52,4 @@ macro_rules! hash_is_semantic { }; } -pub(crate) use hash_is_semantic; - hash_is_semantic!(str); diff --git a/werk-util/span.rs b/werk-util/span.rs index 23ef3d1b..667c25a3 100644 --- a/werk-util/span.rs +++ b/werk-util/span.rs @@ -237,7 +237,7 @@ impl DiagnosticSpan { #[must_use] pub fn annotation( self, - level: annotate_snippets::Level, + level: annotate_snippets::Level<'static>, message: impl std::fmt::Display, ) -> crate::DiagnosticAnnotation { crate::DiagnosticAnnotation {