{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/2972","repository_url":"https://api.github.com/repos/rust-lang/cargo","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/2972/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/2972/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/2972/events","html_url":"https://github.com/rust-lang/cargo/issues/2972","id":169778269,"number":2972,"title":"TOML parsing isn't very helpful.","user":{"login":"RandomInsano","id":71530,"avatar_url":"https://avatars.githubusercontent.com/u/71530?v=3","gravatar_id":"","url":"https://api.github.com/users/RandomInsano","html_url":"https://github.com/RandomInsano","followers_url":"https://api.github.com/users/RandomInsano/followers","following_url":"https://api.github.com/users/RandomInsano/following{/other_user}","gists_url":"https://api.github.com/users/RandomInsano/gists{/gist_id}","starred_url":"https://api.github.com/users/RandomInsano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandomInsano/subscriptions","organizations_url":"https://api.github.com/users/RandomInsano/orgs","repos_url":"https://api.github.com/users/RandomInsano/repos","events_url":"https://api.github.com/users/RandomInsano/events{/privacy}","received_events_url":"https://api.github.com/users/RandomInsano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-07T03:45:16Z","updated_at":"2016-08-07T06:38:29Z","closed_at":null,"body":"I've updated to nightly (tried both August 5th and 6th) on Ubuntu 16.04. When a dependent package's TOML file isn't valid, Cargo throws an error. That's good, but it would be very helpful if the TOML parser could pass back what the heck the line was that parsing failed on.\r\n\r\nSome of this helpfulness likely needs to be implemented in the [toml](https://github.com/alexcrichton/toml-rs) package, and some needs to be implemented here. How can I help get that done?\r\n\r\n\r\nHere's the exampley details:\r\n\r\nMy project requires a package that requires the package Iron, specifically version 0.3. It seems to fail to build where it hadn't before:\r\n\r\n\troot@c629e2ba5866:/home/sail/sail-rust# cargo build --release --verbose\r\n\terror: unable to get packages from source\r\n\r\n\tCaused by:\r\n\t  failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/iron-0.3.0/Cargo.toml`\r\n\r\n\tCaused by:\r\n\t  you have already provided an operation, such as =, ~, or ^; only use one\r\n\r\nThat isn't terribly true or at all helpful. Here be the steps to reproduce the problem for playing around:\r\n\r\n\troot@c629e2ba5866:/tmp# cargo new hello_world && cd hello_world\r\n\t     Created library `hello_world` project\r\n\troot@c629e2ba5866:/tmp/hello_world# echo \"iron = \\\"0.3\\\"\" >> Cargo.toml \r\n\troot@c629e2ba5866:/tmp/hello_world# cargo build\r\n\t    Updating registry `https://github.com/rust-lang/crates.io-index`\r\n\terror: unable to get packages from source\r\n\r\n\tCaused by:\r\n\t  failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/iron-0.3.0/Cargo.toml`\r\n\r\n\tTo learn more, run the command again with --verbose.\r\n\r\nNow, nothing in here really looked wrong to me at first glance, especially based on that error:\r\n\r\n```toml\r\n[package]\r\nname = \"iron\"\r\nversion = \"0.3.0\"\r\ndescription = \"Extensible, Concurrency Focused Web Development in Rust.\"\r\nreadme = \"README.md\"\r\nrepository = \"https://github.com/iron/iron\"\r\ndocumentation = \"http://ironframework.io/doc/iron/\"\r\nlicense = \"MIT\"\r\n\r\n[lib]\r\n\r\nname = \"iron\"\r\npath = \"src/lib.rs\"\r\n\r\n[features]\r\nssl = [\"hyper/ssl\"]\r\n\r\n[dependencies]\r\ntypemap = \"0.3\"\r\nurl = \"0.5\"\r\nplugin = \"0.2*\"\r\nmodifier = \"0.1\"\r\nerror = \"0.1\"\r\nlog = \"0.3\"\r\nconduit_mime_types = \"0.7\"\r\nlazy_static = \"0.1\"\r\nnum_cpus = \"0.2\"\r\n\r\n[dependencies.hyper]\r\nversion = \"0.8\"\r\ndefault-features = false\r\n\r\n[dev-dependencies]\r\ntime = \"*\"\r\n```\r\n\r\nIt turned out to be the line `plugin = \"0.2*\"` which is definitely malformed but was functional before. I really want the error to *at least* point you to which line was parsed when it failed (even if the config data spans multiple lines)."},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/238066728","html_url":"https://github.com/rust-lang/cargo/issues/2972#issuecomment-238066728","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/2972","id":238066728,"user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T06:38:29Z","updated_at":"2016-08-07T06:38:29Z","body":"This feels like a duplicate of https://github.com/rust-lang/cargo/issues/2964"}}
{"actor":{"display_login":"steveklabnik"}}