Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

QuickOpen crash #125

Closed
Bretley opened this issue Dec 25, 2016 · 4 comments
Closed

QuickOpen crash #125

Bretley opened this issue Dec 25, 2016 · 4 comments

Comments

@Bretley
Copy link
Contributor

Bretley commented Dec 25, 2016

I get this error:

Error: Error: ENOENT: no such file or directory, stat '/Users/Bret/.wine/dosdevices/d:'

running from a non-git (my home) directory, I'd assume there's some sort of issue with how oni handles not being able to open certain files.

@bryphe
Copy link
Member

bryphe commented Dec 27, 2016

I'm able to reproduce too with my non-git home directory (just a different file shows up EBUSY: hiberfile.sys).

Seems like the recursive-readdir library we're using at the moment will fail as soon as it hits an issue, and not return a list of files. Couple of options for fixing this:

  1. Use an alternative library that handles these cases more robustly (shelljs might be a good choice - I'd like to bring this in for some other scenarios as well - it has an ls command that might work better)
  2. Use a default command for UNIX / Windows that doesn't require an additional node library

Also, we might want to update the Menu component to handle asynchronicity better - right now, we synchronously populate the menu which blocks. It'd be nice if we showed a spinner or something and items as they populate. I'll log a separate task for this shortly.

@keforbes
Copy link
Collaborator

keforbes commented Mar 3, 2017

Seems like the recursive-readdir library we're using at the moment will fail as soon as it hits an issue, and not return a list of files.

Someone created a fix for this but the author of recursive-readdir refuses to merge it in. I tried following the directions for manually installing that person's #patch-2 but my npm just hangs when I try installing it.

I tried getting shelljs to work but it wouldn't connect to neovim. I didn't have any compilation errors and everything looked like it should've worked but I would just get an empty electron window when I tried launching oni. Looks like I was hitting an error in bundle.js for:

require('./commands.json').forEach(function (command) {

saying "__webpack_require__(...).forEach is not a function" though I have no idea how replacing recursive-readdir with shelljs could lead to that error.

So yeah, I guess I just wanted to complain. I'm still playing with this.

@keforbes
Copy link
Collaborator

keforbes commented Mar 3, 2017

It looks like the issue I hit with shelljs is a known issue in the current version. It'll be fixed in the next version in case you're still interested in using shelljs in oni.
shelljs/shelljs#667

@keforbes
Copy link
Collaborator

keforbes commented Mar 6, 2017

I believe this defect can be closed now that #268 has been merged in.

@bryphe bryphe closed this as completed Mar 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants