Comments (4)
Of course. I completely forgot that rpc communication happens via stdout/stdin.
Removing the println! indeed resolved this bug. I kind of feel stupid about this one.
Sorry for causing you any inconvenience and thanks for helping and for providing this library!
from neovim-lib.
I've seen this error often, and always in the following 2 circumstances:
- A neovim misfeature (which limited message size to 10MB, fixed now to be 2GB)
- I made a mistake which made neovim hang up the channel
First, I'd look at the log of a debug build of neovim built with MIN_LOG_LEVEL=0
to see if that tells you anything.
But I see in your case there's an error in there that tells you that you sent something wrong. I could not perform a proper analysis now, but I'd BET that println!
wreaks havoc with running rpc over stdin/stdout (don't ask how often I've made that mistake).
from neovim-lib.
I can confirm the error reported disappears when the following patch to remove the only println!()
is applied.
diff --git a/src/main.rs b/src/main.rs
index 33e24fd..2044f44 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -85,7 +85,6 @@ fn start_event_loop(receiver: mpsc::Receiver<Event>, mut nvim: Neovim) {
loop {
info!("Waiting");
let payload = receiver.recv();
- println!("Received Payload: {:?}", payload);
match payload {
Ok(Event::Shutdown) => {
info!("Shutting down");
from neovim-lib.
Could you provide a list of steps to reproduce?
Also, since you continue to make changes, could you post which revision exhibited this behavior? Your recent change to rename ctrlp.vim
to ctrlprs.vim
breaks the init.vim
which still sources the old filename.
After correcting the filename in init.vim
, I tried these steps.
# At shell prompt.
nvim -u init.vim
# In neovim v0.3.4. Initialize ctrlp-rs. The line after is an echoed result.
:call ctrlprs#init()
ctrlp error: stderr
# Check messages.
:messages
ctrlp-rs: Started process
ctrlp error: stderrthread 'main' panicked at 'scorched earth: unable to initialize logger.: Os { code: 2, kind: NotFound, message: "No such file or directory"
}', src/libcore/result.rs:997:5^@note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
ctrlp error: stderr
I'm obviously missing something in order to reproduce your error, but I'm not sure what.
Update 1
The following patch fixed the No such file or directory
error.
diff --git a/src/main.rs b/src/main.rs
index 33e24fd..8bdb475 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -59,7 +59,7 @@ fn init_logging() -> Result<(), Box<Error>> {
time_format: None,
};
- let filepath = "/home/nuke/ctrlp.log";
+ let filepath = "./ctrlp.log";
let log_file = File::create(filepath)?;
from neovim-lib.
Related Issues (17)
- Error with large files HOT 22
- Passing values by reference? HOT 4
- Debug logging HOT 4
- Trouble using `nvim_call_atomic` HOT 1
- Consider adding buffered reading HOT 2
- Api and Mutability/Ownership deadlock HOT 4
- Executing "echo" as a command but not pressing enter in Neovim causes neovim_lib to panic HOT 11
- New release? HOT 1
- Useful link HOT 1
- Support for Windows named pipes
- Missing UIAttachOption for ext_messages
- Mainstream this repo HOT 15
- Async/Await HOT 3
- Lib panics on `find_sender` method
- open_win not published
- scorched earth: a useless neovim plugin in rust HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neovim-lib.