{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/1634","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/1634/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/1634/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/1634/events","html_url":"https://github.com/rust-lang/cargo/issues/1634","id":78006299,"number":1634,"title":"RUST_BACKTRACE=1 should be on by default for `cargo test`","user":{"login":"jimmycuadra","id":122457,"avatar_url":"https://avatars.githubusercontent.com/u/122457?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmycuadra","html_url":"https://github.com/jimmycuadra","followers_url":"https://api.github.com/users/jimmycuadra/followers","following_url":"https://api.github.com/users/jimmycuadra/following{/other_user}","gists_url":"https://api.github.com/users/jimmycuadra/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmycuadra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmycuadra/subscriptions","organizations_url":"https://api.github.com/users/jimmycuadra/orgs","repos_url":"https://api.github.com/users/jimmycuadra/repos","events_url":"https://api.github.com/users/jimmycuadra/events{/privacy}","received_events_url":"https://api.github.com/users/jimmycuadra/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-05-19T09:13:46Z","updated_at":"2015-06-18T17:42:55Z","closed_at":"2015-06-17T21:03:39Z","body":"Having to set this somewhat arcane environment variable in order to get a backtrace on a failing test is not a good user experience. I'm not sure if there are any plans to implement this option as a flag to `rustc` itself instead of an environment variable, or if there are any plans to make it on by default, but in any case I think Cargo should take care of turning it on for the user by default, at the very least when running tests."},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/113232373","html_url":"https://github.com/rust-lang/cargo/issues/1634#issuecomment-113232373","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/1634","id":113232373,"user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T17:42:55Z","updated_at":"2015-06-18T17:42:55Z","body":"> @alexcrichton the problem is that most people experience running Rust programs through Cargo, and having to learn about RUST_BACKTRACE=1 feels odd, to say the least.\r\n\r\nI agree, but the whole idea of an environment variable controlling backtraces also seems a little odd to me as well, and I'm not sure that adding a flag to `cargo run` would help much. If the goal was just to add some text to `cargo run --help` then we could just add some text about `RUST_BACKTRACE`.\r\n\r\n> while `RUST_BACKTRACE=1 cargo run` feels like you're plunging down into a lower abstraction to do what seems like a normal kind of thing\r\n\r\nThis seems like a somewhat critical distinction to me, though, in that a backtrace for a Rust program *is* a lower abstraction and *is not* a normal kind of thing. The stack traces from Rust are very different than the stack traces from Ruby/Python, for example:\r\n\r\n* You very rarely have line numbers/filenames\r\n* The stack trace is not the actual stack trace due to inlining\r\n* Stack traces do not work on all platforms\r\n* Stack traces often have weird other symbols in them\r\n\r\nBacktraces in Rust are just not a \"super first class\" utility which are expected to be 100% accurate, they're mostly just advisory. Along those lines I don't necessarily want all advisory debugging tools to be various Cargo flags.\r\n"}}