Skip to content

Latest cargo can't parse Cargo.toml? #195

New issue

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

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

Already on GitHub? # to your account

Closed
MagaTailor opened this issue May 14, 2016 · 7 comments
Closed

Latest cargo can't parse Cargo.toml? #195

MagaTailor opened this issue May 14, 2016 · 7 comments

Comments

@MagaTailor
Copy link

I'm getting a strange error from url 0.5.9:

error: unable to get packages from source

Caused by:
  failed to parse manifest at `.cargo/registry/src/github.heygears.com-48ad6e4054423464/url-0.5.9/Cargo.toml`

Caused by:
  could not parse input as TOML
.cargo/registry/src/github.heygears.com-48ad6e4054423464/url-0.5.9/Cargo.toml:14:3 expected a newline after table definition

You probably know what's happening - cargo bug, breaking change?

@metajack
Copy link
Contributor

@alexcrichton Ideas?

@alexcrichton
Copy link
Contributor

Yes this was a bug fix to TOML parsing in toml-rs/toml-rs#94, but Cargo has not yet been upgraded to have that bugfix. That is being done as part of rust-lang/cargo#2680 in a way that will not emit this error.

I don't really know why you would be seeing this error unless you custom compiled Cargo against a newer version of TOML manually, none of our releases should have this.

@metajack
Copy link
Contributor

We're using 2016-05-12 nightly.

@MagaTailor
Copy link
Author

MagaTailor commented May 15, 2016

I don't recall modifying any dependencies and the latest git source doesn't produce a cargo like that. I was using different cargo versions though; maybe 0.11 doesn't go well with 0.10 source or some other combination.
Oh well.

@SimonSapin
Copy link
Member

If this keeps being a problem I can publish url 0.5.10 with more newlines in Cargo.toml.

@SimonSapin
Copy link
Member

(1.x versions do that already.)

@xpe
Copy link

xpe commented Jun 13, 2016

@SimonSapin yes, it would be useful to push a new version in the 0.5.x series with e362e13

warning: TOML file found which contains invalid syntax and will soon not parse
at `/Users/xpe/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/url-0.5.9/Cargo.toml`.

The TOML spec requires newlines after table definitions (e.g. `[a] b = 1` is
invalid), but this file has a table header which does not have a newline after
it. A newline needs to be added and this warning will soon become a hard error
in the future.

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

No branches or pull requests

5 participants