From 6665c84510ef55ef314de332f7cbe077522256de Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Wed, 2 Sep 2020 20:30:05 -0700 Subject: [PATCH 01/14] chore: bump candid --- Cargo.lock | 66 ++++++++++++++++++++++++++---- src/dfx/Cargo.toml | 14 ++----- src/ic_identity_manager/Cargo.toml | 11 ++--- 3 files changed, 64 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef6aa16a8e..8bb6cd0162 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -508,6 +508,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +[[package]] +name = "beef" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "474a626a67200bd107d44179bb3d4fc61891172d11696609264589be6a0e6a43" + [[package]] name = "bit-set" version = "0.5.2" @@ -626,18 +632,19 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "candid" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3928acd8e9b66774a2eb21ad675e827f6723058163347f18b1d967e02637d86" +checksum = "0ce199442195970318ccd0d8f94c7e2b2bf60c1bf23ed7be2b2ae91c2d8dff3a" dependencies = [ - "base32", "byteorder", "candid_derive", - "crc32fast", + "codespan-reporting", "hex", + "ic-types", "lalrpop", "lalrpop-util", "leb128", + "logos", "num-bigint", "num-traits", "num_enum", @@ -648,9 +655,9 @@ dependencies = [ [[package]] name = "candid_derive" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a51d65ed24b5b03624aefc86967af49039882d63161a67aef0dd4306f7251330" +checksum = "ab31ccaf3ab1184bab4a139afb0d23c3aa54144d4a92ef0d0de7653cad4f679f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", @@ -725,6 +732,16 @@ dependencies = [ "bitflags", ] +[[package]] +name = "codespan-reporting" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e0762455306b1ed42bc651ef6a2197aabda5e1d4a43c34d5eab5c1a3634e81d" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "colored" version = "1.9.3" @@ -1673,7 +1690,7 @@ dependencies = [ [[package]] name = "ic-agent" version = "0.1.0" -source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#e61e646c7a810c13c1b3d898d1d2ed7366b67a0a" +source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=candid#f748c62cae9155a30047bfb88b66449b9016d63b" dependencies = [ "async-trait", "base32", @@ -1713,8 +1730,9 @@ dependencies = [ [[package]] name = "ic-types" -version = "0.1.0" -source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#e61e646c7a810c13c1b3d898d1d2ed7366b67a0a" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37a55e41f39608ff7aeec547c5e216da5eb5af51d689589fa68b0cbaf269ca9b" dependencies = [ "base32", "crc32fast", @@ -1975,6 +1993,30 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "logos" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91c49573597a5d6c094f9031617bb1fed15c0db68c81e6546d313414ce107e4" +dependencies = [ + "logos-derive", +] + +[[package]] +name = "logos-derive" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "797b1f8a0571b331c1b47e7db245af3dc634838da7a92b3bef4e30376ae1c347" +dependencies = [ + "beef", + "fnv", + "proc-macro2 1.0.19", + "quote 1.0.7", + "regex-syntax", + "syn 1.0.38", + "utf8-ranges", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -3918,6 +3960,12 @@ dependencies = [ "percent-encoding 2.1.0", ] +[[package]] +name = "utf8-ranges" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" + [[package]] name = "v_escape" version = "0.7.4" diff --git a/src/dfx/Cargo.toml b/src/dfx/Cargo.toml index c72779accf..837deded82 100644 --- a/src/dfx/Cargo.toml +++ b/src/dfx/Cargo.toml @@ -21,7 +21,7 @@ actix-server = "0.6.1" actix-web = { version = "1.0.8", features = [ "default", "openssl", "ssl" ] } atty = "0.2.13" base64 = "0.11.0" -candid = "0.5.2" +candid = "0.5.4" chrono = "0.4.9" clap = "2.33.0" console = "0.7.7" @@ -33,6 +33,7 @@ flate2 = "1.0.11" futures = "0.1.28" hex = "0.4.2" ic-identity-manager = { path = "../ic_identity_manager" } +ic-types = "0.1.1" indicatif = "0.13.0" lazy-init = "0.3.0" lazy_static = "1.4.0" @@ -66,15 +67,8 @@ wasmparser = "0.45.0" [dependencies.ic-agent] version = "0.1.0" git = "ssh://git@github.com/dfinity-lab/agent-rust.git" -branch = "next" -rev = "e61e646c7a810c13c1b3d898d1d2ed7366b67a0a" - -[dependencies.ic-types] -version = "0.1.0" -git = "ssh://git@github.com/dfinity-lab/agent-rust.git" -branch = "next" -rev = "e61e646c7a810c13c1b3d898d1d2ed7366b67a0a" - +branch = "candid" +rev = "f748c62cae9155a30047bfb88b66449b9016d63b" [dev-dependencies] env_logger = "0.6" diff --git a/src/ic_identity_manager/Cargo.toml b/src/ic_identity_manager/Cargo.toml index c797698105..a026fcd867 100644 --- a/src/ic_identity_manager/Cargo.toml +++ b/src/ic_identity_manager/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +ic-types = "0.1.1" openssl = "0.10.28" pem = "0.7.0" ring = "0.16.11" @@ -15,14 +16,8 @@ serde = { version = "1.0", features = ["derive"] } [dependencies.ic-agent] version = "0.1.0" git = "ssh://git@github.com/dfinity-lab/agent-rust.git" -branch = "next" -rev = "e61e646c7a810c13c1b3d898d1d2ed7366b67a0a" - -[dependencies.ic-types] -version = "0.1.0" -git = "ssh://git@github.com/dfinity-lab/agent-rust.git" -branch = "next" -rev = "e61e646c7a810c13c1b3d898d1d2ed7366b67a0a" +branch = "candid" +rev = "f748c62cae9155a30047bfb88b66449b9016d63b" [dev-dependencies] serde_cbor = "0.10" From b2ca0ea3747a4a7e9d5b347ecd08c9d054a9a49f Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Wed, 2 Sep 2020 21:53:23 -0700 Subject: [PATCH 02/14] fix --- Cargo.lock | 163 ++++++++++++++++++++++++++++------------------------- 1 file changed, 85 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ed079e3d5..9a5a91bade 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -309,7 +309,7 @@ checksum = "068a33520e21c1eea89726be4d6b3ce2e6b81046904367e1677287695a043abb" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -411,13 +411,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caae68055714ff28740f310927e04f2eba76ff580b16fb18ed90073ee71646f7" +checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -439,9 +439,9 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "awc" @@ -661,14 +661,14 @@ checksum = "ab31ccaf3ab1184bab4a139afb0d23c3aa54144d4a92ef0d0de7653cad4f679f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] name = "cc" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" +checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" [[package]] name = "cfg-if" @@ -678,9 +678,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chrono" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" +checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" dependencies = [ "num-integer", "num-traits", @@ -918,7 +918,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "cfg-if", "crossbeam-utils 0.7.2", "lazy_static", @@ -954,7 +954,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "cfg-if", "lazy_static", ] @@ -973,7 +973,7 @@ checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -1189,9 +1189,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" +checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" dependencies = [ "cfg-if", ] @@ -1238,7 +1238,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -1259,7 +1259,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "synstructure", ] @@ -1289,9 +1289,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] name = "flate2" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e" +checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" dependencies = [ "cfg-if", "crc32fast", @@ -1413,7 +1413,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -1476,7 +1476,7 @@ checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] @@ -1550,7 +1550,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", ] [[package]] @@ -1754,11 +1754,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" +checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "hashbrown 0.8.2", ] @@ -1924,9 +1924,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.74" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" +checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" [[package]] name = "libflate" @@ -2002,7 +2002,7 @@ dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", "regex-syntax", - "syn 1.0.38", + "syn 1.0.39", "utf8-ranges", ] @@ -2045,7 +2045,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", ] [[package]] @@ -2076,9 +2076,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" +checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" dependencies = [ "adler", ] @@ -2161,7 +2161,7 @@ dependencies = [ "cfg-if", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -2257,7 +2257,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f3fc75e3697059fb1bc465e3d8cca6cf92f56854f201158b3f9c77d5a3cfa0" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "num-integer", "num-traits", ] @@ -2268,7 +2268,7 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "num-traits", ] @@ -2278,7 +2278,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", ] [[package]] @@ -2310,7 +2310,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -2327,9 +2327,9 @@ checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "once_cell" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" +checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" [[package]] name = "opaque-debug" @@ -2369,7 +2369,7 @@ version = "0.9.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "cc", "libc", "pkg-config", @@ -2531,7 +2531,7 @@ checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -2554,9 +2554,9 @@ checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" [[package]] name = "precomputed-hash" @@ -2621,7 +2621,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "version_check 0.9.2", ] @@ -2859,11 +2859,11 @@ dependencies = [ [[package]] name = "rayon" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" +checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "crossbeam-deque", "either", "rayon-core", @@ -2871,12 +2871,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" +checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0" dependencies = [ + "crossbeam-channel 0.4.3", "crossbeam-deque", - "crossbeam-queue", "crossbeam-utils 0.7.2", "lazy_static", "num_cpus", @@ -2899,9 +2899,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_users" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ "getrandom", "redox_syscall", @@ -2937,9 +2937,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" +checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" dependencies = [ "base64 0.12.3", "bytes 0.5.6", @@ -3008,11 +3008,11 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" [[package]] name = "rust-argon2" -version = "0.7.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" dependencies = [ - "base64 0.11.0", + "base64 0.12.3", "blake2b_simd", "constant_time_eq", "crossbeam-utils 0.7.2", @@ -3035,9 +3035,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693" +checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ "base64 0.12.3", "log", @@ -3173,7 +3173,7 @@ checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -3195,7 +3195,7 @@ checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -3390,9 +3390,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" +checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", @@ -3407,7 +3407,7 @@ checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "unicode-xid 0.2.1", ] @@ -3432,9 +3432,9 @@ checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" [[package]] name = "tar" -version = "0.4.29" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8a4c1d0bee3230179544336c15eefb563cf0302955d962e456542323e8c2e8a" +checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" dependencies = [ "filetime", "libc", @@ -3531,7 +3531,7 @@ checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -3554,19 +3554,20 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[package]] name = "tinyvec" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" +checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" [[package]] name = "tokio" @@ -3660,9 +3661,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" +checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", "rustls", @@ -3790,9 +3791,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" +checksum = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" dependencies = [ "lazy_static", ] @@ -3962,7 +3963,7 @@ dependencies = [ "nom", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -4035,6 +4036,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.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasm-bindgen" version = "0.2.67" @@ -4058,7 +4065,7 @@ dependencies = [ "log", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "wasm-bindgen-shared", ] @@ -4092,7 +4099,7 @@ checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] From 575ebba8c6af5113b2c82f795b61be06b6018b79 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Wed, 2 Sep 2020 22:04:47 -0700 Subject: [PATCH 03/14] fix --- Cargo.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 9a5a91bade..beda436839 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1721,7 +1721,6 @@ dependencies = [ name = "ic-types" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a55e41f39608ff7aeec547c5e216da5eb5af51d689589fa68b0cbaf269ca9b" dependencies = [ "base32", "crc32fast", From 5d4ccedc5aa4aa0783f6d47c0f04edee47c1528e Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Wed, 2 Sep 2020 22:19:40 -0700 Subject: [PATCH 04/14] fix --- Cargo.lock | 163 +++++++++++++++++++++++++---------------------------- 1 file changed, 78 insertions(+), 85 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index beda436839..e1bfbf06be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -309,7 +309,7 @@ checksum = "068a33520e21c1eea89726be4d6b3ce2e6b81046904367e1677287695a043abb" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -411,13 +411,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.40" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" +checksum = "caae68055714ff28740f310927e04f2eba76ff580b16fb18ed90073ee71646f7" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -439,9 +439,9 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "awc" @@ -661,14 +661,14 @@ checksum = "ab31ccaf3ab1184bab4a139afb0d23c3aa54144d4a92ef0d0de7653cad4f679f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] name = "cc" -version = "1.0.59" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" +checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" [[package]] name = "cfg-if" @@ -678,9 +678,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chrono" -version = "0.4.15" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" +checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" dependencies = [ "num-integer", "num-traits", @@ -918,7 +918,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "cfg-if", "crossbeam-utils 0.7.2", "lazy_static", @@ -954,7 +954,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "cfg-if", "lazy_static", ] @@ -973,7 +973,7 @@ checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -1189,9 +1189,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.24" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" +checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" dependencies = [ "cfg-if", ] @@ -1238,7 +1238,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -1259,7 +1259,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "synstructure", ] @@ -1289,9 +1289,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] name = "flate2" -version = "1.0.17" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" +checksum = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e" dependencies = [ "cfg-if", "crc32fast", @@ -1413,7 +1413,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -1476,7 +1476,7 @@ checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1550,7 +1550,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", ] [[package]] @@ -1753,11 +1753,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.5.2" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" +checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "hashbrown 0.8.2", ] @@ -1923,9 +1923,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.76" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" +checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" [[package]] name = "libflate" @@ -2001,7 +2001,7 @@ dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", "regex-syntax", - "syn 1.0.39", + "syn 1.0.38", "utf8-ranges", ] @@ -2044,7 +2044,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", ] [[package]] @@ -2075,9 +2075,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" +checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" dependencies = [ "adler", ] @@ -2160,7 +2160,7 @@ dependencies = [ "cfg-if", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -2256,7 +2256,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f3fc75e3697059fb1bc465e3d8cca6cf92f56854f201158b3f9c77d5a3cfa0" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "num-integer", "num-traits", ] @@ -2267,7 +2267,7 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "num-traits", ] @@ -2277,7 +2277,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", ] [[package]] @@ -2309,7 +2309,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -2326,9 +2326,9 @@ checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "once_cell" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" +checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" [[package]] name = "opaque-debug" @@ -2368,7 +2368,7 @@ version = "0.9.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "cc", "libc", "pkg-config", @@ -2530,7 +2530,7 @@ checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -2553,9 +2553,9 @@ checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "ppv-lite86" -version = "0.2.9" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" +checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" [[package]] name = "precomputed-hash" @@ -2620,7 +2620,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "version_check 0.9.2", ] @@ -2858,11 +2858,11 @@ dependencies = [ [[package]] name = "rayon" -version = "1.4.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270" +checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "crossbeam-deque", "either", "rayon-core", @@ -2870,12 +2870,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.8.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0" +checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" dependencies = [ - "crossbeam-channel 0.4.3", "crossbeam-deque", + "crossbeam-queue", "crossbeam-utils 0.7.2", "lazy_static", "num_cpus", @@ -2898,9 +2898,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_users" -version = "0.3.5" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" dependencies = [ "getrandom", "redox_syscall", @@ -2936,9 +2936,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.8" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" +checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" dependencies = [ "base64 0.12.3", "bytes 0.5.6", @@ -3007,11 +3007,11 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" [[package]] name = "rust-argon2" -version = "0.8.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" +checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" dependencies = [ - "base64 0.12.3", + "base64 0.11.0", "blake2b_simd", "constant_time_eq", "crossbeam-utils 0.7.2", @@ -3034,9 +3034,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693" dependencies = [ "base64 0.12.3", "log", @@ -3172,7 +3172,7 @@ checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -3194,7 +3194,7 @@ checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -3389,9 +3389,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.39" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" +checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", @@ -3406,7 +3406,7 @@ checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "unicode-xid 0.2.1", ] @@ -3431,9 +3431,9 @@ checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" [[package]] name = "tar" -version = "0.4.30" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" +checksum = "c8a4c1d0bee3230179544336c15eefb563cf0302955d962e456542323e8c2e8a" dependencies = [ "filetime", "libc", @@ -3530,7 +3530,7 @@ checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -3553,20 +3553,19 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[package]] name = "tinyvec" -version = "0.3.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" [[package]] name = "tokio" @@ -3660,9 +3659,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" dependencies = [ "futures-core", "rustls", @@ -3790,9 +3789,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.15" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" +checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" dependencies = [ "lazy_static", ] @@ -3962,7 +3961,7 @@ dependencies = [ "nom", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -4035,12 +4034,6 @@ 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.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasm-bindgen" version = "0.2.67" @@ -4064,7 +4057,7 @@ dependencies = [ "log", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "wasm-bindgen-shared", ] @@ -4098,7 +4091,7 @@ checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] From 5e26da0aaf0a95061a836cc32b301a9657ef7182 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 12:33:13 -0700 Subject: [PATCH 05/14] patch cargo.toml --- Cargo.lock | 167 +++++++++++++++++++++++---------------------- Cargo.toml | 3 + src/dfx/Cargo.toml | 3 +- 3 files changed, 91 insertions(+), 82 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e1bfbf06be..11456dbe94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -309,7 +309,7 @@ checksum = "068a33520e21c1eea89726be4d6b3ce2e6b81046904367e1677287695a043abb" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -411,13 +411,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caae68055714ff28740f310927e04f2eba76ff580b16fb18ed90073ee71646f7" +checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -439,9 +439,9 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "awc" @@ -661,14 +661,14 @@ checksum = "ab31ccaf3ab1184bab4a139afb0d23c3aa54144d4a92ef0d0de7653cad4f679f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] name = "cc" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" +checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" [[package]] name = "cfg-if" @@ -678,9 +678,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chrono" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" +checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" dependencies = [ "num-integer", "num-traits", @@ -918,7 +918,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "cfg-if", "crossbeam-utils 0.7.2", "lazy_static", @@ -954,7 +954,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "cfg-if", "lazy_static", ] @@ -973,7 +973,7 @@ checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -1189,9 +1189,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" +checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" dependencies = [ "cfg-if", ] @@ -1238,7 +1238,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -1259,7 +1259,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "synstructure", ] @@ -1289,9 +1289,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] name = "flate2" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e" +checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" dependencies = [ "cfg-if", "crc32fast", @@ -1413,7 +1413,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -1476,7 +1476,7 @@ checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] @@ -1550,7 +1550,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", ] [[package]] @@ -1692,7 +1692,7 @@ dependencies = [ [[package]] name = "ic-agent" version = "0.1.0" -source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=candid#f748c62cae9155a30047bfb88b66449b9016d63b" +source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#2fa51b424d990902ba4c276bdb3aca7ad30d554b" dependencies = [ "async-trait", "base32", @@ -1720,7 +1720,7 @@ dependencies = [ [[package]] name = "ic-types" version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#2fa51b424d990902ba4c276bdb3aca7ad30d554b" dependencies = [ "base32", "crc32fast", @@ -1753,11 +1753,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" +checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "hashbrown 0.8.2", ] @@ -1923,9 +1923,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.74" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" +checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" [[package]] name = "libflate" @@ -2001,7 +2001,7 @@ dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", "regex-syntax", - "syn 1.0.38", + "syn 1.0.39", "utf8-ranges", ] @@ -2044,7 +2044,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", ] [[package]] @@ -2075,9 +2075,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" +checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" dependencies = [ "adler", ] @@ -2160,7 +2160,7 @@ dependencies = [ "cfg-if", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -2256,7 +2256,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f3fc75e3697059fb1bc465e3d8cca6cf92f56854f201158b3f9c77d5a3cfa0" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "num-integer", "num-traits", ] @@ -2267,7 +2267,7 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "num-traits", ] @@ -2277,7 +2277,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", ] [[package]] @@ -2309,7 +2309,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -2326,9 +2326,9 @@ checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "once_cell" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" +checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" [[package]] name = "opaque-debug" @@ -2368,7 +2368,7 @@ version = "0.9.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "cc", "libc", "pkg-config", @@ -2530,7 +2530,7 @@ checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -2553,9 +2553,9 @@ checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" [[package]] name = "precomputed-hash" @@ -2620,7 +2620,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "version_check 0.9.2", ] @@ -2858,11 +2858,11 @@ dependencies = [ [[package]] name = "rayon" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" +checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "crossbeam-deque", "either", "rayon-core", @@ -2870,12 +2870,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" +checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0" dependencies = [ + "crossbeam-channel 0.4.3", "crossbeam-deque", - "crossbeam-queue", "crossbeam-utils 0.7.2", "lazy_static", "num_cpus", @@ -2898,9 +2898,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_users" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ "getrandom", "redox_syscall", @@ -2936,9 +2936,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" +checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" dependencies = [ "base64 0.12.3", "bytes 0.5.6", @@ -3007,11 +3007,11 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" [[package]] name = "rust-argon2" -version = "0.7.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" dependencies = [ - "base64 0.11.0", + "base64 0.12.3", "blake2b_simd", "constant_time_eq", "crossbeam-utils 0.7.2", @@ -3034,9 +3034,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693" +checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ "base64 0.12.3", "log", @@ -3172,7 +3172,7 @@ checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -3194,7 +3194,7 @@ checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -3389,9 +3389,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" +checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", @@ -3406,7 +3406,7 @@ checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "unicode-xid 0.2.1", ] @@ -3431,9 +3431,9 @@ checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" [[package]] name = "tar" -version = "0.4.29" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8a4c1d0bee3230179544336c15eefb563cf0302955d962e456542323e8c2e8a" +checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" dependencies = [ "filetime", "libc", @@ -3530,7 +3530,7 @@ checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -3553,19 +3553,20 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[package]] name = "tinyvec" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" +checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" [[package]] name = "tokio" @@ -3659,9 +3660,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" +checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", "rustls", @@ -3789,9 +3790,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" +checksum = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" dependencies = [ "lazy_static", ] @@ -3961,7 +3962,7 @@ dependencies = [ "nom", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", ] [[package]] @@ -4034,6 +4035,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.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasm-bindgen" version = "0.2.67" @@ -4057,7 +4064,7 @@ dependencies = [ "log", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "wasm-bindgen-shared", ] @@ -4091,7 +4098,7 @@ checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.38", + "syn 1.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index 23380a657d..09064d90a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,3 +2,6 @@ members = [ "src/dfx", ] + +[patch.crates-io] +ic-types = { git = "ssh://git@github.com/dfinity-lab/agent-rust.git", branch = "next", version = "0.1" } diff --git a/src/dfx/Cargo.toml b/src/dfx/Cargo.toml index ab2e7ad086..6aefbb8179 100644 --- a/src/dfx/Cargo.toml +++ b/src/dfx/Cargo.toml @@ -69,8 +69,7 @@ wasmparser = "0.45.0" [dependencies.ic-agent] version = "0.1.0" git = "ssh://git@github.com/dfinity-lab/agent-rust.git" -branch = "candid" -rev = "f748c62cae9155a30047bfb88b66449b9016d63b" +branch = "next" [dev-dependencies] env_logger = "0.6" From 9f300503a09f68fea6fc01db7c296b004d48b5c4 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 13:51:43 -0700 Subject: [PATCH 06/14] update e2e --- e2e/bats/assetscanister.bash | 14 +++++++------- e2e/bats/basic-project.bash | 6 +++--- e2e/bats/build_granular.bash | 8 ++++---- e2e/bats/identity.bash | 14 +++++++------- src/dfx/src/commands/canister/call.rs | 2 +- src/dfx/src/util/mod.rs | 13 ++++++++++--- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/e2e/bats/assetscanister.bash b/e2e/bats/assetscanister.bash index 99d0775538..9dba0de47e 100644 --- a/e2e/bats/assetscanister.bash +++ b/e2e/bats/assetscanister.bash @@ -21,11 +21,11 @@ teardown() { dfx build dfx canister install e2e_project_assets - assert_command dfx canister call --query e2e_project_assets retrieve '("binary/noise.txt")' - assert_eq '(vec { 184; 1; 32; 128; 10; 119; 49; 50; 32; 0; 120; 121; 10; 75; 76; 11; 10; 106; 107; })' + assert_command dfx canister call --query e2e_project_assets retrieve '("binary/noise.txt")' --output idl + assert_eq '(vec { 184; 1; 32; 128; 10; 119; 49; 50; 32; 0; 120; 121; 10; 75; 76; 11; 10; 106; 107 })' - assert_command dfx canister call --query e2e_project_assets retrieve '("text-with-newlines.txt")' - assert_eq '(vec { 99; 104; 101; 114; 114; 105; 101; 115; 10; 105; 116; 39; 115; 32; 99; 104; 101; 114; 114; 121; 32; 115; 101; 97; 115; 111; 110; 10; 67; 72; 69; 82; 82; 73; 69; 83; })' + assert_command dfx canister call --query e2e_project_assets retrieve '("text-with-newlines.txt")' --output idl + assert_eq '(vec { 99; 104; 101; 114; 114; 105; 101; 115; 10; 105; 116; 39; 115; 32; 99; 104; 101; 114; 114; 121; 32; 115; 101; 97; 115; 111; 110; 10; 67; 72; 69; 82; 82; 73; 69; 83 })' assert_command dfx canister call --update e2e_project_assets store '("AA", vec { 100; 107; 62; 9; })' assert_eq '()' @@ -33,13 +33,13 @@ teardown() { assert_eq '()' assert_command dfx canister call --query e2e_project_assets retrieve '("B")' - assert_eq '(vec { 88; 87; 86; })' + assert_eq '(vec { 88; 87; 86 })' assert_command dfx canister call --query e2e_project_assets retrieve '("AA")' - assert_eq '(vec { 100; 107; 62; 9; })' + assert_eq '(vec { 100; 107; 62; 9 })' assert_command dfx canister call --query e2e_project_assets retrieve '("B")' - assert_eq '(vec { 88; 87; 86; })' + assert_eq '(vec { 88; 87; 86 })' assert_command_fail dfx canister call --query e2e_project_assets retrieve '("C")' diff --git a/e2e/bats/basic-project.bash b/e2e/bats/basic-project.bash index b84fe66b27..6ec97673ae 100644 --- a/e2e/bats/basic-project.bash +++ b/e2e/bats/basic-project.bash @@ -90,8 +90,8 @@ teardown() { dfx build dfx canister install --all - assert_command dfx canister call hello inc '(42,false,"testzZ",vec{1;2;3},opt record{head=42; tail=opt record{head=+43; tail=null}}, variant { cons=record{ 42; variant { cons=record{43; variant { nil }} } } })' - assert_eq "(43, true, \"uftu{[\", vec { 2; 3; 4; }, opt record { head = 43; tail = opt record { head = 44; tail = null; }; }, variant { cons = record { 0 = 43; 1 = variant { cons = record { 0 = 44; 1 = variant { nil = null }; } }; } })" + assert_command dfx canister call hello inc '(42,false,"testzZ",vec{1;2;3},opt record{head=42; tail=opt record{head=+43; tail=null}}, variant { cons=record{ 42; variant { cons=record{43; variant { nil }} } } })' --output idl + assert_eq "(43, true, \"uftu{[\", vec { 2; 3; 4 }, opt record { head = 43; tail = opt record { head = 44; tail = null } }, variant { cons = record { 0 = 43; 1 = variant { cons = record { 0 = 44; 1 = variant { nil = null } } } } })" } @test "build + install + call -- matrix_multiply_mo" { @@ -102,5 +102,5 @@ teardown() { dfx canister install --all assert_command dfx canister call hello multiply '(vec{vec{1;2};vec{3;4};vec{5;6}},vec{vec{1;2;3};vec{4;5;6}})' - assert_eq "(vec { vec { 9; 12; 15; }; vec { 19; 26; 33; }; vec { 29; 40; 51; }; })" + assert_eq "(vec { vec { 9; 12; 15 }; vec { 19; 26; 33 }; vec { 29; 40; 51 } })" } diff --git a/e2e/bats/build_granular.bash b/e2e/bats/build_granular.bash index a56e6d4dda..c95f5cf641 100644 --- a/e2e/bats/build_granular.bash +++ b/e2e/bats/build_granular.bash @@ -65,11 +65,11 @@ teardown() { dfx build e2e_project_assets dfx canister install e2e_project_assets - assert_command dfx canister call --query e2e_project_assets retrieve '("binary/noise.txt")' - assert_eq '(vec { 184; 1; 32; 128; 10; 119; 49; 50; 32; 0; 120; 121; 10; 75; 76; 11; 10; 106; 107; })' + assert_command dfx canister call --query e2e_project_assets retrieve '("binary/noise.txt")' --output idl + assert_eq '(vec { 184; 1; 32; 128; 10; 119; 49; 50; 32; 0; 120; 121; 10; 75; 76; 11; 10; 106; 107 })' - assert_command dfx canister call --query e2e_project_assets retrieve '("text-with-newlines.txt")' - assert_eq '(vec { 99; 104; 101; 114; 114; 105; 101; 115; 10; 105; 116; 39; 115; 32; 99; 104; 101; 114; 114; 121; 32; 115; 101; 97; 115; 111; 110; 10; 67; 72; 69; 82; 82; 73; 69; 83; })' + assert_command dfx canister call --query e2e_project_assets retrieve '("text-with-newlines.txt")' --output idl + assert_eq '(vec { 99; 104; 101; 114; 114; 105; 101; 115; 10; 105; 116; 39; 115; 32; 99; 104; 101; 114; 114; 121; 32; 115; 101; 97; 115; 111; 110; 10; 67; 72; 69; 82; 82; 73; 69; 83 })' } diff --git a/e2e/bats/identity.bash b/e2e/bats/identity.bash index 87495e1ac9..7bbe614717 100644 --- a/e2e/bats/identity.bash +++ b/e2e/bats/identity.bash @@ -70,16 +70,16 @@ teardown() { assert_eq '(false)' # these all fail (other identities are not initializer; cannot store assets): - assert_command_fail dfx --identity bob canister call e2e_project_assets store '("B", vec { 88; 87; 86; })' - assert_command_fail dfx --identity default canister call e2e_project_assets store '("B", vec { 88; 87; 86; })' - assert_command_fail dfx canister call e2e_project_assets store '("B", vec { 88; 87; 86; })' + assert_command_fail dfx --identity bob canister call e2e_project_assets store '("B", vec { 88; 87; 86 })' + assert_command_fail dfx --identity default canister call e2e_project_assets store '("B", vec { 88; 87; 86 })' + assert_command_fail dfx canister call e2e_project_assets store '("B", vec { 88; 87; 86 })' assert_command_fail dfx canister call e2e_project_assets retrieve '("B")' # but alice, the initializer, can store assets: - assert_command dfx --identity alice canister call e2e_project_assets store '("B", vec { 88; 87; 86; })' + assert_command dfx --identity alice canister call e2e_project_assets store '("B", vec { 88; 87; 86 })' assert_eq '()' assert_command dfx canister call e2e_project_assets retrieve '("B")' - assert_eq '(vec { 88; 87; 86; })' + assert_eq '(vec { 88; 87; 86 })' } @test "after renaming an identity, the renamed identity is still initializer" { @@ -102,8 +102,8 @@ teardown() { assert_command dfx --identity bob canister call e2e_project amInitializer assert_eq '(true)' - assert_command dfx --identity bob canister call e2e_project_assets store '("B", vec { 40; 67; })' + assert_command dfx --identity bob canister call e2e_project_assets store '("B", vec { 40; 67 })' assert_eq '()' assert_command dfx canister call e2e_project_assets retrieve '("B")' - assert_eq '(vec { 40; 67; })' + assert_eq '(vec { 40; 67 })' } diff --git a/src/dfx/src/commands/canister/call.rs b/src/dfx/src/commands/canister/call.rs index 3f461f34c1..be26401aba 100644 --- a/src/dfx/src/commands/canister/call.rs +++ b/src/dfx/src/commands/canister/call.rs @@ -60,7 +60,7 @@ pub fn construct() -> App<'static, 'static> { .long("output") .takes_value(true) .conflicts_with("async") - .possible_values(&["idl", "raw"]), + .possible_values(&["idl", "raw", "pp"]), ) .arg( Arg::with_name("argument") diff --git a/src/dfx/src/util/mod.rs b/src/dfx/src/util/mod.rs index 6a10cc39b2..8249f2e56d 100644 --- a/src/dfx/src/util/mod.rs +++ b/src/dfx/src/util/mod.rs @@ -12,13 +12,13 @@ pub fn print_idl_blob( output_type: Option<&str>, method_type: &Option<(TypeEnv, Function)>, ) -> DfxResult<()> { - let output_type = output_type.unwrap_or("idl"); + let output_type = output_type.unwrap_or("pp"); match output_type { "raw" => { let hex_string = hex::encode(blob); println!("{}", hex_string); } - "idl" => { + "idl" | "pp" => { let result = match method_type { None => candid::IDLArgs::from_bytes(blob), Some((env, func)) => candid::IDLArgs::from_bytes_with_types(blob, &env, &func.rets), @@ -27,7 +27,14 @@ pub fn print_idl_blob( let hex_string = hex::encode(blob); eprintln!("Error deserializing blob 0x{}", hex_string); } - println!("{}", result?); + if output_type == "idl" { + println!( + "{}", + candid::parser::value::pretty::pp_args(&result?).pretty(usize::MAX) + ); + } else { + println!("{}", result?); + } } v => return Err(DfxError::Unknown(format!("Invalid output type: {}", v))), } From bbad1c36cafbb37a71f05f60cbd589646090c2f3 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 13:57:23 -0700 Subject: [PATCH 07/14] fix --- Cargo.lock | 48 +++++++++++++++++++++++----------------------- src/dfx/Cargo.toml | 1 + 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 11456dbe94..9a36d83f70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -307,7 +307,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "068a33520e21c1eea89726be4d6b3ce2e6b81046904367e1677287695a043abb" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -415,7 +415,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -659,7 +659,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab31ccaf3ab1184bab4a139afb0d23c3aa54144d4a92ef0d0de7653cad4f679f" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -971,7 +971,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -1236,7 +1236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f47da3a72ec598d9c8937a7ebca8962a5c7a1f28444e38c2b33c771ba3f55f05" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -1257,7 +1257,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", "synstructure", @@ -1411,7 +1411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -1998,7 +1998,7 @@ checksum = "797b1f8a0571b331c1b47e7db245af3dc634838da7a92b3bef4e30376ae1c347" dependencies = [ "beef", "fnv", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "regex-syntax", "syn 1.0.39", @@ -2158,7 +2158,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5a615a1ad92048ad5d9633251edb7492b8abc057d7a679a9898476aef173935" dependencies = [ "cfg-if", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -2307,7 +2307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -2528,7 +2528,7 @@ version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -2618,7 +2618,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", "version_check 0.9.2", @@ -2630,7 +2630,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "version_check 0.9.2", ] @@ -2658,9 +2658,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +checksum = "175c513d55719db99da20232b06cda8bab6b83ec2d04e3283edf0213c37c1a29" dependencies = [ "unicode-xid 0.2.1", ] @@ -2706,7 +2706,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", ] [[package]] @@ -3170,7 +3170,7 @@ version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -3192,7 +3192,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -3393,7 +3393,7 @@ version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "unicode-xid 0.2.1", ] @@ -3404,7 +3404,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", "unicode-xid 0.2.1", @@ -3528,7 +3528,7 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -3960,7 +3960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2ca2a14bc3fc5b64d188b087a7d3a927df87b152e941ccfbc66672e20c467ae" dependencies = [ "nom", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", ] @@ -4062,7 +4062,7 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", "wasm-bindgen-shared", @@ -4096,7 +4096,7 @@ version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ - "proc-macro2 1.0.19", + "proc-macro2 1.0.20", "quote 1.0.7", "syn 1.0.39", "wasm-bindgen-backend", diff --git a/src/dfx/Cargo.toml b/src/dfx/Cargo.toml index 6aefbb8179..1441201f0a 100644 --- a/src/dfx/Cargo.toml +++ b/src/dfx/Cargo.toml @@ -70,6 +70,7 @@ wasmparser = "0.45.0" version = "0.1.0" git = "ssh://git@github.com/dfinity-lab/agent-rust.git" branch = "next" +rev = "2fa51b424d990902ba4c276bdb3aca7ad30d554b" [dev-dependencies] env_logger = "0.6" From 68d51d23aa54e353ec28e074c12cade77b6a9941 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 14:06:54 -0700 Subject: [PATCH 08/14] fix --- Cargo.lock | 211 ++++++++++++++++++++++----------------------- Cargo.toml | 2 +- src/dfx/Cargo.toml | 7 +- 3 files changed, 109 insertions(+), 111 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a36d83f70..e422aa7e2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -307,9 +307,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "068a33520e21c1eea89726be4d6b3ce2e6b81046904367e1677287695a043abb" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -411,13 +411,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.40" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" +checksum = "caae68055714ff28740f310927e04f2eba76ff580b16fb18ed90073ee71646f7" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -439,9 +439,9 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "awc" @@ -659,16 +659,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab31ccaf3ab1184bab4a139afb0d23c3aa54144d4a92ef0d0de7653cad4f679f" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] name = "cc" -version = "1.0.59" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" +checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" [[package]] name = "cfg-if" @@ -678,9 +678,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chrono" -version = "0.4.15" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" +checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" dependencies = [ "num-integer", "num-traits", @@ -918,7 +918,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "cfg-if", "crossbeam-utils 0.7.2", "lazy_static", @@ -954,7 +954,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "cfg-if", "lazy_static", ] @@ -971,9 +971,9 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -1189,9 +1189,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.24" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" +checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" dependencies = [ "cfg-if", ] @@ -1236,9 +1236,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f47da3a72ec598d9c8937a7ebca8962a5c7a1f28444e38c2b33c771ba3f55f05" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -1257,9 +1257,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "synstructure", ] @@ -1289,9 +1289,9 @@ checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] name = "flate2" -version = "1.0.17" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" +checksum = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e" dependencies = [ "cfg-if", "crc32fast", @@ -1411,9 +1411,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -1476,7 +1476,7 @@ checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1550,7 +1550,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", ] [[package]] @@ -1753,11 +1753,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.5.2" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" +checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "hashbrown 0.8.2", ] @@ -1923,9 +1923,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.76" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" +checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" [[package]] name = "libflate" @@ -1998,10 +1998,10 @@ checksum = "797b1f8a0571b331c1b47e7db245af3dc634838da7a92b3bef4e30376ae1c347" dependencies = [ "beef", "fnv", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", "regex-syntax", - "syn 1.0.39", + "syn 1.0.38", "utf8-ranges", ] @@ -2044,7 +2044,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", ] [[package]] @@ -2075,9 +2075,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" +checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" dependencies = [ "adler", ] @@ -2158,9 +2158,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5a615a1ad92048ad5d9633251edb7492b8abc057d7a679a9898476aef173935" dependencies = [ "cfg-if", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -2256,7 +2256,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f3fc75e3697059fb1bc465e3d8cca6cf92f56854f201158b3f9c77d5a3cfa0" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "num-integer", "num-traits", ] @@ -2267,7 +2267,7 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "num-traits", ] @@ -2277,7 +2277,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", ] [[package]] @@ -2307,9 +2307,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -2326,9 +2326,9 @@ checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "once_cell" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" +checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" [[package]] name = "opaque-debug" @@ -2368,7 +2368,7 @@ version = "0.9.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "cc", "libc", "pkg-config", @@ -2528,9 +2528,9 @@ version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -2553,9 +2553,9 @@ checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "ppv-lite86" -version = "0.2.9" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" +checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" [[package]] name = "precomputed-hash" @@ -2618,9 +2618,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "version_check 0.9.2", ] @@ -2630,7 +2630,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", "version_check 0.9.2", ] @@ -2658,9 +2658,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.20" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175c513d55719db99da20232b06cda8bab6b83ec2d04e3283edf0213c37c1a29" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" dependencies = [ "unicode-xid 0.2.1", ] @@ -2706,7 +2706,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", ] [[package]] @@ -2858,11 +2858,11 @@ dependencies = [ [[package]] name = "rayon" -version = "1.4.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270" +checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.0.0", "crossbeam-deque", "either", "rayon-core", @@ -2870,12 +2870,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.8.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0" +checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" dependencies = [ - "crossbeam-channel 0.4.3", "crossbeam-deque", + "crossbeam-queue", "crossbeam-utils 0.7.2", "lazy_static", "num_cpus", @@ -2898,9 +2898,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_users" -version = "0.3.5" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" dependencies = [ "getrandom", "redox_syscall", @@ -2936,9 +2936,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.8" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" +checksum = "12427a5577082c24419c9c417db35cfeb65962efc7675bb6b0d5f1f9d315bfe6" dependencies = [ "base64 0.12.3", "bytes 0.5.6", @@ -3007,11 +3007,11 @@ checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" [[package]] name = "rust-argon2" -version = "0.8.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19" +checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" dependencies = [ - "base64 0.12.3", + "base64 0.11.0", "blake2b_simd", "constant_time_eq", "crossbeam-utils 0.7.2", @@ -3034,9 +3034,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "cac94b333ee2aac3284c5b8a1b7fb4dd11cba88c244e3fe33cdbd047af0eb693" dependencies = [ "base64 0.12.3", "log", @@ -3170,9 +3170,9 @@ version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -3192,9 +3192,9 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -3389,11 +3389,11 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.39" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" +checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", "unicode-xid 0.2.1", ] @@ -3404,9 +3404,9 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "unicode-xid 0.2.1", ] @@ -3431,9 +3431,9 @@ checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" [[package]] name = "tar" -version = "0.4.30" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" +checksum = "c8a4c1d0bee3230179544336c15eefb563cf0302955d962e456542323e8c2e8a" dependencies = [ "filetime", "libc", @@ -3528,9 +3528,9 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -3553,20 +3553,19 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[package]] name = "tinyvec" -version = "0.3.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" [[package]] name = "tokio" @@ -3660,9 +3659,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "228139ddd4fea3fa345a29233009635235833e52807af7ea6448ead03890d6a9" dependencies = [ "futures-core", "rustls", @@ -3790,9 +3789,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.15" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" +checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" dependencies = [ "lazy_static", ] @@ -3960,9 +3959,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2ca2a14bc3fc5b64d188b087a7d3a927df87b152e941ccfbc66672e20c467ae" dependencies = [ "nom", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", ] [[package]] @@ -4035,12 +4034,6 @@ 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.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasm-bindgen" version = "0.2.67" @@ -4062,9 +4055,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "wasm-bindgen-shared", ] @@ -4096,9 +4089,9 @@ version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ - "proc-macro2 1.0.20", + "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.39", + "syn 1.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index 09064d90a1..eaa1d3163d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,4 @@ members = [ ] [patch.crates-io] -ic-types = { git = "ssh://git@github.com/dfinity-lab/agent-rust.git", branch = "next", version = "0.1" } +ic-types = { git = "ssh://git@github.com/dfinity-lab/agent-rust.git", branch = "next", version = "0.1.1" } diff --git a/src/dfx/Cargo.toml b/src/dfx/Cargo.toml index 1441201f0a..cbb3d53a84 100644 --- a/src/dfx/Cargo.toml +++ b/src/dfx/Cargo.toml @@ -32,7 +32,6 @@ erased-serde = "0.3.10" flate2 = "1.0.11" futures = "0.1.28" hex = "0.4.2" -ic-types = "0.1.1" indicatif = "0.13.0" lazy-init = "0.3.0" lazy_static = "1.4.0" @@ -72,6 +71,12 @@ git = "ssh://git@github.com/dfinity-lab/agent-rust.git" branch = "next" rev = "2fa51b424d990902ba4c276bdb3aca7ad30d554b" +[dependencies.ic-types] +version = "0.1.1" +git = "ssh://git@github.com/dfinity-lab/agent-rust.git" +branch = "next" +rev = "2fa51b424d990902ba4c276bdb3aca7ad30d554b" + [dev-dependencies] env_logger = "0.6" proptest = "0.9.5" From adcd10d0008ffe202b67583c935784c173579410 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 14:25:04 -0700 Subject: [PATCH 09/14] fix --- e2e/bats/basic-project.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/bats/basic-project.bash b/e2e/bats/basic-project.bash index 6ec97673ae..e9294ff561 100644 --- a/e2e/bats/basic-project.bash +++ b/e2e/bats/basic-project.bash @@ -91,7 +91,7 @@ teardown() { dfx canister install --all assert_command dfx canister call hello inc '(42,false,"testzZ",vec{1;2;3},opt record{head=42; tail=opt record{head=+43; tail=null}}, variant { cons=record{ 42; variant { cons=record{43; variant { nil }} } } })' --output idl - assert_eq "(43, true, \"uftu{[\", vec { 2; 3; 4 }, opt record { head = 43; tail = opt record { head = 44; tail = null } }, variant { cons = record { 0 = 43; 1 = variant { cons = record { 0 = 44; 1 = variant { nil = null } } } } })" + assert_eq "(43, true, \"uftu{[\", vec { 2; 3; 4 }, opt record { head = 43; tail = opt record { head = 44; tail = null } }, variant { cons = record { 43; variant { cons = record { 44; variant { nil } } } } })" } @test "build + install + call -- matrix_multiply_mo" { From 0589e77477121e595198ed613a84acaea6632971 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 15:20:31 -0700 Subject: [PATCH 10/14] pretty_parse --- src/dfx/src/util/mod.rs | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/dfx/src/util/mod.rs b/src/dfx/src/util/mod.rs index 8249f2e56d..33dfed114e 100644 --- a/src/dfx/src/util/mod.rs +++ b/src/dfx/src/util/mod.rs @@ -56,7 +56,7 @@ pub fn get_candid_type( pub fn check_candid_file(idl_path: &std::path::Path) -> DfxResult<(TypeEnv, Option)> { let idl_file = std::fs::read_to_string(idl_path)?; - let ast = idl_file.parse::()?; + let ast = candid::pretty_parse::(idl_path.to_str().unwrap(), &idl_file)?; let mut env = TypeEnv::new(); let actor = check_prog(&mut env, &ast)?; Ok((env, actor)) @@ -77,39 +77,37 @@ pub fn blob_from_arguments( } "idl" => { let arguments = arguments.unwrap_or("()"); - let args: DfxResult = - arguments.parse::().map_err(|e: candid::Error| { - DfxError::InvalidArgument(format!("Invalid Candid values: {}", e)) - }); let typed_args = match method_type { None => { eprintln!("cannot find method type, dfx will send message with inferred type"); - args?.to_bytes() + candid::pretty_parse::("Candid argument", &arguments) + .map_err(|e| { + DfxError::InvalidArgument(format!("Invalid Candid values: {}", e)) + })? + .to_bytes() } Some((env, func)) => { let first_char = arguments.chars().next(); let is_candid_format = first_char.map_or(false, |c| c == '('); // If parsing fails and method expects a single value, try parsing as IDLValue. // If it still fails, and method expects a text type, send arguments as text. - let args = args.or_else(|e| { + let args = arguments.parse::().or_else(|_| { if func.args.len() == 1 && !is_candid_format { let is_quote = first_char.map_or(false, |c| c == '"'); if candid::types::Type::Text == func.args[0] && !is_quote { Ok(IDLValue::Text(arguments.to_string())) } else { - arguments.parse::().map_err(|e| { - DfxError::InvalidArgument(format!( - "Invalid Candid values: {}", - e - )) - }) + candid::pretty_parse::("Candid argument", &arguments) } .map(|v| IDLArgs::new(&[v])) } else { - Err(e) + candid::pretty_parse::("Candid argument", &arguments) } }); - args?.to_bytes_with_types(&env, &func.args) + args.map_err(|e| { + DfxError::InvalidArgument(format!("Invalid Candid values: {}", e)) + })? + .to_bytes_with_types(&env, &func.args) } } .map_err(|e| { From dde3434205961720bff6d5c0eea13d07e2f757b3 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 17:19:43 -0700 Subject: [PATCH 11/14] use candid crate to generate js binding --- src/dfx/src/lib/models/canister.rs | 35 +++++------------------------- src/dfx/src/util/mod.rs | 2 +- 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/src/dfx/src/lib/models/canister.rs b/src/dfx/src/lib/models/canister.rs index 622f27df79..0fbcfade8e 100644 --- a/src/dfx/src/lib/models/canister.rs +++ b/src/dfx/src/lib/models/canister.rs @@ -1,4 +1,3 @@ -use crate::config::cache::Cache; use crate::config::dfinity::Config; use crate::lib::builders::{ BuildConfig, BuildOutput, BuilderPool, CanisterBuilder, IdlBuildOutput, WasmBuildOutput, @@ -7,7 +6,7 @@ use crate::lib::canister_info::CanisterInfo; use crate::lib::environment::Environment; use crate::lib::error::{BuildErrorKind, DfxError, DfxResult}; use crate::lib::models::canister_id_store::CanisterIdStore; -use crate::util::assets; +use crate::util::{assets, check_candid_file}; use ic_types::principal::Principal as CanisterId; use petgraph::graph::{DiGraph, NodeIndex}; use rand::{thread_rng, Rng, RngCore}; @@ -89,7 +88,6 @@ impl Canister { pub struct CanisterPool { canisters: Vec>, logger: Logger, - cache: Arc, } struct PoolConstructHelper<'a> { @@ -195,7 +193,6 @@ impl CanisterPool { Ok(CanisterPool { canisters: canisters_map, logger, - cache: env.get_cache().clone(), }) } @@ -331,7 +328,7 @@ impl CanisterPool { .map(|_| {}) .map_err(DfxError::from)?; - build_canister_js(self.cache.clone(), &canister.canister_id(), &canister.info)?; + build_canister_js(&canister.canister_id(), &canister.info)?; canister.postbuild(self, build_config) } @@ -440,35 +437,15 @@ fn decode_path_to_str(path: &Path) -> DfxResult<&str> { } /// Create a canister JavaScript DID and Actor Factory. -fn build_canister_js( - cache: Arc, - canister_id: &CanisterId, - canister_info: &CanisterInfo, -) -> DfxResult { +fn build_canister_js(canister_id: &CanisterId, canister_info: &CanisterInfo) -> DfxResult { let output_did_js_path = canister_info.get_build_idl_path().with_extension("did.js"); let output_canister_js_path = canister_info.get_build_idl_path().with_extension("js"); - let mut cmd = cache.get_binary_command("didc")?; - let cmd = cmd - .arg("--js") - .arg(&canister_info.get_build_idl_path()) - .arg("-o") - .arg(&output_did_js_path); - - let output = cmd.output()?; - if !output.status.success() { - return Err(DfxError::BuildError(BuildErrorKind::CompilerError( - format!("{:?}", cmd), - String::from_utf8_lossy(&output.stdout).to_string(), - String::from_utf8_lossy(&output.stderr).to_string(), - ))); - } else if !output.stderr.is_empty() { - // Cannot use eprintln, because it would interfere with the progress bar. - println!("{}", String::from_utf8_lossy(&output.stderr)); - } + let (env, ty) = check_candid_file(&canister_info.get_build_idl_path())?; + let content = candid::bindings::javascript::compile(&env, &ty); + std::fs::write(output_did_js_path, content)?; let mut language_bindings = assets::language_bindings()?; - for f in language_bindings.entries()? { let mut file = f?; let mut file_contents = String::new(); diff --git a/src/dfx/src/util/mod.rs b/src/dfx/src/util/mod.rs index 33dfed114e..09260e13ed 100644 --- a/src/dfx/src/util/mod.rs +++ b/src/dfx/src/util/mod.rs @@ -56,7 +56,7 @@ pub fn get_candid_type( pub fn check_candid_file(idl_path: &std::path::Path) -> DfxResult<(TypeEnv, Option)> { let idl_file = std::fs::read_to_string(idl_path)?; - let ast = candid::pretty_parse::(idl_path.to_str().unwrap(), &idl_file)?; + let ast = candid::pretty_parse::(&idl_path.to_string_lossy(), &idl_file)?; let mut env = TypeEnv::new(); let actor = check_prog(&mut env, &ast)?; Ok((env, actor)) From 036fc791eb4d3055e0ffcfb8221b8b837a517e2d Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Thu, 3 Sep 2020 17:38:02 -0700 Subject: [PATCH 12/14] remove didc binary from cache --- assets.nix | 1 - distributed-canisters.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/assets.nix b/assets.nix index a519a789ec..6a419d45d3 100644 --- a/assets.nix +++ b/assets.nix @@ -8,7 +8,6 @@ pkgs.runCommandNoCCLocal "assets" {} '' cp ${pkgs.dfinity.ic-replica}/bin/replica $out cp ${pkgs.dfinity.ic-starter}/bin/ic-starter $out cp -R ${pkgs.motoko.base-src} $out/base - cp ${pkgs.motoko.didc}/bin/didc $out cp ${pkgs.motoko.mo-doc}/bin/mo-doc $out cp ${pkgs.motoko.mo-ide}/bin/mo-ide $out cp ${pkgs.motoko.moc}/bin/moc $out diff --git a/distributed-canisters.nix b/distributed-canisters.nix index 91d41d19a0..9d334c36c2 100644 --- a/distributed-canisters.nix +++ b/distributed-canisters.nix @@ -6,7 +6,7 @@ let in pkgs.runCommandNoCCLocal "distributed-canisters" { - inherit (pkgs.motoko) didc rts; + inherit (pkgs.motoko) rts; moc = pkgs.motoko.moc; base = pkgs.motoko.base-src; } '' From 597b31b8c13293d9fc1d065bee584d180068156a Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Tue, 8 Sep 2020 10:20:26 -0700 Subject: [PATCH 13/14] bump candid to 0.6.0 --- Cargo.lock | 29 ++++++++++++++++++++++++++--- src/dfx/Cargo.toml | 6 +++--- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e422aa7e2a..407e8bbbf9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -653,6 +653,29 @@ dependencies = [ "serde", ] +[[package]] +name = "candid" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f6e879d53af7853a2d8ec7fd7d786bbf363a1535296542b957e67592f229dc" +dependencies = [ + "byteorder", + "candid_derive", + "codespan-reporting", + "hex", + "ic-types", + "lalrpop", + "lalrpop-util", + "leb128", + "logos", + "num-bigint", + "num-traits", + "num_enum", + "paste", + "pretty", + "serde", +] + [[package]] name = "candid_derive" version = "0.4.0" @@ -1013,7 +1036,7 @@ dependencies = [ "actix-web", "atty", "base64 0.11.0", - "candid", + "candid 0.6.0", "chrono", "clap", "console 0.7.7", @@ -1698,7 +1721,7 @@ dependencies = [ "base32", "base64 0.12.3", "byteorder", - "candid", + "candid 0.5.4", "delay", "hex", "ic-types", @@ -1720,7 +1743,7 @@ dependencies = [ [[package]] name = "ic-types" version = "0.1.1" -source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#2fa51b424d990902ba4c276bdb3aca7ad30d554b" +source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#35a0f9851cf8cceea34acf405ba50c84ab5fbc5e" dependencies = [ "base32", "crc32fast", diff --git a/src/dfx/Cargo.toml b/src/dfx/Cargo.toml index cbb3d53a84..c9b13f0fa1 100644 --- a/src/dfx/Cargo.toml +++ b/src/dfx/Cargo.toml @@ -21,7 +21,7 @@ actix-server = "0.6.1" actix-web = { version = "1.0.8", features = [ "default", "openssl", "ssl" ] } atty = "0.2.13" base64 = "0.11.0" -candid = "0.5.4" +candid = "0.6.0" chrono = "0.4.9" clap = "2.33.0" console = "0.7.7" @@ -69,13 +69,13 @@ wasmparser = "0.45.0" version = "0.1.0" git = "ssh://git@github.com/dfinity-lab/agent-rust.git" branch = "next" -rev = "2fa51b424d990902ba4c276bdb3aca7ad30d554b" +rev = "35a0f9851cf8cceea34acf405ba50c84ab5fbc5e" [dependencies.ic-types] version = "0.1.1" git = "ssh://git@github.com/dfinity-lab/agent-rust.git" branch = "next" -rev = "2fa51b424d990902ba4c276bdb3aca7ad30d554b" +rev = "35a0f9851cf8cceea34acf405ba50c84ab5fbc5e" [dev-dependencies] env_logger = "0.6" From 71b29c4b4ce80c4a2b06e7d72dde821aba863b81 Mon Sep 17 00:00:00 2001 From: chenyan-dfinity Date: Tue, 8 Sep 2020 10:31:14 -0700 Subject: [PATCH 14/14] fix --- Cargo.lock | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 407e8bbbf9..016d22ce0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -630,29 +630,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" -[[package]] -name = "candid" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce199442195970318ccd0d8f94c7e2b2bf60c1bf23ed7be2b2ae91c2d8dff3a" -dependencies = [ - "byteorder", - "candid_derive", - "codespan-reporting", - "hex", - "ic-types", - "lalrpop", - "lalrpop-util", - "leb128", - "logos", - "num-bigint", - "num-traits", - "num_enum", - "paste", - "pretty", - "serde", -] - [[package]] name = "candid" version = "0.6.0" @@ -1036,7 +1013,7 @@ dependencies = [ "actix-web", "atty", "base64 0.11.0", - "candid 0.6.0", + "candid", "chrono", "clap", "console 0.7.7", @@ -1715,13 +1692,13 @@ dependencies = [ [[package]] name = "ic-agent" version = "0.1.0" -source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#2fa51b424d990902ba4c276bdb3aca7ad30d554b" +source = "git+ssh://git@github.com/dfinity-lab/agent-rust.git?branch=next#35a0f9851cf8cceea34acf405ba50c84ab5fbc5e" dependencies = [ "async-trait", "base32", "base64 0.12.3", "byteorder", - "candid 0.5.4", + "candid", "delay", "hex", "ic-types",