From d91809813087d96ab92eed33fad1052bd506428c Mon Sep 17 00:00:00 2001 From: Camillo Schenone Date: Sat, 16 Mar 2024 12:49:07 +0100 Subject: [PATCH] Version bump to 0.6.1 codemp, using standalone proto repo Former-commit-id: 55fdb8a2e5efd4eed97cf72fd465f2aeed8bd510 --- Cargo.toml | 3 ++- ...demp_client.cpython-38-darwin.so.REMOVED.git-id | 2 +- build.sh | 1 + plugin.py | 2 +- src/lib.rs | 14 +++++++++----- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 236a5e1..f7b5396 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,8 @@ name = "codemp_client" crate-type = ["cdylib"] [dependencies] -codemp = { git = "ssh://git@github.com/codewithotherpeopleandchangenamelater/codemp.git", tag="v0.6.0", features = ["client", "woot"]} +codemp = { git = "ssh://git@github.com/codewithotherpeopleandchangenamelater/codemp.git", tag="v0.6.1"} +codemp-proto = { git = "ssh://git@github.com/codewithotherpeopleandchangenamelater/codemp-proto.git", tag = "v0.6.1" } pyo3 = { version = "0.20", features = ["extension-module"] } pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] } serde = { version = "1.0.196", features = ["derive"] } diff --git a/bindings/codemp_client.cpython-38-darwin.so.REMOVED.git-id b/bindings/codemp_client.cpython-38-darwin.so.REMOVED.git-id index 535b648..139998e 100644 --- a/bindings/codemp_client.cpython-38-darwin.so.REMOVED.git-id +++ b/bindings/codemp_client.cpython-38-darwin.so.REMOVED.git-id @@ -1 +1 @@ -6e2a3de2a92f4117ac7f4f903cd9e54831bfb7d3 \ No newline at end of file +b84a38da4b28536c8e50e18417981dbe455b2e61 \ No newline at end of file diff --git a/build.sh b/build.sh index e75ee18..d23b953 100755 --- a/build.sh +++ b/build.sh @@ -16,6 +16,7 @@ CARGO_FEATURES="pyo3/extension-module" echo "Building with python: $PYO3_PYTHON" env PYO3_PYTHON="${PYO3_PYTHON}" PYTHON_SYS_EXECUTABLE="$PYO3_PYTHON" cargo build --features "$CARGO_FEATURES" +# env PYO3_PYTHON="${PYO3_PYTHON}" PYTHON_SYS_EXECUTABLE="$PYO3_PYTHON" cargo build echo "Copying into: $TARGET_DIR/$FULL_TARGET" [[ -f "$TARGET_DIR/$FUll_TARGET" ]] && echo "$FILE exists." diff --git a/plugin.py b/plugin.py index dba605f..3aa8623 100644 --- a/plugin.py +++ b/plugin.py @@ -126,7 +126,7 @@ class CodempClientTextChangeListener(sublime_plugin.TextChangeListener): def on_text_changed(self, changes): s = self.buffer.primary_view().settings() if s.get(g.CODEMP_IGNORE_NEXT_TEXT_CHANGE, None): - status_log("ignoring echoing back the change.") + status_log("Ignoring echoing back the change.") s[g.CODEMP_IGNORE_NEXT_TEXT_CHANGE] = False return diff --git a/src/lib.rs b/src/lib.rs index 6d11799..b8b7b6d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,12 +1,16 @@ -use codemp::proto::common::Identity; use pyo3::types::PyList; use std::{format, sync::Arc}; use tokio::sync::{mpsc, Mutex, RwLock}; use tracing; use tracing_subscriber; +use codemp::errors::Error as CodempError; use codemp::prelude::*; -use codemp::{errors::Error as CodempError, proto::files::BufferNode}; +use codemp_proto::{ + common::Identity, + cursor::{CursorEvent, CursorPosition}, + files::BufferNode, +}; use pyo3::{ exceptions::{PyBaseException, PyConnectionError, PyRuntimeError}, @@ -345,7 +349,7 @@ impl From> for PyCursorController { #[pymethods] impl PyCursorController { fn send<'a>(&'a self, path: String, start: (i32, i32), end: (i32, i32)) -> PyResult<()> { - let pos = CodempCursorPosition { + let pos = CursorPosition { buffer: BufferNode { path }, start: start.into(), end: end.into(), @@ -464,8 +468,8 @@ struct PyCursorEvent { end: (i32, i32), } -impl From for PyCursorEvent { - fn from(value: CodempCursorEvent) -> Self { +impl From for PyCursorEvent { + fn from(value: CursorEvent) -> Self { // todo, handle this optional better? let pos = value.position; PyCursorEvent {