diff --git a/Cargo.lock b/Cargo.lock index cc7c020..596507b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "aho-corasick" version = "0.7.15" @@ -36,6 +38,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" + [[package]] name = "atty" version = "0.2.14" @@ -89,22 +97,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.5.2", "constant_time_eq", ] [[package]] name = "blake3" -version = "0.3.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" +checksum = "dcd555c66291d5f836dbb6883b48660ece810fe25a31f3bdfb911945dff2691f" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.7.1", "cc", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "constant_time_eq", - "crypto-mac", "digest", ] @@ -183,15 +190,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "cmdtree" version = "0.10.1" @@ -266,16 +264,6 @@ dependencies = [ "itertools", ] -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - [[package]] name = "crossbeam-channel" version = "0.5.0" @@ -339,21 +327,13 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -dependencies = [ - "crossbeam-utils 0.6.6", -] - -[[package]] -name = "crossbeam-utils" -version = "0.6.6" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" dependencies = [ "cfg-if 0.1.10", - "lazy_static", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] @@ -380,37 +360,27 @@ dependencies = [ [[package]] name = "crossterm" -version = "0.17.7" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4919d60f26ae233e14233cc39746c8c8bb8cd7b05840ace83604917b51b6c7" +checksum = "486d44227f71a1ef39554c0dc47e44b9f4139927c75043312690c3f476d1d788" dependencies = [ "bitflags", "crossterm_winapi", - "lazy_static", "libc", "mio", - "parking_lot 0.10.2", + "parking_lot", "signal-hook", + "signal-hook-mio", "winapi", ] [[package]] name = "crossterm_winapi" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2265c3f8e080075d9b6417aa72293fc71662f34b4af2612d8d1b074d29510db" -dependencies = [ - "winapi", -] - -[[package]] -name = "crypto-mac" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "3a6966607622438301997d3dac0d2f6e9a90c68bb6bc1785ea98456ab93c0507" dependencies = [ - "generic-array", - "subtle", + "winapi", ] [[package]] @@ -503,6 +473,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "fast-float" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" + [[package]] name = "fxhash" version = "0.2.1" @@ -539,7 +515,18 @@ checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] @@ -638,11 +625,13 @@ dependencies = [ [[package]] name = "kserd" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5d2cde71f14a9ea4dcd2c6ea9a573297701b2fb6f62ea033f8494abfc723263" +checksum = "c8544ebeb5f0d867b1cb622b7f68aea47ac9c4b5c4b897eacf92744c94bf1fcd" dependencies = [ "base91", + "bitflags", + "fast-float", "lexical-core", ] @@ -677,23 +666,14 @@ checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" [[package]] name = "libloading" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9367bdfa836b7e3cf895867f7a570283444da90562980ec2263d6e1569b16bc" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" dependencies = [ "cfg-if 1.0.0", "winapi", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.2" @@ -731,11 +711,14 @@ dependencies = [ [[package]] name = "measureme" -version = "9.0.0" +version = "9.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22bf8d885d073610aee20e7fa205c4341ed32a761dbde96da5fd96301a8d3e82" +checksum = "78f7a41bc6f856a2cf0e95094ad5121f82500e2d9a0f3c0171d98f6566d8117d" dependencies = [ - "parking_lot 0.11.1", + "log", + "memmap2", + "parking_lot", + "perf-event-open-sys", "rustc-hash", "smallvec", ] @@ -746,6 +729,15 @@ version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +[[package]] +name = "memmap2" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.5.6" @@ -829,14 +821,14 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "papyrus" -version = "0.17.2" +version = "0.17.3" dependencies = [ "backtrace", "blake3", "cmdtree", "colored", "criterion", - "crossbeam-channel 0.4.4", + "crossbeam-channel", "crossterm", "dirs", "fxhash", @@ -844,6 +836,7 @@ dependencies = [ "kserd", "libloading", "log", + "quote", "racer", "syn", "term_cursor", @@ -851,16 +844,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.1" @@ -868,36 +851,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", - "lock_api 0.4.2", - "parking_lot_core 0.8.2", + "lock_api", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" dependencies = [ - "cfg-if 0.1.10", - "cloudabi", + "cfg-if 1.0.0", + "instant", "libc", - "redox_syscall", + "redox_syscall 0.1.57", "smallvec", "winapi", ] [[package]] -name = "parking_lot_core" -version = "0.8.2" +name = "perf-event-open-sys" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" +checksum = "ce9bedf5da2c234fdf2391ede2b90fabf585355f33100689bc364a3ea558561a" dependencies = [ - "cfg-if 1.0.0", - "instant", "libc", - "redox_syscall", - "smallvec", - "winapi", ] [[package]] @@ -926,9 +904,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" dependencies = [ "unicode-xid", ] @@ -959,9 +937,9 @@ dependencies = [ [[package]] name = "racer" -version = "2.1.42" +version = "2.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4463624cd50208e86382c13a84561fcd1d3e9d8ff4d97e8ef0c5e304df8d2b9" +checksum = "7fec2e85e7a30f8fd31b7cf288ad363b5e51fd2cb6f53b416b0cfaabd84e1ccb" dependencies = [ "bitflags", "clap", @@ -984,9 +962,9 @@ dependencies = [ [[package]] name = "racer-cargo-metadata" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b60cd72291a641dbaa649e9e328df552186dda1fea834c55cf28594a25b7c6f" +checksum = "996e6d07087ab306df24b3ab9815791581ef1de3d7a99b8d47169c3d1da0c32b" dependencies = [ "racer-interner", "serde", @@ -1008,11 +986,23 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.16", "libc", - "rand_chacha", - "rand_core", - "rand_hc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", ] [[package]] @@ -1022,7 +1012,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", ] [[package]] @@ -1031,7 +1031,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.3", ] [[package]] @@ -1040,7 +1049,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core 0.6.3", ] [[package]] @@ -1061,7 +1079,7 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ - "crossbeam-channel 0.5.0", + "crossbeam-channel", "crossbeam-deque 0.8.0", "crossbeam-utils 0.8.1", "lazy_static", @@ -1074,14 +1092,23 @@ version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "getrandom", - "redox_syscall", + "getrandom 0.1.16", + "redox_syscall 0.1.57", "rust-argon2", ] @@ -1144,18 +1171,19 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_arena" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb953bea2006184c8f01a6fd3ed51658c73380992a9aefc113e8d32ece6b7516" +checksum = "550ca1a0925d31a0af089b18c89f5adf3b286e319e3e1f1a5204c21bd2f17371" dependencies = [ + "rustc-ap-rustc_data_structures", "smallvec", ] [[package]] name = "rustc-ap-rustc_ast" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94da60fa49b2f60d2539e8823cf2b4d4e61583ba4ee796b8289e12f017d3dc5b" +checksum = "4aa53b68080df17994a54747f7c37b0686288a670efb9ba3b382ce62e744aed2" dependencies = [ "bitflags", "rustc-ap-rustc_data_structures", @@ -1170,32 +1198,32 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_ast_pretty" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302b43429c62efc43b159b1f8ab94c8b517fb553cbae854c3fcf34e01c36accb" +checksum = "0ae71e68fada466a4b2c39c79ca6aee3226587abe6787170d2f6c92237569565" dependencies = [ "rustc-ap-rustc_ast", "rustc-ap-rustc_span", - "rustc-ap-rustc_target", "tracing", ] [[package]] name = "rustc-ap-rustc_data_structures" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b9ebd359b0f21086a88595a25d92dc7e8e5f7b111e41c52bb6c97e2d95fd0bb" +checksum = "faa484d6e0ca32d1d82303647275c696f745599b3d97e686f396ceef5b99d7ae" dependencies = [ - "arrayvec", + "arrayvec 0.7.1", "bitflags", "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", + "crossbeam-utils 0.8.1", "ena", "indexmap", "jobserver", "libc", "measureme", - "parking_lot 0.11.1", + "memmap2", + "parking_lot", "rustc-ap-rustc_graphviz", "rustc-ap-rustc_index", "rustc-ap-rustc_macros", @@ -1213,9 +1241,9 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_errors" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b810fcac4d738c47d7793afe3e0f2e03d5193c36c698b0fbcebfb64e468c06b" +checksum = "5f85ba19cca320ad797e3a29c35cab9bddfff0e7adbde336a436249e54cee7b1" dependencies = [ "annotate-snippets", "atty", @@ -1233,9 +1261,9 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_feature" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f4121cb9718c8c1c6350a3aaea619fbbae38fb1aadd3d7305586460babb531" +checksum = "97d538adab96b8b2b1ca9fcd4c8c47d4e23e862a23d1a38b6c15cd8fd52b34b1" dependencies = [ "rustc-ap-rustc_data_structures", "rustc-ap-rustc_span", @@ -1243,55 +1271,56 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_fs_util" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb0f36e34fafb725795bef3ec6f414cac34e7ca98e6d25927be36d95ae1c6ac" +checksum = "8ad6f13d240944fa8f360d2f3b849a7cadaec75e477829e7dde61e838deda83d" [[package]] name = "rustc-ap-rustc_graphviz" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98402e20e2913016ed54f12aead5c987fe227a0fb31cc720e17ff51c6f32466" +checksum = "08b3451153cc5828c02cc4f1a0df146d25ac4b3382a112e25fd9d3f5bff15cdc" [[package]] name = "rustc-ap-rustc_index" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec91408d727f73f682cd8ae836d762c8dab0ed4e81994ced03aa1edcee3b99a4" +checksum = "cd39a9f01b442c629bdff5778cb3dd29b7c2ea4afe62d5ab61d216bd1b556692" dependencies = [ - "arrayvec", + "arrayvec 0.7.1", "rustc-ap-rustc_macros", "rustc-ap-rustc_serialize", ] [[package]] name = "rustc-ap-rustc_lexer" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67adbe260a0a11910624d6d28c0304fcf7b063e666682111005c83b09f73429d" +checksum = "a5de290c44a90e671d2cd730062b9ef73d11155da7e44e7741d633e1e51e616e" dependencies = [ "unicode-xid", ] [[package]] name = "rustc-ap-rustc_lint_defs" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf11d0646da7bd136fbca53834afcc3760fbfc20fa4875e139b3ada41ec53a5" +checksum = "69570b4beb61088926b131579865bbe70d124d30778c46307a62ec8b310ae462" dependencies = [ "rustc-ap-rustc_ast", "rustc-ap-rustc_data_structures", "rustc-ap-rustc_macros", "rustc-ap-rustc_serialize", "rustc-ap-rustc_span", + "rustc-ap-rustc_target", "tracing", ] [[package]] name = "rustc-ap-rustc_macros" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c454b10b66750ffd9bfd7d53b0f30eaba1462356e9ac91f0d037cb0556dc7681" +checksum = "86bd877df37f15c5a44d9679d1b5207ebc95f3943fbc336eeac670195ac58610" dependencies = [ "proc-macro2", "quote", @@ -1301,9 +1330,9 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_parse" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d03f423948137a8370a88447382a18015d47a273268e3ead2d0a987c3b14070" +checksum = "02502d8522ba31d0bcad28a78822b68c1b6ba947a2b4aa6a2341b30594379b80" dependencies = [ "bitflags", "rustc-ap-rustc_ast", @@ -1321,9 +1350,9 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_serialize" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ed5df71bd37d1e179b4bbedf77db76c9e0eb2e03159c58a691adbf29f74682" +checksum = "5f741f8e9aee6323fbe127329490608a5a250cc0072ac91e684ef62518cdb1ff" dependencies = [ "indexmap", "smallvec", @@ -1331,9 +1360,9 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_session" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e3b92b51fad25a897b23ec98961126aea038abeab8d47989f774f7727016b5e" +checksum = "dba61eca749f4fced4427ad1cc7f23342cfc6527c3bcc624e3aa56abc1f81298" dependencies = [ "bitflags", "getopts", @@ -1353,9 +1382,9 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_span" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98273206d8a571c780f233f3391ea30e29c5e75ecdc60335ccef346046e1953" +checksum = "a642e8d6fc883f34e0778e079f8242ac40c6614a6b7a0ef61681333e847f5e62" dependencies = [ "cfg-if 0.1.10", "md-5", @@ -1373,9 +1402,9 @@ dependencies = [ [[package]] name = "rustc-ap-rustc_target" -version = "697.0.0" +version = "722.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ce81fe0130e61112db5f3b2db6b21d407e4b14ae467ab9637f4696cc340ad1" +checksum = "80feebd8c323b80dd73a395fa7fabba9e2098b6277670ff89c473f618ffa07de" dependencies = [ "bitflags", "rustc-ap-rustc_data_structures", @@ -1400,9 +1429,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-rayon" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32767f90d938f1b7199a174ef249ae1924f6e5bbdb9d112fea141e016f25b3a" +checksum = "ed7d6a39f8bfd4421ce720918234d1e672b83824c91345b47c93746839cf1629" dependencies = [ "crossbeam-deque 0.7.3", "either", @@ -1411,13 +1440,13 @@ dependencies = [ [[package]] name = "rustc-rayon-core" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2427831f0053ea3ea73559c8eabd893133a51b251d142bacee53c62a288cb3" +checksum = "e94187d9ea3e8c38fafdbc38acb94eafa7ce155867f6ccb13830466a0d0db8c6" dependencies = [ "crossbeam-deque 0.7.3", "crossbeam-queue", - "crossbeam-utils 0.6.6", + "crossbeam-utils 0.7.2", "lazy_static", "num_cpus", ] @@ -1542,20 +1571,30 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.1.17" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729" +checksum = "470c5a6397076fae0094aaf06a08e6ba6f37acb77d3b1b91ea92b4d6c8650c39" dependencies = [ "libc", - "mio", "signal-hook-registry", ] +[[package]] +name = "signal-hook-mio" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29fd5867f1c4f2c5be079aee7a2adf1152ebb04a4bc4d341f504b7dece607ed4" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + [[package]] name = "signal-hook-registry" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" dependencies = [ "libc", ] @@ -1608,17 +1647,11 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -[[package]] -name = "subtle" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" - [[package]] name = "syn" -version = "1.0.57" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6" +checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" dependencies = [ "proc-macro2", "quote", @@ -1639,14 +1672,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", - "rand", - "redox_syscall", + "rand 0.8.4", + "redox_syscall 0.2.10", "remove_dir_all", "winapi", ] @@ -1807,7 +1840,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" dependencies = [ - "rand", + "rand 0.7.3", ] [[package]] @@ -1839,6 +1872,12 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + [[package]] name = "wasm-bindgen" version = "0.2.69" diff --git a/Cargo.toml b/Cargo.toml index 7fe491c..2a6f4b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus" -version = "0.17.2" +version = "0.17.3" authors = ["kurt "] description = "A rust repl and script runner" license = "MIT" @@ -17,21 +17,22 @@ codecov = { repository = "kurtlawrence/papyrus" } [dependencies] # My crates cmdtree = { version = "0.10", default-features = false } -kserd = { version = "0.4", default-features = false, optional = false, features = [ "format" ] } +kserd = { version = "0.5", default-features = false, optional = false, features = [ "format" ] } # crates.io backtrace = { version = "0.3", default-features = false, optional = false, features = [ "std" ] } -blake3 = { version = "0.3", default-features = true } +blake3 = { version = "1.0", default-features = true } colored = { version = "2", default-features = false } -crossbeam-channel = { version = "0.4", default-features = true } # enable 'std' featureset -crossterm = { version = "0.17", default-features = false, optional = true } +crossbeam-channel = { version = "0.5", default-features = true } # enable 'std' featureset +crossterm = { version = "0.21", default-features = false, optional = true } dirs = { version = "3", default-features = false } fxhash = { version = "0.2", default-features = false } glob = { version = "0.3", default-features = false } -libloading = { version = "0.6", default-features = false } +libloading = { version = "0.7", default-features = false } log = { version = "0.4", default-features = false } -racer = { version = "2.1", default-features = false, optional = true, features = [ "metadata" ] } -syn = { version = "=1.0.57", default-features = false, optional = false, features = [ "full", "printing", "parsing" ] } +quote = { version = "1.0", default-features = false } +racer = { version = "2.1.48", default-features = false, optional = true, features = [ "metadata" ] } +syn = { version = "1.0.73", default-features = false, optional = false, features = [ "full", "printing", "parsing" ] } uuid = { version = "0.8", default-features = false, optional = false, features = [ "v4" ] } [dev-dependencies] diff --git a/src/compile/execute.rs b/src/compile/execute.rs index 20b5a42..ab1b95f 100644 --- a/src/compile/execute.rs +++ b/src/compile/execute.rs @@ -39,10 +39,12 @@ fn get_lib>(path: P) -> Result { // libloading::os::unix::Library::open(Some(library_file.as_ref()), 0x2 | 0x1000) // .unwrap() // .into(); - Library::new(path.as_ref()).map_err(|e| { - error!("failed to load library file: {}", e); - "failed to load library file" - }) + unsafe { + Library::new(path.as_ref()).map_err(|e| { + error!("failed to load library file: {}", e); + "failed to load library file" + }) + } } fn get_func<'l, Data>( diff --git a/src/fmt.rs b/src/fmt.rs index d62a69b..e13fee4 100644 --- a/src/fmt.rs +++ b/src/fmt.rs @@ -47,6 +47,9 @@ pub fn format(code_snippet: &str) -> Result { if success && !outputbuf.is_empty() { let s = std::str::from_utf8(&outputbuf).map_err(|_| FormatError::StrConvertFailed)?; + //Protect against a .rustfmt.toml with "hard_tabs = true" in it. + let s = s.replace("\t", " "); + let trimmed = s.trim(); let end = trimmed.len().saturating_sub(2); // \n} @@ -66,7 +69,7 @@ fn reduce_indent(s: &str) -> String { Literal, Str, None, - }; + } use LitType::*; const LITERALS: [(&str, &str); 6] = [ (r##"r#""##, r##""#"##), diff --git a/src/input/parse.rs b/src/input/parse.rs index a4a0a35..1d98ba7 100644 --- a/src/input/parse.rs +++ b/src/input/parse.rs @@ -1,6 +1,6 @@ use super::*; use crate::code::{self, Statement}; -use syn::export::ToTokens; +use quote::ToTokens; use syn::{self, Block, File, Item, Stmt}; /// Parses a line of input as a command. @@ -22,7 +22,7 @@ pub fn parse_program(code: &str) -> InputResult { let reterr = |e: syn::Error| { let e = e.to_string(); - if &e == "LexError" { + if (&e == "LexError") || (&e == "lex error") { InputResult::More } else { InputResult::InputError(e) diff --git a/src/lib.rs b/src/lib.rs index eb00acf..7005478 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,7 +76,7 @@ //! future but for now, any user wanting to use Papyrus will need an installation of Rust. #![warn(missing_docs)] -#![deny(intra_doc_link_resolution_failure)] +#![deny(rustdoc::broken_intra_doc_links)] #[macro_use] extern crate log; diff --git a/src/run/mod.rs b/src/run/mod.rs index 696981a..b26bc97 100644 --- a/src/run/mod.rs +++ b/src/run/mod.rs @@ -6,8 +6,10 @@ use crossterm as xterm; use crossterm::event::Event; use kserd::{fmt::FormattingConfig, Kserd}; use repl::{EvalResult, Evaluate, Print, Read, ReadResult}; +use std::convert::TryInto; use std::io::{self, prelude::*}; use std::sync::{Arc, Mutex}; +use std::cmp::PartialEq; mod interface; #[cfg(test)] @@ -44,7 +46,7 @@ pub fn fmt_based_on_terminal_width(repl: &Repl) -> FormattingConfig std::cmp::max((width * 4) / 5, 120) } .saturating_sub(repl.prompt(false).chars().count()); - fmt.width_limit = Some(width); + fmt.width_limit = Some(width.try_into().unwrap()); fmt }) .unwrap_or_default() @@ -384,67 +386,68 @@ fn do_read( let ev = interface.read_until(STOPEVENTS)?; - match (ev, verbatim_mode) { - (ENTER, false) | (STOP_VERBATIM_MODE, true) => { - let line = interface.buffer(); - repl.line_input(&line); - interface.add_history(line); - interface.mv_bufpos_end(); - interface.writeln(""); - interface.flush_buffer()?; - break Ok(false); - } - (TAB, false) => { - let line = interface.buffer(); - if completion_writer.is_same_input(&line) { - completion_writer.next_completion(); + if ev.eq(&ENTER) && !verbatim_mode { + let line = interface.buffer(); + repl.line_input(&line); + interface.add_history(line); + interface.mv_bufpos_end(); + interface.writeln(""); + interface.flush_buffer()?; + break Ok(false); + } + else if ev.eq(&TAB) && !verbatim_mode { + let line = interface.buffer(); + if completion_writer.is_same_input(&line) { + completion_writer.next_completion(); + } else { + let f = |start| { + interface + .buf_ch_len() + .saturating_sub(line[start..].chars().count()) + }; + + let tree_chpos = f(TreeCompleter::word_break(&line)); + let mods_chpos = f(ModulesCompleter::word_break(&line)); + #[cfg(feature = "racer-completion")] + let code_chpos = f(CodeCompleter::word_break(&line)); + + let completions = if line.starts_with(crate::CMD_PREFIX) { + Box::new(std::iter::empty()) as Box> } else { - let f = |start| { - interface - .buf_ch_len() - .saturating_sub(line[start..].chars().count()) - }; - - let tree_chpos = f(TreeCompleter::word_break(&line)); - let mods_chpos = f(ModulesCompleter::word_break(&line)); #[cfg(feature = "racer-completion")] - let code_chpos = f(CodeCompleter::word_break(&line)); - - let completions = if line.starts_with(crate::CMD_PREFIX) { - Box::new(std::iter::empty()) as Box> - } else { - #[cfg(feature = "racer-completion")] - let c = { - let injection = format!("{}\n{}", repl.input_buffer(), line); - complete_code(&codecmpltr, &cache.0, &injection, code_chpos) - }; - - #[cfg(not(feature = "racer-completion"))] - let c = std::iter::empty(); - - Box::new(c) as Box> + let c = { + let injection = format!("{}\n{}", repl.input_buffer(), line); + complete_code(&codecmpltr, &cache.0, &injection, code_chpos) }; - let completions = completions - .chain(complete_cmdtree(&treecmpltr, &line, tree_chpos)) - .chain(complete_mods(&modscmpltr, &line, mods_chpos)); + #[cfg(not(feature = "racer-completion"))] + let c = std::iter::empty(); - completion_writer.new_completions(completions); - } + Box::new(c) as Box> + }; - completion_writer.overwrite_completion(interface)?; - } - (BREAK, _) => break Ok(true), - (ENTER_VERBATIM_MODE, false) => verbatim_mode = true, - (ENTER, true) => { - interface.writeln(""); - interface.flush_buffer()?; - } - (TAB, true) => { - interface.write("\t"); - interface.flush_buffer()?; + let completions = completions + .chain(complete_cmdtree(&treecmpltr, &line, tree_chpos)) + .chain(complete_mods(&modscmpltr, &line, mods_chpos)); + + completion_writer.new_completions(completions); } - _ => (), // do nothing otherwise + + completion_writer.overwrite_completion(interface)?; + } + else if ev.eq(&BREAK) { + break Ok(true) + } + else if ev.eq(&ENTER_VERBATIM_MODE) && !verbatim_mode { + verbatim_mode = true; + } + else if ev.eq(&ENTER) && verbatim_mode { + interface.writeln(""); + interface.flush_buffer()?; + } + else if ev.eq(&TAB) && verbatim_mode { + interface.write("\t"); + interface.flush_buffer()?; } } } @@ -532,9 +535,10 @@ where (read, signal) } -fn map_xterm_err(xtermerr: crossterm::ErrorKind, msg: &str) -> io::Error { - match xtermerr { - crossterm::ErrorKind::IoError(e) => e, - _ => io::Error::new(io::ErrorKind::Other, msg), - } +fn map_xterm_err(xtermerr: crossterm::ErrorKind, _msg: &str) -> io::Error { + xtermerr + //match xtermerr { + // crossterm::ErrorKind::(e) => e, + // _ => io::Error::new(io::ErrorKind::Other, msg), + //} }