From 33e6e4dbebc40eaea3db3cf860d4dcf21634b3cc Mon Sep 17 00:00:00 2001 From: tiye Date: Sat, 18 May 2024 21:27:31 +0800 Subject: [PATCH] upgrade deps; ABI upgrade to 0.0.8; tag 0.2.3 --- .github/workflows/check.yaml | 14 +--- Cargo.lock | 127 +++++++++++++++++------------------ Cargo.toml | 18 ++--- calcit.cirru | 2 +- compact.cirru | 2 +- src/fs.rs | 4 +- src/lib.rs | 2 +- src/process.rs | 2 +- 8 files changed, 79 insertions(+), 92 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 838f93b..4692e42 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -16,20 +16,12 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly + toolchain: stable components: clippy - - uses: supplypike/setup-bin@v3 + - uses: calcit-lang/setup-cr@0.0.3 with: - uri: "https://github.com/calcit-lang/calcit/releases/download/0.8.36/cr" - name: "cr" - version: "0.8.36" - - - uses: supplypike/setup-bin@v3 - with: - uri: "https://github.com/calcit-lang/calcit/releases/download/0.8.36/caps" - name: "caps" - version: "0.8.36" + version: "0.8.51" - run: cargo build --release diff --git a/Cargo.lock b/Cargo.lock index a49e3d3..e7e8fb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,9 +44,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.3.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bumpalo" @@ -56,7 +56,7 @@ checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "calcit_std" -version = "0.2.2" +version = "0.2.3" dependencies = [ "chrono", "cirru_edn", @@ -83,26 +83,31 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] name = "cirru_edn" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d343bd5f40a4d0c77552307fa1d4a1457ebdafe988a5a478c8b15b59b89087" +checksum = "cf2af443516dfa62939fbfe82812601c1cb5fc89fdf7356eee519d7b056a264d" dependencies = [ "bincode", "cirru_parser", @@ -137,9 +142,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "ctrlc" -version = "3.4.0" +version = "3.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" +checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" dependencies = [ "nix", "windows-sys", @@ -259,9 +264,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "link-cplusplus" @@ -298,14 +303,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags", "cfg-if", + "cfg_aliases", "libc", - "static_assertions", ] [[package]] @@ -331,18 +336,18 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -400,41 +405,35 @@ checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" [[package]] name = "serde" -version = "1.0.185" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.185" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.64", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", "serde", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "syn" version = "1.0.107" @@ -448,9 +447,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "7ad3dee41f36859875573074334c200d1add8e4a87bb37113ebd31d926b7b11f" dependencies = [ "proc-macro2", "quote", @@ -466,17 +465,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi", - "winapi", -] - [[package]] name = "unicode-ident" version = "1.0.5" @@ -497,9 +485,9 @@ checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -598,22 +586,23 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", @@ -622,42 +611,48 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" diff --git a/Cargo.toml b/Cargo.toml index 79b2301..b441412 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "calcit_std" -version = "0.2.2" +version = "0.2.3" authors = ["jiyinyiyong "] edition = "2021" @@ -14,17 +14,17 @@ crate-type = ["dylib"] # Creates dynamic lib # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.185", features = ["derive"] } -serde_json = "1.0.105" -chrono = "0.4.26" -cirru_edn = "0.6.2" -cirru_parser = "0.1.28" +serde = { version = "1.0.202", features = ["derive"] } +serde_json = "1.0.117" +chrono = "0.4.38" +cirru_edn = "0.6.5" +cirru_parser = "0.1.29" nanoid = "0.4.0" rand = "0.8.5" -ctrlc = "3.4.0" +ctrlc = "3.4.4" md5 = "0.7.0" -walkdir = "2.3.3" -glob = "0.3.0" +walkdir = "2.5.0" +glob = "0.3.1" # [profile.release] # lto = true diff --git a/calcit.cirru b/calcit.cirru index ac82e31..e9481fa 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -1,6 +1,6 @@ {} (:package |calcit.std) - :configs $ {} (:init-fn |calcit.std.test/main!) (:port 6001) (:reload-fn |calcit.std.test/reload!) (:version |0.2.1) + :configs $ {} (:init-fn |calcit.std.test/main!) (:port 6001) (:reload-fn |calcit.std.test/reload!) (:version |0.2.3) :modules $ [] :entries $ {} :files $ {} diff --git a/compact.cirru b/compact.cirru index abd9cbf..f865a15 100644 --- a/compact.cirru +++ b/compact.cirru @@ -1,6 +1,6 @@ {} (:package |calcit.std) - :configs $ {} (:init-fn |calcit.std.test/main!) (:reload-fn |calcit.std.test/reload!) (:version |0.2.1) + :configs $ {} (:init-fn |calcit.std.test/main!) (:reload-fn |calcit.std.test/reload!) (:version |0.2.3) :modules $ [] :entries $ {} :files $ {} diff --git a/src/fs.rs b/src/fs.rs index d46dd33..1e03b22 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -47,7 +47,7 @@ pub fn read_file_by_line( match read_lines(&**name) { Ok(lines) => { // Consumes the iterator, returns an (Optional) String - for line in lines.flatten() { + for line in lines.map_while(Result::ok) { match handler(vec![Edn::str(line)]) { Ok(_) => {} Err(e) => return Err(format!("failed reading line: {}", e)), @@ -92,7 +92,7 @@ pub fn append_file(args: Vec) -> Result { if args.len() == 2 { match (&args[0], &args[1]) { (Edn::Str(name), Edn::Str(content)) => { - let mut file = OpenOptions::new().write(true).append(true).open(&**name).unwrap(); + let mut file = OpenOptions::new().append(true).open(&**name).unwrap(); if let Err(e) = writeln!(file, "{}", content) { Err(format!("Failed to append to file {name:?}: {e}")) diff --git a/src/lib.rs b/src/lib.rs index 8d79150..7b56076 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,5 +20,5 @@ pub use time::{set_interval, set_timeout}; #[no_mangle] pub fn abi_version() -> String { - String::from("0.0.7") + String::from("0.0.8") } diff --git a/src/process.rs b/src/process.rs index c553134..60dd0f4 100644 --- a/src/process.rs +++ b/src/process.rs @@ -12,7 +12,7 @@ pub fn execute_command(args: Vec) -> Result { for (idx, piece) in ys.0.iter().enumerate() { if let Edn::Str(s) = piece { if idx == 0 { - cmd = (**s).to_owned(); + (**s).clone_into(&mut cmd); } else { xs.push((**s).to_owned()); }