-
Notifications
You must be signed in to change notification settings - Fork 22
Invalid arguments when using rust 1.13 (nightly) #69
Comments
After the update to linter-rust that just now landed, the "rustc" option works fine but the "build" option produces no errors at all even with syntax errors in the file. |
Adding options after '--' was always the way to pass an additional options to rustc. I'll see what I can do to fix 'build' command (Sorry for the inconvenience, it was my PR that broke some things down) |
Just to let you know that I am also getting the issue where the "build" option is producing zero errors. |
Can you specify your OS, rustc version please? |
I just re-enabled this plugin again after I had an issue with a previous version ("EPERM: access denied something something") and I also get no error messages. edit: fixed quotation marks |
|
@LaylConway so yes, it basically was wrong to think that EDIT: this is probably solved by using RUSTFLAGS variable. I'll try this out. |
Closes AtomLinter#69 Also fixed the way envinronment variables were passed to BufferedProcess -- according to [the documentation](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) (*`BufferedProcess` is actually a wrapper above node's exec*) they should be passed in an `env` subobject of `options`, but they were passed as raw in options object. Adding to these environment variables accordingly set `RUSTFLAGS` variable, when JSON errors are available, makes cargo tell compiler to output JSON errors. When using `rustc` simply providing `--error-format=json` is enough to make compiler do what we want.
Closes AtomLinter#69 Also fixed the way envinronment variables were passed to BufferedProcess -- according to [the documentation](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) (*`BufferedProcess` is actually a wrapper above node's exec*) they should be passed in an `env` subobject of `options`, but they were passed as raw in options object. Adding to these environment variables accordingly set `RUSTFLAGS` variable, when JSON errors are available, makes cargo tell compiler to output JSON errors. When using `rustc` simply providing `--error-format=json` is enough to make compiler do what we want.
Fixed the way json errors are requested from cargo & rustc. Closes #69
Updated rust today, and got an invalid arguments error. Looking into this it seems cargo has a problem with the
-- --error-format=json
part. Asking in the #rust channel it seems this was never an accepted way to pass commands to rustc via cargo. Using the rustc option however will result in "invalid specified features" errors being spammed for every line of output given from cargo.The text was updated successfully, but these errors were encountered: