Giter VIP home page Giter VIP logo

Comments (8)

Nytelife26 avatar Nytelife26 commented on May 28, 2024 1

To provide a little additional detail here: null-ls is a plugin that spawns external processes like proselint, captures their output, and converts that output into Neovim's diagnostic format for display in the editor. In this case, the issue stems from the error message, which is sent to stdout and therefore breaks the plugin's attempts to parse it as JSON.

I use null-ls with Neovim on a daily basis, but thank you. It's an honour to speak with you.

This is strange behaviour on part of proselint indeed. I picked up the project a while ago, so I haven't yet squashed all the bugs. As you and @milanglacier have suggested, I'll look into why proselint sometimes fails to produce valid JSON, and also consider throwing to stderr.

from proselint.

jose-elias-alvarez avatar jose-elias-alvarez commented on May 28, 2024

To provide a little additional detail here: null-ls is a plugin that spawns external processes like proselint, captures their output, and converts that output into Neovim's diagnostic format for display in the editor. In this case, the issue stems from the error message, which is sent to stdout and therefore breaks the plugin's attempts to parse it as JSON.

Ideally, running proselint with the --json flag would always output valid JSON. I'm not a proselint user myself, so I haven't done research into other integrations, but I imagine they'd run into the same problem if they run under the conditions that create the error message. A simple solution (and one that I've seen other linters use) is to output error messages like these to stderr, which will fix things on our end while still providing feedback to users of the CLI. I'm not a Python expert, but I'm happy to put in a PR if there's a chance of getting this fixed.

Edit: also, if it's of any help, here is the relevant issue on our end, which contains more details (though we haven't been able to figure out what exactly triggers the error in the first place).

from proselint.

milanglacier avatar milanglacier commented on May 28, 2024

I find that if proselint is installed by the python installed by homebrew, then it will continuously give me such warning, i.e it can not open the file in ~/.cache/proselint folder.
However, if I install proselint via a venv in my home and not use the python installed by homebrew (in fact the python from miniforge) and then it works fine and no warning.

from proselint.

milanglacier avatar milanglacier commented on May 28, 2024

It seems that [Errno 35] Resource temporarily unavailable is usually a macOS only problem in many scenarios😂

from proselint.

Nytelife26 avatar Nytelife26 commented on May 28, 2024

It seems that [Errno 35] Resource temporarily unavailable is usually a macOS only problem in many scenarios😂

Odd, I suspected it would be a filesystem issue persistent with most modern UNIX systems. Alas, I should expect nothing less from MacOS 😂 I'll investigate later tonight. Fortunately we have MacOS available in GitHub actions so I can test it that way.

from proselint.

mcepl avatar mcepl commented on May 28, 2024

Actually, it doesn’t seem to be reproducible on Linux as well.

Using neovim nightly (commit 62916946), proselint 0.13.0, null-ls actual).

from proselint.

mabuchner avatar mabuchner commented on May 28, 2024

I find that if proselint is installed by the python installed by homebrew, then it will continuously give me such warning, i.e it can not open the file in ~/.cache/proselint folder.

I think, it's a permission issue. On my MacOS system the permissions for ~/.cache/proselint were set to drwx--x--x.

After changing the permissions

chmod g+r,o+r proselint

the error went away.

Of course, it would still be nice, if proselint would output the error message to stderr.

Edit: Spoke too soon. The problem still occurs, but in my case less frequently.

from proselint.

AIGeneratedUsername avatar AIGeneratedUsername commented on May 28, 2024

The error happens when proselint is used via pre-commit. Tested on Debian image with a root only user.

from proselint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.