mirror of
https://github.com/hexedtech/codemp-sublime.git
synced 2024-11-21 14:24:49 +01:00
fix: logger does not panic anymore on reload.
cleanup: old lib version Former-commit-id: 4dc9cc8048c8dd58438c8da8c2f2a57b16eaaec5
This commit is contained in:
parent
7712d68cb5
commit
b66b368907
5 changed files with 9 additions and 8 deletions
|
@ -1 +1 @@
|
|||
f629b2a823b8f4d351a4641f0f42bf84f95406c8
|
||||
38750f240dab1caf464d1f46f00f09a1042fa194
|
|
@ -1 +1 @@
|
|||
5f1dfe7e8371de1f4967223a801cf49286065133
|
||||
8ee9409baac472917d5a57fff2f6e584d90588a7
|
|
@ -1 +0,0 @@
|
|||
b736bf0e31e4e4fab5cdeaf75895fca09d18bc2b
|
2
build.sh
2
build.sh
|
@ -17,7 +17,7 @@ echo "Building .SO with python: $PYO3_PYTHON"
|
|||
env PYO3_PYTHON="${PYO3_PYTHON}" cargo build
|
||||
echo "Copying into: $TARGET_DIR/$SO_TARGET"
|
||||
|
||||
echo "Building python wheel..."
|
||||
echo "Building python wheels..."
|
||||
maturin build -i "$PYO3_PYTHON"
|
||||
|
||||
wheels=($WHEEL_DIR/$WHEEL_NAME*.whl)
|
||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -109,12 +109,14 @@ fn init_logger(py: Python<'_>, debug: Option<bool>) -> PyResult<Py<PyLogger>> {
|
|||
.with_line_number(false)
|
||||
.with_source_location(false)
|
||||
.compact();
|
||||
tracing_subscriber::fmt()
|
||||
|
||||
let _ = tracing_subscriber::fmt()
|
||||
.with_ansi(false)
|
||||
.event_format(format)
|
||||
.with_max_level(level)
|
||||
.with_writer(std::sync::Mutex::new(LoggerProducer(tx)))
|
||||
.init();
|
||||
.try_init();
|
||||
|
||||
Ok(Py::new(py, PyLogger(Arc::new(Mutex::new(rx))))?)
|
||||
}
|
||||
|
||||
|
@ -205,7 +207,7 @@ impl PyClient {
|
|||
};
|
||||
|
||||
let Some(ws) = cli.as_ref().unwrap().get_workspace(id.as_str()) else {
|
||||
return Ok(None)
|
||||
return Ok(None);
|
||||
};
|
||||
|
||||
Python::with_gil(|py| Ok(Some(Py::new(py, PyWorkspace(ws))?)))
|
||||
|
@ -324,7 +326,7 @@ impl PyWorkspace {
|
|||
path: String,
|
||||
) -> PyResult<Option<Py<PyBufferController>>> {
|
||||
let Some(bufctl) = self.0.buffer_by_name(path.as_str()) else {
|
||||
return Ok(None)
|
||||
return Ok(None);
|
||||
};
|
||||
|
||||
Ok(Some(Py::new(py, PyBufferController::from(bufctl))?))
|
||||
|
|
Loading…
Reference in a new issue