aboutsummaryrefslogtreecommitdiff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-10 11:42:42 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-10 11:42:42 +0000
commit8e4be2708635818aa3e210f0e39fb871cc433004 (patch)
tree569110cbb504c0516b136c414610b0f2edbe5044 /Cargo.lock
parent01b15c9fc2ce128149872ffe02de022bdb157286 (diff)
parent2e9194a621ccb33872d6189ecc30a83c17e6e33a (diff)
Merge #774
774: Batch crate & command r=matklad a=flodiebold This adds a new crate, `ra_batch`, which is intended for scenarios where you're loading a workspace once and then running some analyses using the HIR API. Also, it adds a command to `ra_cli` which uses that to type-check all crates in a workspace and print some statistics: E.g. in rust-analyzer: ``` > $ time target/release/ra_cli analysis-stats Database loaded, 21 roots Crates in this dir: 28 Total modules found: 231 Total declarations: 3694 Total functions: 2408 Total expressions: 47017 Expressions of unknown type: 19826 (42%) Expressions of partially unknown type: 4482 (9%) target/release/ra_cli analysis-stats 3,23s user 0,60s system 100% cpu 3,821 total ``` Or in rust-lang/rust: ``` > $ time ../opensource/rust-analyzer/target/release/ra_cli analysis-stats Database loaded, 77 roots Crates in this dir: 130 Total modules found: 1820 Total declarations: 35038 Total functions: 25914 Total expressions: 753678 Expressions of unknown type: 337975 (44%) Expressions of partially unknown type: 92314 (12%) ../opensource/rust-analyzer/target/release/ra_cli analysis-stats 13,45s user 2,08s system 100% cpu 15,477 total ``` ~This still needs a test. Type-checking all of rust-analyzer sadly takes almost a minute when compiled in debug mode :sweat_smile: So I'll need to add something simpler (maybe just looking at a few modules).~ Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock42
1 files changed, 42 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0009cdaab..0a5bec2bf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -487,6 +487,18 @@ version = "1.0.2"
487source = "registry+https://github.com/rust-lang/crates.io-index" 487source = "registry+https://github.com/rust-lang/crates.io-index"
488 488
489[[package]] 489[[package]]
490name = "indicatif"
491version = "0.11.0"
492source = "registry+https://github.com/rust-lang/crates.io-index"
493dependencies = [
494 "console 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
495 "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
496 "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
497 "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
498 "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
499]
500
501[[package]]
490name = "inotify" 502name = "inotify"
491version = "0.6.1" 503version = "0.6.1"
492source = "registry+https://github.com/rust-lang/crates.io-index" 504source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -781,6 +793,14 @@ dependencies = [
781] 793]
782 794
783[[package]] 795[[package]]
796name = "number_prefix"
797version = "0.2.8"
798source = "registry+https://github.com/rust-lang/crates.io-index"
799dependencies = [
800 "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
801]
802
803[[package]]
784name = "owning_ref" 804name = "owning_ref"
785version = "0.4.0" 805version = "0.4.0"
786source = "registry+https://github.com/rust-lang/crates.io-index" 806source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -910,12 +930,32 @@ dependencies = [
910] 930]
911 931
912[[package]] 932[[package]]
933name = "ra_batch"
934version = "0.1.0"
935dependencies = [
936 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
937 "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
938 "ra_db 0.1.0",
939 "ra_hir 0.1.0",
940 "ra_project_model 0.1.0",
941 "ra_syntax 0.1.0",
942 "ra_vfs 0.1.0",
943 "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
944 "test_utils 0.1.0",
945]
946
947[[package]]
913name = "ra_cli" 948name = "ra_cli"
914version = "0.1.0" 949version = "0.1.0"
915dependencies = [ 950dependencies = [
916 "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", 951 "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
917 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 952 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
953 "flexi_logger 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
954 "indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
918 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 955 "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
956 "ra_batch 0.1.0",
957 "ra_db 0.1.0",
958 "ra_hir 0.1.0",
919 "ra_ide_api_light 0.1.0", 959 "ra_ide_api_light 0.1.0",
920 "ra_syntax 0.1.0", 960 "ra_syntax 0.1.0",
921 "tools 0.1.0", 961 "tools 0.1.0",
@@ -1934,6 +1974,7 @@ dependencies = [
1934"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 1974"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
1935"checksum im 12.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0627d417829c1d763d602687634869f254fc79f7e22dea6c824dab993db857e4" 1975"checksum im 12.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0627d417829c1d763d602687634869f254fc79f7e22dea6c824dab993db857e4"
1936"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" 1976"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d"
1977"checksum indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c60da1c9abea75996b70a931bba6c750730399005b61ccd853cee50ef3d0d0c"
1937"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" 1978"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718"
1938"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" 1979"checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0"
1939"checksum insta 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcdfb5ab565a1fc5c397722d5a9503f2095696ef07ef1a222d85a0fd6666c6aa" 1980"checksum insta 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcdfb5ab565a1fc5c397722d5a9503f2095696ef07ef1a222d85a0fd6666c6aa"
@@ -1967,6 +2008,7 @@ dependencies = [
1967"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" 2008"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
1968"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" 2009"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1"
1969"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" 2010"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238"
2011"checksum number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf9993e59c894e3c08aa1c2712914e9e6bf1fcbfc6bef283e2183df345a4fee"
1970"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" 2012"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
1971"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" 2013"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337"
1972"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" 2014"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"