Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntastic doesn't work #106

Closed
k0pernicus opened this issue Sep 14, 2016 · 13 comments
Closed

Syntastic doesn't work #106

k0pernicus opened this issue Sep 14, 2016 · 13 comments

Comments

@k0pernicus
Copy link

I use Plug (Plug 'scrooloose/syntastic'), Syntastic is enabled but no response when I save a Rust file that contain many errors...

I use Neovim (NVIM 0.1.5) on macOS.

This is the output for :SyntasticInfo, for a Rust source code:

Syntastic version: 3.7.0-224 (Vim 704, Neovim, Darwin)
Info for filetype: rust
Global mode: active
Filetype rust is active
The current file will be checked automatically
Available checker: rustc
Currently enabled checker: rustc

Also, when I manually enter :SyntasticCheck, no output...

Current Rust compiler: rustc 1.11.0 (9b21dcd6a 2016-08-15).

If anyone have an idea about what's wrong here, please to comment! :-)
Thanks

@k0pernicus
Copy link
Author

k0pernicus commented Sep 14, 2016

Ok so I just saw that this problem is refered as issue #33.
But I thought that, when saving the current file, the plugin compile it using rustc automatically, no...?

@iamsebastian
Copy link

Same here. But this issue has no relation to #33.

I also get a similiar :SyntasticInfo:

Syntastic version: 3.7.0-224 (Vim 704, Linux, GUI)
Info for filetype: rust             
Global mode: active                     
Filetype rust is active                 
The current file will be checked automatically     
Available checker: rustc              
Currently enabled checker: rustc

I know syntastic was fine with rustc some weeks ago. rustc -Z parse-only [src-file] is also running fine.

@iamsebastian
Copy link

iamsebastian commented Sep 21, 2016

Should be closed, because of being a duplicate of these:
#97 #99 #100, and this #88

@leeola
Copy link

leeola commented Sep 28, 2016

Also, see here for a workaround using Neomake - perhaps a temporary solution you might be interested in.

@k0pernicus
Copy link
Author

Thanks for this answer.
The solution is great but I have a problem formatting the error...

@zoumi
Copy link

zoumi commented Nov 19, 2016

I have the same problem.
My rust version:

[zoumi@localhost ~]$ rustup show
Default host: x86_64-unknown-linux-gnu

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

arm-linux-androideabi
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.12.1 (d4f39402a 2016-10-19)

The syntastic debug info:

