Skip to content

Fix ‘cargo metadata’ call for cargo 0.19.0-nightly #53

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

Merged
merged 2 commits into from
Apr 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions flycheck-rust.el
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ root of the file hierarchy."

MANIFEST is the path to the Cargo.toml file of the project.

Calls `cargo metadata --no-deps --manifest MANIFEST', parses and
collects the targets for the current workspace, and returns them
in a list, or nil if no targets could be found."
Calls `cargo metadata --no-deps --manifest-path MANIFEST
--format-version 1', parses and collects the targets for the
current workspace, and returns them in a list, or nil if no
targets could be found."
(let ((cargo (funcall flycheck-executable-find "cargo")))
(unless cargo
(user-error "flycheck-rust cannot find `cargo'. Please \
Expand All @@ -93,9 +94,10 @@ more information on setting your PATH with Emacs."))
;; targets. We concatenate all targets, regardless of the package.
(-when-let (packages (let-alist
(with-temp-buffer
(call-process cargo nil t nil
(call-process cargo nil '(t nil) nil
"metadata" "--no-deps"
"--manifest-path" manifest)
"--manifest-path" manifest
"--format-version" "1")
(goto-char (point-min))
(let ((json-array-type 'list))
(json-read)))
Expand Down