{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/50184","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/50184/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/50184/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/50184/events","html_url":"https://github.com/rust-lang/rust/issues/50184","id":316878312,"number":50184,"title":"with_sess called before set_parse_sess on nightly","user":{"login":"jkcclemens","id":955250,"avatar_url":"https://avatars0.githubusercontent.com/u/955250?v=4","gravatar_id":"","url":"https://api.github.com/users/jkcclemens","html_url":"https://github.com/jkcclemens","followers_url":"https://api.github.com/users/jkcclemens/followers","following_url":"https://api.github.com/users/jkcclemens/following{/other_user}","gists_url":"https://api.github.com/users/jkcclemens/gists{/gist_id}","starred_url":"https://api.github.com/users/jkcclemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkcclemens/subscriptions","organizations_url":"https://api.github.com/users/jkcclemens/orgs","repos_url":"https://api.github.com/users/jkcclemens/repos","events_url":"https://api.github.com/users/jkcclemens/events{/privacy}","received_events_url":"https://api.github.com/users/jkcclemens/received_events","type":"User","site_admin":false},"labels":[{"id":650731663,"url":"https://api.github.com/repos/rust-lang/rust/labels/C-bug","name":"C-bug","color":"f5f1fd","default":false},{"id":9618520,"url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-23T16:02:38Z","updated_at":"2018-05-23T15:03:41Z","closed_at":null,"author_association":"NONE","body":"<details>\r\n<summary><code>cargo build</code> output</summary>\r\n\r\n```\r\n   Compiling html5ever v0.22.2\r\n   Compiling dotenv v0.11.0\r\n   Compiling git2 v0.7.1\r\n   Compiling string_cache v0.7.2\r\n   Compiling markup5ever v0.7.2\r\n   Compiling tokio-proto v0.1.1\r\n   Compiling tokio-tls v0.1.4\r\n   Compiling ring v0.13.0-alpha\r\nerror: failed to run custom build command for `string_cache v0.7.2`\r\nprocess didn't exit successfully: `/Users/kyleclemens/Code/Rust/Projects/paste/target/debug/build/string_cache-d56e68a236f49db5/build-script-build` (exit code: 101)\r\n--- stderr\r\nthread 'main' panicked at 'proc_macro::__internal::with_sess() called before set_parse_sess()!', libproc_macro/lib.rs:1319:9\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n   1: std::sys_common::backtrace::print\r\n   2: std::panicking::default_hook::{{closure}}\r\n   3: std::panicking::default_hook\r\n   4: std::panicking::rust_panic_with_hook\r\n   5: std::panicking::begin_panic\r\n   6: proc_macro::__internal::with_sess\r\n   7: proc_macro2::imp::Span::call_site\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.6/src/unstable.rs:223\r\n   8: proc_macro2::Span::_new\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.6/src/lib.rs:186\r\n   9: siphasher::sip::u8to64_le\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/string_cache_codegen-0.4.1/lib.rs:217\r\n  10: siphasher::sip::u8to64_le\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/string_cache_codegen-0.4.1/lib.rs:172\r\n  11: string_cache_codegen::AtomType::to_tokens::{{closure}}\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/string_cache_codegen-0.4.1/lib.rs:272\r\n  12: build_script_build::main\r\n             at ./build.rs:7\r\n  13: std::rt::lang_start::{{closure}}\r\n             at /Users/travis/build/rust-lang/rust/src/libstd/rt.rs:74\r\n  14: std::panicking::try::do_call\r\n  15: __rust_maybe_catch_panic\r\n  16: std::rt::lang_start_internal\r\n  17: std::rt::lang_start\r\n             at /Users/travis/build/rust-lang/rust/src/libstd/rt.rs:74\r\n  18: build_script_build::main\r\n\r\nwarning: build failed, waiting for other jobs to finish...\r\nerror: failed to run custom build command for `html5ever v0.22.2`\r\nprocess didn't exit successfully: `/Users/kyleclemens/Code/Rust/Projects/paste/target/debug/build/html5ever-a52d56e779889e57/build-script-build` (exit code: 101)\r\n--- stderr\r\nthread 'main' panicked at 'proc_macro::__internal::with_sess() called before set_parse_sess()!', libproc_macro/lib.rs:1319:9\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n   1: std::sys_common::backtrace::print\r\n   2: std::panicking::default_hook::{{closure}}\r\n   3: std::panicking::default_hook\r\n   4: std::panicking::rust_panic_with_hook\r\n   5: std::panicking::begin_panic\r\n   6: proc_macro::__internal::with_sess\r\n   7: <proc_macro::TokenStream as core::str::FromStr>::from_str\r\n   8: core::alloc::Layout::align\r\n             at /Users/travis/build/rust-lang/rust/src/libcore/str/mod.rs:2550\r\n   9: core::clone::impls::<impl core::clone::Clone for bool>::clone\r\n             at /Users/travis/build/rust-lang/rust/src/liballoc/str.rs:1814\r\n  10: proc_macro2::imp::LexError\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.6/src/unstable.rs:30\r\n  11: core::alloc::Layout::align\r\n             at /Users/travis/build/rust-lang/rust/src/libcore/str/mod.rs:2550\r\n  12: core::clone::impls::<impl core::clone::Clone for bool>::clone\r\n             at /Users/travis/build/rust-lang/rust/src/liballoc/str.rs:1814\r\n  13: <syntax::parse::token::DelimToken as core::clone::Clone>::clone\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.6/src/lib.rs:85\r\n  14: <proc_macro2::TokenStream as core::clone::Clone>::clone\r\n             at /Users/travis/build/rust-lang/rust/src/libcore/str/mod.rs:2550\r\n  15: <alloc::alloc::Global as core::alloc::Alloc>::realloc\r\n             at /Users/travis/build/rust-lang/rust/src/liballoc/str.rs:1814\r\n  16: syn::parse2::{{closure}}\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.13.1/src/lib.rs:640\r\n  17: syn::parse2::{{closure}}\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.13.1/src/lib.rs:705\r\n  18: build_script_build::match_token::expand\r\n             at ./macros/match_token.rs:114\r\n  19: build_script_build::main\r\n             at ./build.rs:24\r\n  20: std::rt::lang_start::{{closure}}\r\n             at /Users/travis/build/rust-lang/rust/src/libstd/rt.rs:74\r\n  21: std::panicking::try::do_call\r\n  22: __rust_maybe_catch_panic\r\n  23: std::rt::lang_start_internal\r\n  24: std::rt::lang_start\r\n             at /Users/travis/build/rust-lang/rust/src/libstd/rt.rs:74\r\n  25: build_script_build::main\r\n\r\nwarning: build failed, waiting for other jobs to finish...\r\nerror[E0425]: cannot find value `f` in this scope\r\n --> /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/dotenv-0.11.0/src/errors.rs:3:17\r\n  |\r\n3 | #[derive(Debug, ErrorChain)]\r\n  |                 ^^^^^^^^^^ not found in this scope\r\n\r\nerror: aborting due to previous error\r\n\r\nFor more information about this error, try `rustc --explain E0425`.\r\nerror: Could not compile `dotenv`.\r\nwarning: build failed, waiting for other jobs to finish...\r\nerror: failed to run custom build command for `markup5ever v0.7.2`\r\nprocess didn't exit successfully: `/Users/kyleclemens/Code/Rust/Projects/paste/target/debug/build/markup5ever-3a7d0e3731af9f38/build-script-build` (exit code: 101)\r\n--- stderr\r\nthread 'main' panicked at 'proc_macro::__internal::with_sess() called before set_parse_sess()!', libproc_macro/lib.rs:1319:9\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n   1: std::sys_common::backtrace::print\r\n   2: std::panicking::default_hook::{{closure}}\r\n   3: std::panicking::default_hook\r\n   4: std::panicking::rust_panic_with_hook\r\n   5: std::panicking::begin_panic\r\n   6: proc_macro::__internal::with_sess\r\n   7: proc_macro2::imp::Span::call_site\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.6/src/unstable.rs:223\r\n   8: proc_macro2::Span::_new\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.6/src/lib.rs:186\r\n   9: siphasher::sip::u8to64_le\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/string_cache_codegen-0.4.1/lib.rs:217\r\n  10: string_cache_codegen::AtomType::write_to\r\n             at /Users/kyleclemens/.cargo/registry/src/github.com-1ecc6299db9ec823/string_cache_codegen-0.4.1/lib.rs:172\r\n  11: build_script_build::main\r\n             at ./build.rs:51\r\n  12: std::rt::lang_start::{{closure}}\r\n             at /Users/travis/build/rust-lang/rust/src/libstd/rt.rs:74\r\n  13: std::panicking::try::do_call\r\n  14: __rust_maybe_catch_panic\r\n  15: std::rt::lang_start_internal\r\n  16: std::rt::lang_start\r\n             at /Users/travis/build/rust-lang/rust/src/libstd/rt.rs:74\r\n  17: <build_script_build::named_entities_to_phf::_IMPL_DESERIALIZE_FOR_CharRef::<impl serde::de::Deserialize<'de> for build_script_build::named_entities_to_phf::CharRef>::deserialize::__Visitor<'de> as serde::de::Visitor<'de>>::visit_map\r\n\r\nwarning: build failed, waiting for other jobs to finish...\r\nerror: build failed\r\n```\r\n</details>\r\n\r\n---\r\n\r\nThis looks awfully similar to https://github.com/rust-lang/rust/issues/41610.\r\n\r\nThis is on `rustc 1.27.0-nightly (ac3c2288f 2018-04-18)`, but I can reproduce back to `2018-04-16`. I can't test further back because a library restricts the compiler version to newer than 04-16.\r\n\r\nmacOS 10.13.4, Rust installed via `rustup` and not `brew`.\r\n\r\nReproduced on `ubuntu` Docker image and on a Debian 9 Linode.\r\n\r\n[This](https://github.com/jkcclemens/sess_repro) example repository will produce this issue when `cargo build` is used."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/391381117","html_url":"https://github.com/rust-lang/rust/issues/50184#issuecomment-391381117","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/50184","id":391381117,"user":{"login":"jkcclemens","id":955250,"avatar_url":"https://avatars0.githubusercontent.com/u/955250?v=4","gravatar_id":"","url":"https://api.github.com/users/jkcclemens","html_url":"https://github.com/jkcclemens","followers_url":"https://api.github.com/users/jkcclemens/followers","following_url":"https://api.github.com/users/jkcclemens/following{/other_user}","gists_url":"https://api.github.com/users/jkcclemens/gists{/gist_id}","starred_url":"https://api.github.com/users/jkcclemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkcclemens/subscriptions","organizations_url":"https://api.github.com/users/jkcclemens/orgs","repos_url":"https://api.github.com/users/jkcclemens/repos","events_url":"https://api.github.com/users/jkcclemens/events{/privacy}","received_events_url":"https://api.github.com/users/jkcclemens/received_events","type":"User","site_admin":false},"created_at":"2018-05-23T15:03:41Z","updated_at":"2018-05-23T15:03:41Z","author_association":"NONE","body":"Are there any plans to fix this? It's been a month of no progress, so just curious if it has been looked at."}}
{"actor":{"display_login":"jkcclemens"}}