diff --git a/pkgs/id/Cargo.lock b/pkgs/id/Cargo.lock index f8d4a026f5..9cf1410b11 100644 --- a/pkgs/id/Cargo.lock +++ b/pkgs/id/Cargo.lock @@ -349,15 +349,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "atoi" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" -dependencies = [ - "num-traits", -] - [[package]] name = "atomic-polyfill" version = "1.0.3" @@ -601,9 +592,6 @@ name = "bitflags" version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" -dependencies = [ - "serde_core", -] [[package]] name = "blake2" @@ -1295,15 +1283,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" -[[package]] -name = "crossbeam-queue" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.23" @@ -1701,12 +1680,6 @@ dependencies = [ "litrs", ] -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - [[package]] name = "dunce" version = "1.0.5" @@ -1803,9 +1776,6 @@ name = "either" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" -dependencies = [ - "serde", -] [[package]] name = "elliptic-curve" @@ -1931,16 +1901,6 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" -[[package]] -name = "etcetera" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de48cc4d1c1d97a20fd819def54b890cadde72ed3ad0c614822a0a433361be96" -dependencies = [ - "cfg-if", - "windows-sys 0.61.2", -] - [[package]] name = "event-listener" version = "5.4.2" @@ -2181,17 +2141,6 @@ dependencies = [ "futures-util", ] -[[package]] -name = "futures-intrusive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot", -] - [[package]] name = "futures-io" version = "0.3.34" @@ -2520,11 +2469,6 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.2.0", -] [[package]] name = "hashbrown" @@ -2546,15 +2490,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "hashlink" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824e001ac4f3012dd16a264bec811403a67ca9deb6c102fc5049b32c4574b35f" -dependencies = [ - "hashbrown 0.16.1", -] - [[package]] name = "hax-lib" version = "0.3.7" @@ -3022,7 +2957,7 @@ dependencies = [ "n0-mainline", "p2panda-auth", "p2panda-core", - "p2panda-encryption 0.7.1", + "p2panda-encryption", "p2panda-store", "p2panda-sync", "postcard", @@ -3964,16 +3899,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" -[[package]] -name = "md-5" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" -dependencies = [ - "cfg-if", - "digest 0.11.3", -] - [[package]] name = "md5" version = "0.8.1" @@ -4062,12 +3987,6 @@ dependencies = [ "sha3 0.11.0", ] -[[package]] -name = "mock_instant" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb517913cfcfb9eeda59f36020269075a152701a01606c612f547e4890be399" - [[package]] name = "module-lattice" version = "0.2.3" @@ -4744,40 +4663,15 @@ dependencies = [ "cbor-core", "ed25519-dalek 2.2.0", "hex", - "mock_instant", "rand 0.8.8", "serde", "serde_bytes", "thiserror 2.0.21", - "tracing-subscriber", -] - -[[package]] -name = "p2panda-encryption" -version = "0.7.1" -dependencies = [ - "chacha20poly1305", - "curve25519-dalek 4.1.3", - "hex", - "hkdf 0.12.4", - "hpke-rs", - "hpke-rs-crypto", - "hpke-rs-rust-crypto", - "p2panda-core", - "rand_chacha 0.9.0", - "serde", - "serde_bytes", - "sha2 0.10.9", - "subtle", - "thiserror 2.0.21", - "x25519-dalek", - "zeroize", ] [[package]] name = "p2panda-encryption" version = "0.7.1" -source = "git+https://github.com/p2panda/p2panda?rev=da80c05b95269926bf58121cf6a2d3dd5ca41dfc#da80c05b95269926bf58121cf6a2d3dd5ca41dfc" dependencies = [ "chacha20poly1305", "curve25519-dalek 4.1.3", @@ -4805,28 +4699,6 @@ dependencies = [ "async-stream", "futures-util", "p2panda-core", - "p2panda-encryption 0.7.1 (git+https://github.com/p2panda/p2panda?rev=da80c05b95269926bf58121cf6a2d3dd5ca41dfc)", - "rand 0.10.3", - "rand_chacha 0.10.0", - "serde", - "sqlx", - "thiserror 2.0.21", - "tokio", -] - -[[package]] -name = "p2panda-stream" -version = "0.7.1" -source = "git+https://github.com/p2panda/p2panda?rev=da80c05b95269926bf58121cf6a2d3dd5ca41dfc#da80c05b95269926bf58121cf6a2d3dd5ca41dfc" -dependencies = [ - "futures-util", - "indexmap", - "p2panda-core", - "p2panda-store", - "pin-project", - "thiserror 2.0.21", - "tokio", - "tracing", ] [[package]] @@ -4837,15 +4709,12 @@ dependencies = [ "futures-util", "p2panda-core", "p2panda-store", - "p2panda-stream", "pin-project-lite", - "rand 0.10.3", "serde", "thiserror 2.0.21", "tokio", "tokio-stream", "tracing", - "tracing-subscriber", ] [[package]] @@ -5904,7 +5773,7 @@ dependencies = [ "bitflags", "fallible-iterator", "fallible-streaming-iterator", - "hashlink 0.9.1", + "hashlink", "libsqlite3-sys", "smallvec", ] @@ -6736,177 +6605,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a0219bd7d979d58245a4f41f695e1ac9f8befdffadd7f61f1bae9e39abc6620" -[[package]] -name = "sqlx" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "378620ccc25c62c89d8be1c819e76a88d59bdcc3304733330788948e619bfd71" -dependencies = [ - "sqlx-core", - "sqlx-macros", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", -] - -[[package]] -name = "sqlx-core" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b44e85bf579a8eeb4ceaa77a3a523baf2bf0e9bac7e40f405d537b5d2d5ccb" -dependencies = [ - "base64 0.22.1", - "bytes", - "cfg-if", - "crc", - "crossbeam-queue", - "either", - "event-listener", - "futures-core", - "futures-intrusive", - "futures-io", - "futures-util", - "hashbrown 0.16.1", - "hashlink 0.11.1", - "indexmap", - "log", - "memchr", - "percent-encoding", - "serde", - "serde_json", - "sha2 0.10.9", - "smallvec", - "thiserror 2.0.21", - "tokio", - "tokio-stream", - "tracing", - "url", -] - -[[package]] -name = "sqlx-macros" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd2b84f2bc39a5705ef27ec785a11c934a41bbd4a24941e257927cddc26b60bf" -dependencies = [ - "proc-macro2", - "quote", - "sqlx-core", - "sqlx-macros-core", - "syn 2.0.119", -] - -[[package]] -name = "sqlx-macros-core" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8d96de5fdc85a5c4ec813432b523ec637e80ba98f046555f75f7908ddac7c3" -dependencies = [ - "cfg-if", - "dotenvy", - "either", - "heck", - "hex", - "proc-macro2", - "quote", - "serde", - "serde_json", - "sha2 0.10.9", - "sqlx-core", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", - "syn 2.0.119", - "thiserror 2.0.21", - "tokio", - "url", -] - -[[package]] -name = "sqlx-mysql" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b8020fe17c5f2c245bfa2505d7ef59c5604839527c740266ad2214acebea27" -dependencies = [ - "bitflags", - "byteorder", - "bytes", - "crc", - "digest 0.11.3", - "dotenvy", - "either", - "futures-core", - "futures-util", - "generic-array 0.14.7", - "log", - "percent-encoding", - "serde", - "sha1 0.11.0", - "sha2 0.11.0", - "sqlx-core", - "thiserror 2.0.21", - "tracing", -] - -[[package]] -name = "sqlx-postgres" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a2bdd6e83f6b3ea525ca9fee568030508b58355a43d0b2c1674d5f79dcd65e" -dependencies = [ - "atoi", - "base64 0.22.1", - "bitflags", - "byteorder", - "crc", - "dotenvy", - "etcetera", - "futures-channel", - "futures-core", - "futures-util", - "hex", - "hkdf 0.13.0", - "hmac 0.13.0", - "itoa", - "log", - "md-5", - "memchr", - "rand 0.10.3", - "serde", - "serde_json", - "sha2 0.11.0", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror 2.0.21", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-sqlite" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488e99c397a62007e4229aec669a179816339afc6d2620ca6fa420dbee2e982c" -dependencies = [ - "atoi", - "flume", - "form_urlencoded", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "libsqlite3-sys", - "log", - "percent-encoding", - "serde", - "sqlx-core", - "thiserror 2.0.21", - "tracing", - "url", -] - [[package]] name = "ssh-cipher" version = "0.3.0" @@ -6972,17 +6670,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - [[package]] name = "strsim" version = "0.11.1" @@ -7610,12 +7297,6 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - [[package]] name = "unicode-ident" version = "1.0.26" @@ -7631,12 +7312,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993ad287eb20e8ba755312801cfe1413e0f25d604075863acaddca10b04c1833" - [[package]] name = "unicode-segmentation" version = "1.13.3" @@ -8165,12 +7840,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "whoami" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626c4bac6755d76ffc12cb01b2eac751db1996b9e0041de9aa02c8c211ddc82c" - [[package]] name = "widestring" version = "1.2.1" diff --git a/pkgs/id/Cargo.toml b/pkgs/id/Cargo.toml index 5123ec5018..03e27a4f74 100644 --- a/pkgs/id/Cargo.toml +++ b/pkgs/id/Cargo.toml @@ -17,6 +17,12 @@ categories = ["command-line-utilities", "network-programming"] [workspace] members = ["crates/id-core"] +# The vendored crates stay OUT of the workspace: as path dependencies inside +# this directory Cargo would otherwise treat them as members, and a member's +# feature graph joins the lock resolve — p2panda-sync's `test_utils` feature +# forwards to `p2panda-store/test_utils`, whose `sqlite` feature pulls sqlx +# into Cargo.lock even though no build here enables it (see vendor/README.md). +exclude = ["vendor/p2panda-sync", "vendor/p2panda-encryption"] default-members = [".", "crates/id-core"] # ============================================================================= diff --git a/pkgs/id/crates/id-core/src/discovery.rs b/pkgs/id/crates/id-core/src/discovery.rs index 690ee51fa7..01de7a4588 100644 --- a/pkgs/id/crates/id-core/src/discovery.rs +++ b/pkgs/id/crates/id-core/src/discovery.rs @@ -115,7 +115,7 @@ pub struct Defaults { /// # Example /// /// ```rust -/// use id::discovery::parse_defaults; +/// use id_core::discovery::parse_defaults; /// /// let conf = r#" /// [bootstrap] @@ -336,7 +336,7 @@ pub const STALE_CHECK_INTERVAL: Duration = Duration::from_secs(60); /// # Example /// /// ```rust -/// use id::discovery::PeerAnnouncement; +/// use id_core::discovery::PeerAnnouncement; /// use iroh_base::SecretKey; /// /// let key = SecretKey::generate(); @@ -389,7 +389,7 @@ pub struct PeerInfo { /// # Example /// /// ```rust -/// use id::discovery::{PeerDiscovery, PeerAnnouncement}; +/// use id_core::discovery::{PeerDiscovery, PeerAnnouncement}; /// use iroh_base::SecretKey; /// /// let discovery = PeerDiscovery::new(); diff --git a/pkgs/id/crates/id-core/src/tuple.rs b/pkgs/id/crates/id-core/src/tuple.rs index 911a5cdbc9..5a9a8e817d 100644 --- a/pkgs/id/crates/id-core/src/tuple.rs +++ b/pkgs/id/crates/id-core/src/tuple.rs @@ -29,7 +29,7 @@ //! # Examples //! //! ``` -//! use id::tuple::{TupleEncoder, decode}; +//! use id_core::tuple::{TupleEncoder, decode}; //! //! // Encode a key for: file="README.md", tag="label", value="rust" //! let key = TupleEncoder::new() @@ -169,7 +169,7 @@ impl TupleValue { /// # Examples /// /// ``` -/// use id::tuple::TupleEncoder; +/// use id_core::tuple::TupleEncoder; /// /// // Encode a struct: {a: 1, b: [0, 1, 2], c: null} /// let key = TupleEncoder::new() diff --git a/pkgs/id/src/commands/world.rs b/pkgs/id/src/commands/world.rs index f739f67954..5404fe79fc 100644 --- a/pkgs/id/src/commands/world.rs +++ b/pkgs/id/src/commands/world.rs @@ -2102,7 +2102,7 @@ mod tests { .join("\n"); assert_eq!( check_contract(&good).unwrap(), - "3 frames conform to shell contract v1.3" + "3 frames conform to shell contract v1.4" ); let bad = [ r#"{"from": "client", "frame": {"type": "chat", "text": "too early"}}"#, diff --git a/pkgs/id/src/idset.rs b/pkgs/id/src/idset.rs index 3ee02f0ad4..3fab81bb78 100644 --- a/pkgs/id/src/idset.rs +++ b/pkgs/id/src/idset.rs @@ -759,6 +759,7 @@ mod tests { tag: None, document: None, removes: None, + note: None, }, ) .unwrap(); diff --git a/pkgs/id/vendor/README.md b/pkgs/id/vendor/README.md index 642e3c80d3..55a59b2a9e 100644 --- a/pkgs/id/vendor/README.md +++ b/pkgs/id/vendor/README.md @@ -32,6 +32,8 @@ git -C "$SRC/.." rev-parse HEAD # da80c05b95269926bf58121cf6a2d3d `sqlx` is absent from the build. `cargo tree -i sqlx` reports no match, and `store_traits`'s `test_the_lock_has_no_sqlite_with_logsync_wired` fails if `Cargo.lock` names `sqlx`, `sqlite`, `rusqlite` or `libsqlite3-sys`, or if the `p2panda-store` line above loses `default-features = false`. +**Workspace exclusion.** Both vendored crates are listed in the root manifest's `[workspace] exclude`. Without that, Cargo treats path dependencies inside the workspace directory as members, and a member's feature graph joins the lock resolve: this crate's `test_utils` feature forwards to `p2panda-store/test_utils`, whose `sqlite` feature pulls the whole `sqlx` family into `Cargo.lock` even though no build here enables it. That is how `sqlx-sqlite` entered the lock at the #3447 workspace conversion (#4015); the exclusion plus a `cargo update -w` re-resolve removed it, with no version changes. + **To update.** Change the rev in the three places it appears (this file, the two git lines in `vendor/p2panda-sync/Cargo.toml`, and the git lines in `pkgs/id/Cargo.toml`). Then copy the crate again and reapply the changes above. ## p2panda-encryption 0.7.1 (DataScheme fork)