syntastic: 4919.274981: g:syntastic_version = '3.8.0-5 (Vim 800, Linux, GUI)'
syntastic: 4919.275539: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shelltemp = 1, &shellxquote = '', &autochdir = 0, &shellxescape = ''
syntastic: 4919.276197: g:syntastic_aggregate_errors = 0
syntastic: 4919.276197: g:syntastic_always_populate_loc_list = 1
syntastic: 4919.276197: g:syntastic_auto_jump = 0
syntastic: 4919.276197: g:syntastic_auto_loc_list = 1
syntastic: 4919.276197: g:syntastic_check_on_open = 1
syntastic: 4919.276197: g:syntastic_check_on_wq = 0
syntastic: 4919.276197: g:syntastic_cursor_columns = 1
syntastic: 4919.276197: g:syntastic_debug = 63
syntastic: 4919.276197: g:syntastic_echo_current_error = 1
syntastic: 4919.276197: g:syntastic_enable_balloons = 1
syntastic: 4919.276197: g:syntastic_enable_highlighting = 1
syntastic: 4919.276197: g:syntastic_enable_signs = 1
syntastic: 4919.276197: g:syntastic_error_symbol = '>>'
syntastic: 4919.276197: g:syntastic_exit_checks = 1
syntastic: 4919.276197: g:syntastic_filetype_map = {'handlebars.html': 'handlebars'}
syntastic: 4919.276197: g:syntastic_full_redraws = 0
syntastic: 4919.276197: g:syntastic_id_checkers = 1
syntastic: 4919.276197: g:syntastic_ignore_extensions = '\c\v^([gx]?z|lzma|bz2)$'
syntastic: 4919.276197: g:syntastic_ignore_files = []
syntastic: 4919.276197: g:syntastic_loc_list_height = 10
syntastic: 4919.276197: g:syntastic_nested_autocommands = 0
syntastic: 4919.276197: g:syntastic_quiet_messages = {}
syntastic: 4919.276197: g:syntastic_reuse_loc_lists = 1
syntastic: 4919.276197: g:syntastic_shell = '/bin/bash'
syntastic: 4919.276197: g:syntastic_sort_aggregated_errors = 1
syntastic: 4919.276197: g:syntastic_stl_format = '[Syntax: line:%F (%t)]'
syntastic: 4919.276197: g:syntastic_style_error_symbol = 'S>'
syntastic: 4919.276197: g:syntastic_style_warning_symbol = 'S>'
syntastic: 4919.276197: g:syntastic_warning_symbol = '>>'
syntastic: 4919.313389: UpdateErrors: default checkers
syntastic: 4919.329030: CacheErrors: default checkers
syntastic: 4919.331705: notifiers: reset
syntastic: 4919.333918: balloons: reset
syntastic: 4919.335577: highlighting: reset
syntastic: 4919.413890: cursor: reset
syntastic: 4919.416939: g:syntastic_aggregate_errors = 0
syntastic: 4926.115525: $TERM = 'dumb'
syntastic: 4926.116351: $PATH = '/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/zoumi/.local/bin:/home/zoumi/bin:/home/zoumi/.cargo/bin:/home/zoumi/programs/musldist/bin/:/opt/pthon35/bin'
syntastic: 4926.117798: getcwd() = '/home/zoumi'
syntastic: 4926.119420: CacheErrors: Invoking checker: rust/rustc
syntastic: 4926.120572: SyntasticMake: called with options: {'errorformat': '%E%f:%l:%c: %\d%#:%\d%# %.%\{-}error:%.%\{-} %m,%W%f:%l:%c: %\d%#:%\d%# %.%\{-}warning:%.%\{-} %m,%C%f:%l %m,%-Z%.%#', 'makeprg': 'rustc -Zparse-only rust_projects/zmblog/src/main.rs'}
syntastic: 4926.220858: system: command run in 0.098754s
syntastic: 4926.221955: checker output: ['warning: the option `Z` is unstable and should only be used on the nightly compiler, but it is currently accepted for backwards compatibility; this will soon change, see issue #31847 for more details', '', 'error: expected one of `.`, `;`, `?`, `}`, or an operator, found `let`', '  --> rust_projects/zmblog/src/main.rs:83:5', '   |', '83 |     let mut mount2 = Mount::new();', '   |     ^^^', '', 'error: aborting due to previous error', '', '']
syntastic: 4926.228492: raw loclist: [{'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'warning: the option `Z` is unstable and should only be used on the nightly compiler, but it is currently accepted for backwards compatibility; this will soon change, see issue #31847 for more details'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'error: expected one of `.`, `;`, `?`, `}`, or an operator, found `let`'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '  --> rust_projects/zmblog/src/main.rs:83:5'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '   |'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '83 |     let mut mount2 = Mount::new();'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '   |     ^^^'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'error: aborting due to previous error'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 4926.251570: getLocList: checker rust/rustc returned 101
syntastic: 4926.252863: rust/rustc raw: [{'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'warning: the option `Z` is unstable and should only be used on the nightly compiler, but it is currently accepted for backwards compatibility; this will soon change, see issue #31847 for more details'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'error: expected one of `.`, `;`, `?`, `}`, or an operator, found `let`'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '  --> rust_projects/zmblog/src/main.rs:83:5'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '   |'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '83 |     let mut mount2 = Mount::new();'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '   |     ^^^'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'error: aborting due to previous error'}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}, {'lnum': 0, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ''}]
syntastic: 4926.267388: quiet_messages filter: {}
syntastic: 4926.268706: getLocList: checker rust/rustc run in 0.148495s
syntastic: 4926.270104: aggregated: {'_sorted': 0, '_name': '', '_owner': 4, '_columns': 1, '_rawLoclist': []}
syntastic: 4926.272043: loclist: setloclist (new)
syntastic: 4926.273224: notifiers: refresh
syntastic: 4926.274988: signs: refresh
syntastic: 4935.013573: highlighting: refresh
syntastic: 4935.014486: autoloclist: refresh
syntastic: 4935.015114: autoloclist: toggle
syntastic: 4935.016058: loclist: hide
syntastic: 5003.934113: autocmd: BufEnter, buffer -1 = '', &buftype = ''
syntastic: 5003.935960: autocmd: BufWinEnter, buffer -1 = '', &buftype = ''

@oblitum
Copy link

oblitum commented Feb 3, 2017

not working for me as well.

@darthdeus
Copy link

same for me with 1.15.1 and the latest version of syntastic

@ticki
Copy link

ticki commented Mar 28, 2017

bump. Anyone have temporary solutions?

@ticki
Copy link

ticki commented Mar 28, 2017

let g:syntastic_rust_checkers = ['rustc']

solves it for me.

@oblitum
Copy link

oblitum commented Mar 28, 2017

@ticki thanks, this also fix it for me.

@iamsebastian
Copy link

@ticki Does this - in your environment - solves dependencies in larger projects? It seems, this will only lint the open file and does not check for, in example, dependencies solved in lib.rs.

da-x added a commit that referenced this issue Jun 30, 2018
If nothing else is specified, 'cargo' should be the checker.

Also, update the documentation accordingly.

Fixes #200, #118, #106
@da-x
Copy link
Member

da-x commented Jun 30, 2018

let g:syntastic_rust_checkers = ['cargo'] is now the default if nothing is specified. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants