Comments (8)
Wouldn't it be interesting to use another list library that doesn't throw on an empty list but returns options, so you are required to handle these cases explicitly. Even though you probably have no very good options here to handle the empty list
from oni2.
Think we could definitely do this without a new dependency, by wrapping the call in a try
and returning None if Not found is raised or returning the values
from oni2.
Wouldn't a patternmatch also be a good alternative? switch (list) { | [] => ... | [hd] => ...}
from oni2.
@romgrk I can't reproduce this error on master 🤔, are you seeing or doing anything else also did you run the bootstrap command? What system are you on?
from oni2.
Yes, I've ran esy install && esy bootstrap && esy build && esy x Oni2
with the master branch just now.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
$ esy --version
0.5.6
Not sure how to debug esy's ocaml, but if you have some tips I'd be happy to.
from oni2.
Thanks for logging the issue, @romgrk ! Usually this exception comes from here:
oni2/src/editor/Neovim/NeovimApi.re
Line 137 in 8cf65cd
And it means that we didn't get a response from a request we sent to the Neovim API, but we were expecting one. It'd be helpful to log out the methodName
in this case to see which request it is failing at (we should also have better logging in general for th is 🤔 )
We saw cases where when it picked up an init.vim
and hit issues, but I don't think that is the case here.
It'd be interesting too to run the tests and see if those pass - esy x OniUnitTestRunner
.
from oni2.
Yes, was just thinking about this - we should at the very least check List.length
prior to List.hd
(or we could create a wrapper List.hd_opt
that returns an option), and provide more information here. At the very least - if it could give more details, like "Request 'nvim_open_buf' failed", it might help narrow downt he investigation.
from oni2.
@bryphe here is the result of the tests: https://gistpreview.github.io/?a07cbe32ba939e9f968e6f1ea157deb4
Logging the method names before the crash says that the last method called is nvim_list_bufs
.
from oni2.
Related Issues (20)
- Failed to compile on Ubuntu20.04 with Clang14 due to skia HOT 2
- Demo the app. HOT 4
- packaging: `.desktop` does not have a proper vendor prefix
- Release does not run on Fedora 35 HOT 1
- Wakatime not installing: (Failure "Unable to locate extension after install")
- open onivim2 from the terminal HOT 2
- Tab consistency
- Where can i find an app image for onivim2
- Please update Docker build in user manual HOT 2
- How can I help? HOT 3
- Has the dev stopped? HOT 13
- Build error
- start onivim as daemon
- Docker build: `No package git222 available` HOT 11
- AppImage fails to open at all HOT 1
- Neo2 keyboard layout, some keys not working
- Cannot Download appimg HOT 7
- Pain
- Status of the project? HOT 2
- Unable to download via license key "An expiration date cannot be in the past."
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 oni2.