coddingtonbear / neomake-platformio

Simple tool allowing Neomake to properly lint when you're using PlatformIO.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"pio returned non-zero exit status 1"

NotAFile opened this issue · comments

I am getting this error, but I am unable to copy it since the dialog instantly disappears.

This is on a pretty fresh install of the current version of Debian, Plugin is installed with dein.vim

When I try the same command on the terminal it works just fine.
nvimerror

Usually that means that you just haven't ran

call SetupPlatformioEnvironment('/path/to/your/platformio/project/')

Is it possible that you might have missed that instruction in the readme?

That command is what caused the above error.

In that case, I'm afraid I have no direct insight to give you except that -- given that the command executes properly in your shell, but not from within vim -- that the environment in which vim is executing the command differs in some fundamental way.

You might be able to glean a little more information by altering this line: https://github.com/coddingtonbear/neomake-platformio/blob/master/rplugin/python/neomake-platformio.py#L23 to something like (untested):

proc = subprocess.Popen(
    [
        'pio',
        '-f',
        '-c',
        'vim',
        'run',
        '-t',
        'idedata',
        '-d',
        path,
    ],
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE,
)
_, stderr = proc.communicate()
raise Exception(stderr)

Making those changes will cause the actual error message to be reported to you as the reason the command failed.

Interesting, it seems I didn't have a trailing / in my folder name. Perhaps "this is not a platformIO project" could be displayed a little more prettily.

The command runs without an error, but Neomake still does not recognize the platform libraries ("undeclared identifier" galore) so it might not actually be working though.

If you post a pull request for updating the output to be friendlier, I'd totally merge it. Actually -- if you want to own this project, I'd gladly transfer it to you: against ten or so years of inertia, I switched from vim to vscode a couple months back.

A transfer would mean breaking all existing Links, right?

I don't think I'll be doing much work on this either, only thing I could do is answer issues. Platformio has a fork of this project, perhaps they would be interested in ownership?

Interestingly enough -- links aren't broken when transferring github repositories (with some caveats), but I understand not wanting to take on that responsibility, anyway!