Version bump to 0.6.1 codemp, using standalone proto repo

Former-commit-id: 55fdb8a2e5efd4eed97cf72fd465f2aeed8bd510
This commit is contained in:
Camillo Schenone 2024-03-16 12:49:07 +01:00
parent cdafd89b0b
commit d918098130
5 changed files with 14 additions and 8 deletions

View file

@ -9,7 +9,8 @@ name = "codemp_client"
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [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 = { version = "0.20", features = ["extension-module"] }
pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] } pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] }
serde = { version = "1.0.196", features = ["derive"] } serde = { version = "1.0.196", features = ["derive"] }

View file

@ -1 +1 @@
6e2a3de2a92f4117ac7f4f903cd9e54831bfb7d3 b84a38da4b28536c8e50e18417981dbe455b2e61

View file

@ -16,6 +16,7 @@ CARGO_FEATURES="pyo3/extension-module"
echo "Building with python: $PYO3_PYTHON" 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 --features "$CARGO_FEATURES"
# env PYO3_PYTHON="${PYO3_PYTHON}" PYTHON_SYS_EXECUTABLE="$PYO3_PYTHON" cargo build
echo "Copying into: $TARGET_DIR/$FULL_TARGET" echo "Copying into: $TARGET_DIR/$FULL_TARGET"
[[ -f "$TARGET_DIR/$FUll_TARGET" ]] && echo "$FILE exists." [[ -f "$TARGET_DIR/$FUll_TARGET" ]] && echo "$FILE exists."

View file

@ -126,7 +126,7 @@ class CodempClientTextChangeListener(sublime_plugin.TextChangeListener):
def on_text_changed(self, changes): def on_text_changed(self, changes):
s = self.buffer.primary_view().settings() s = self.buffer.primary_view().settings()
if s.get(g.CODEMP_IGNORE_NEXT_TEXT_CHANGE, None): 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 s[g.CODEMP_IGNORE_NEXT_TEXT_CHANGE] = False
return return

View file

@ -1,12 +1,16 @@
use codemp::proto::common::Identity;
use pyo3::types::PyList; use pyo3::types::PyList;
use std::{format, sync::Arc}; use std::{format, sync::Arc};
use tokio::sync::{mpsc, Mutex, RwLock}; use tokio::sync::{mpsc, Mutex, RwLock};
use tracing; use tracing;
use tracing_subscriber; use tracing_subscriber;
use codemp::errors::Error as CodempError;
use codemp::prelude::*; use codemp::prelude::*;
use codemp::{errors::Error as CodempError, proto::files::BufferNode}; use codemp_proto::{
common::Identity,
cursor::{CursorEvent, CursorPosition},
files::BufferNode,
};
use pyo3::{ use pyo3::{
exceptions::{PyBaseException, PyConnectionError, PyRuntimeError}, exceptions::{PyBaseException, PyConnectionError, PyRuntimeError},
@ -345,7 +349,7 @@ impl From<Arc<CodempCursorController>> for PyCursorController {
#[pymethods] #[pymethods]
impl PyCursorController { impl PyCursorController {
fn send<'a>(&'a self, path: String, start: (i32, i32), end: (i32, i32)) -> PyResult<()> { fn send<'a>(&'a self, path: String, start: (i32, i32), end: (i32, i32)) -> PyResult<()> {
let pos = CodempCursorPosition { let pos = CursorPosition {
buffer: BufferNode { path }, buffer: BufferNode { path },
start: start.into(), start: start.into(),
end: end.into(), end: end.into(),
@ -464,8 +468,8 @@ struct PyCursorEvent {
end: (i32, i32), end: (i32, i32),
} }
impl From<CodempCursorEvent> for PyCursorEvent { impl From<CursorEvent> for PyCursorEvent {
fn from(value: CodempCursorEvent) -> Self { fn from(value: CursorEvent) -> Self {
// todo, handle this optional better? // todo, handle this optional better?
let pos = value.position; let pos = value.position;
PyCursorEvent { PyCursorEvent {