Comments (24)
I also tested the code on my Linux machine and everything works correctly.
from plenary.nvim.
I think args = { '--files', '.' },
should make it work (previously that wasn't necessary only when grepping).
Also see neovim/neovim#13736
from plenary.nvim.
@Conni2461, thanks for the info, updated the first post but still didn't help. The editor crashes.
from plenary.nvim.
Opened the issue in Neovim: neovim/neovim#14484
from plenary.nvim.
Why? Can you reproduce this without plenary?
from plenary.nvim.
@clason, I think that the editor should never crash, no matter what plugin is used. It should throw an error if something is wrong.
from plenary.nvim.
But you're calling an out-of-process job via libuv, so it's not clear that it's the editor's fault.
from plenary.nvim.
@clason, sure, this need more investigation.
from plenary.nvim.
Also, can you try without the sync()
to check whether the problem is there rather than in Job:new()
?
And try a debug build to see if an assert is triggered.
from plenary.nvim.
And try a debug build to see if an assert is triggered.
Should I build it myself?
from plenary.nvim.
Yes. (I mean neovim, of course, just to be clear.)
from plenary.nvim.
Also, can you try without the sync() to check whether the problem is there rather than in Job:new()?
Doesn't crash without sync ().
Yes. (I mean neovim, of course, just to be clear.)
Sure. Okay, will take some time, Windows is not a very convenient platform for such things.
from plenary.nvim.
OK, then the culprit is in sync
, specifically. Since @tjdevries is on vacation, maybe our resident async expert @oberblastmeister has an idea why this crashes on Windows?
from plenary.nvim.
Also, can you add more details (stacktrace) on how it crashes?
from plenary.nvim.
job:new
doesn't really do anything besides creating a job object and since plenary.job
is just a wrapper around uv.spawn
could you try a minimal script similar to what ndavidq0 did a couple of months ago.
Idk something like this:
local uv = vim.loop
local stdin = uv.new_pipe(false)
local stdout = uv.new_pipe(false)
local stderr = uv.new_pipe(false)
local handle = uv.spawn("rg", {
args = { '--files' },
stdio = { stdin, stdout, stderr }
}, function() end)
uv.read_start(stdout, function(err, data)
assert(not err, err)
if data then
print(vim.inspect(data))
end
end)
uv.read_start(stderr, function() end)
uv.shutdown(stdin, function()
uv.close(handle, function() end)
end)
from plenary.nvim.
Also, can you add more details (stacktrace) on how it crashes?
How can I do it on Windows?
job:new doesn't really do anything besides creating a job object and since plenary.job is just a wrapper around uv.spawn could you try a minimal script similar to what ndavidq0 did a couple of months ago.
Prints the output and crashes.
from plenary.nvim.
Also, can you add more details (stacktrace) on how it crashes?
How can I do it on Windows?
I don't know; I haven't touched Windows for more than 15 years. I'm sure StackOverflow can help, though. How are you running neovim (without -qt
) in Windows?
job:new doesn't really do anything besides creating a job object and since plenary.job is just a wrapper around uv.spawn could you try a minimal script similar to what ndavidq0 did a couple of months ago.
Prints the output and crashes.
Can you reproduce without neovim (via https://github.com/luvit/luv)?
from plenary.nvim.
I don't know; I haven't touched Windows for more than 15 years. I'm sure StackOverflow can help, though. How are you running neovim (without -qt) in Windows?
I've tried both cases.
Can you reproduce without neovim (via https://github.com/luvit/luv)?
I have not tried it because I don't use Windows as my development environment.
from plenary.nvim.
At the moment I'm trying to build on Windows in debug and see where the crash occurs. I need some time to setup the environment.
from plenary.nvim.
I built the application and its dependencies in debug. When executing the above code, the debugger stops here:
from plenary.nvim.
@Conni2461, with the latest master the following code works just fine:
local uv = vim.loop
local stdin = uv.new_pipe(false)
local stdout = uv.new_pipe(false)
local stderr = uv.new_pipe(false)
local handle = uv.spawn("rg", {
args = { '--files' },
stdio = { stdin, stdout, stderr }
}, function() end)
uv.read_start(stdout, function(err, data)
assert(not err, err)
if data then
print(vim.inspect(data))
end
end)
uv.read_start(stderr, function() end)
uv.shutdown(stdin, function()
uv.close(handle, function() end)
end)
But the code from the my first message still crashes the editor. I assume that this is a Plenary issue. Can I somehow provide more information to help to fix it?
from plenary.nvim.
maybe it's out of memory? how many files are getting stored? where are you running it from?
from plenary.nvim.
maybe it's out of memory? how many files are getting stored? where are you running it from?
Tried different folders even with one text file, the result is the same.
Maybe I can try running other examples to see which part of Plenary is crashing? Like with uv.spawn
.
from plenary.nvim.
The issue was in repgrep itself, check nvim-pack/nvim-spectre#5 (comment)
from plenary.nvim.
Related Issues (20)
- job:pid() returns function? HOT 1
- [Feat] `selene` linter support
- Unintentionally global variables stat and ret in async_lib?
- test_harness does not handle when exceptions are thrown in a spec HOT 1
- vim.tbl_islist deprecation HOT 1
- Plenary Callback issue in dependent plugin HOT 8
- too many curl processes spawned by plenary HOT 2
- Plenary's global `busted` definitions get picked up by LuaLS
- Attach debugger to test harness
- Build Failed HOT 2
- Build Failed HOT 1
- Plenary needs lua version 5.1 but disabled on homebrew HOT 8
- New release?
- Build failed? HOT 10
- [Feature] Improve `Path:normalize` to return shorter relative path using ../
- Curl module may accidentally reuse URL
- Plenary/Hererocks fails to compile HOT 1
- [Question] what is the point of checking executable right in scandir?
- Feature request: Expose status code to stream in curl
- curl parameters size limit
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 plenary.nvim.