Skip to content
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

Add option to build with stable #506

Open
rodrimati1992 opened this issue Dec 5, 2019 · 13 comments
Open

Add option to build with stable #506

rodrimati1992 opened this issue Dec 5, 2019 · 13 comments
Labels
C-build-failure Category: This is a crate that failed to build E-hard Effort: This will require a lot of work S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions

Comments

@rodrimati1992
Copy link

rodrimati1992 commented Dec 5, 2019

https://docs.rs/crate/abi_stable/0.8.0/builds

abi_stable
https://docs.rs/crate/abi_stable/0.8.0/builds/203164

It also failed on my computer (in nightly-2019-12-03-x86_64-unknown-linux-gnu) with the same error and this backtrace

Backtrace
  error: internal compiler error: src/librustc/hir/def.rs:385: attempted .def_id() on invalid res: Err

  thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:892:9
  stack backtrace:
     0:     0x7fd3894065d4 - backtrace::backtrace::libunwind::trace::hc586f95f659e6084
                                 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
     1:     0x7fd3894065d4 - backtrace::backtrace::trace_unsynchronized::ha9827fdb593fd967
                                 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
     2:     0x7fd3894065d4 - std::sys_common::backtrace::_print_fmt::h00c888c95e07165a
                                 at src/libstd/sys_common/backtrace.rs:84
     3:     0x7fd3894065d4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8407ffb2d059bc74
                                 at src/libstd/sys_common/backtrace.rs:61
     4:     0x7fd38943ecec - core::fmt::write::h4165a12a3856465f
                                 at src/libcore/fmt/mod.rs:1024
     5:     0x7fd3893fa937 - std::io::Write::write_fmt::h499a0566ceaa0048
                                 at src/libstd/io/mod.rs:1428
     6:     0x7fd38940aa7e - std::sys_common::backtrace::_print::h05fbb11587298e2b
                                 at src/libstd/sys_common/backtrace.rs:65
     7:     0x7fd38940aa7e - std::sys_common::backtrace::print::h8021a3ed2b5ff07e
                                 at src/libstd/sys_common/backtrace.rs:50
     8:     0x7fd38940aa7e - std::panicking::default_hook::{{closure}}::hd3a6326f5c6c149f
                                 at src/libstd/panicking.rs:193
     9:     0x7fd38940a771 - std::panicking::default_hook::h7088fb00a0cb1faf
                                 at src/libstd/panicking.rs:210
    10:     0x7fd3734d3248 - <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call::ha9a0e3c625716847
                                 at /rustc/fdc0011561c6365c596dfd8fa1ef388162bc89c7/src/liballoc/boxed.rs:983
    11:     0x7fd3734d7a84 - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::hd6bd7ccb0bdaefed
                                 at /rustc/fdc0011561c6365c596dfd8fa1ef388162bc89c7/src/libproc_macro/bridge/client.rs:305
    12:     0x7fd38940b230 - std::panicking::rust_panic_with_hook::h6b223bff7721d4c1
                                 at src/libstd/panicking.rs:475
    13:     0x7fd38ba6256d - std::panicking::begin_panic::h8ef26d2aea648f22
    14:     0x7fd38ba969a0 - rustc_errors::HandlerInner::bug::h6b233e840067cebc
    15:     0x7fd38ba9568a - rustc_errors::Handler::bug::hb654993c1e76b21a
    16:     0x7fd38b36df9b - rustc::util::bug::opt_span_bug_fmt::{{closure}}::h056cc1cdf743dd12
    17:     0x7fd38b36ca33 - rustc::ty::context::tls::with_opt::{{closure}}::he8758b5e67be4aee
    18:     0x7fd38b36c9eb - rustc::ty::context::tls::with_opt::h944a0b8dbaa86ba6
    19:     0x7fd38b36dea8 - rustc::util::bug::opt_span_bug_fmt::hae9ab10c0feecbc5
    20:     0x7fd38b36de12 - rustc::util::bug::bug_fmt::h886f94e8d4bb0f0b
    21:     0x556d8c032ee2 - rustc::hir::def::Res<Id>::def_id::{{closure}}::h635d7f9433dcef5e
    22:     0x556d8c06edf2 - rustdoc::clean::register_res::h48d433549701437b
    23:     0x556d8c1503ee - <syntax_pos::source_map::Spanned<rustc::hir::VisibilityKind> as rustdoc::clean::Clean<rustdoc::clean::Visibility>>::clean::h49051be75d01b5e8
    24:     0x556d8c11e6e4 - <rustc::hir::StructField as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h5e93a91f40d130ad
    25:     0x556d8c1c6900 - <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter::h50cc920a3f15ad93
    26:     0x556d8c11edb4 - <rustdoc::doctree::Struct as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h3304943530443092
    27:     0x556d8c115fb1 - <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h18c1955c1f582d3f
    28:     0x556d8c116331 - <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h18c1955c1f582d3f
    29:     0x556d8c116331 - <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h18c1955c1f582d3f
    30:     0x556d8c116331 - <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h18c1955c1f582d3f
    31:     0x556d8c066609 - rustdoc::clean::krate::h500052b81e82211b
    32:     0x556d8c0d9c8f - rustc::ty::context::tls::enter_global::hb6e5b84eb752cea9
    33:     0x556d8c0ae1b3 - rustc_interface::interface::run_compiler_in_existing_thread_pool::h7a4bf6c65cd2ef69
    34:     0x556d8c28c748 - std::panicking::try::do_call::had10e69eb7c0fd8f
    35:     0x7fd38941bd0a - __rust_maybe_catch_panic
                                 at src/libpanic_unwind/lib.rs:78
    36:     0x556d8c2883be - rustc_driver::catch_fatal_errors::h9519cfc4ab58ee18
    37:     0x556d8c0465ba - rustdoc::main_options::h6fa48593da911d49
    38:     0x556d8c25c8b4 - std::thread::local::LocalKey<T>::with::hc2830240e0119ac9
    39:     0x556d8c12f4ce - scoped_tls::ScopedKey<T>::set::h8b122eaf66ecd628
    40:     0x556d8c2a0984 - syntax::with_globals::h5410313cd41d17b9
    41:     0x556d8c0aea72 - std::sys_common::backtrace::__rust_begin_short_backtrace::he357e176bbab3f66
    42:     0x7fd38941bd0a - __rust_maybe_catch_panic
                                 at src/libpanic_unwind/lib.rs:78
    43:     0x556d8c133ee9 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h21e3347670049c74
    44:     0x7fd3893ec88f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9ef9eb6ec2ee6be0
                                 at /rustc/fdc0011561c6365c596dfd8fa1ef388162bc89c7/src/liballoc/boxed.rs:969
    45:     0x7fd38941a730 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hc0fc46e9a64f076e
                                 at /rustc/fdc0011561c6365c596dfd8fa1ef388162bc89c7/src/liballoc/boxed.rs:969
    46:     0x7fd38941a730 - std::sys_common::thread::start_thread::h4eee21a391e25c99
                                 at src/libstd/sys_common/thread.rs:13
    47:     0x7fd38941a730 - std::sys::unix::thread::Thread::new::thread_start::h673f7c20aae94594
                                 at src/libstd/sys/unix/thread.rs:80
    48:     0x7fd3891876db - start_thread
    49:     0x7fd388c9888f - __clone
    50:                0x0 - <unknown>
  error: aborting due to previous error

  error: Could not document `abi_stable`.

  Caused by:
    process didn't exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name abi_stable abi_stable/src/lib.rs -o '[redacted]/abi_stable_crates/target/doc' --cfg 'feature="channels"' --cfg 'feature="crossbeam-channel"' --cfg 'feature="default"' --cfg 'feature="serde_json"' --error-format=json --json=diagnostic-rendered-ansi -L 'dependency=[redacted]/abi_stable_crates/target/debug/deps' --extern 'abi_stable_derive=[redacted]/abi_stable_crates/target/debug/deps/libabi_stable_derive-dff63361c452ddd1.so' --extern 'abi_stable_shared=[redacted]/abi_stable_crates/target/debug/deps/libabi_stable_shared-a014f0489f9ded5a.rmeta' --extern 'core_extensions=[redacted]/abi_stable_crates/target/debug/deps/libcore_extensions-e62cb7643589c738.rmeta' --extern 'crossbeam_channel=[redacted]/abi_stable_crates/target/debug/deps/libcrossbeam_channel-24cdc3968a67dddd.rmeta' --extern 'generational_arena=[redacted]/abi_stable_crates/target/debug/deps/libgenerational_arena-9d2bda75b8618542.rmeta' --extern 'libloading=[redacted]/abi_stable_crates/target/debug/deps/liblibloading-8e22a41a3a91c5e8.rmeta' --extern 'lock_api=[redacted]/abi_stable_crates/target/debug/deps/liblock_api-6a62490fb191d43f.rmeta' --extern 'parking_lot=[redacted]/abi_stable_crates/target/debug/deps/libparking_lot-cad3989fbf66bad1.rmeta' --extern 'serde=[redacted]/abi_stable_crates/target/debug/deps/libserde-65fb8b5741d2fe57.rmeta' --extern 'serde_derive=[redacted]/abi_stable_crates/target/debug/deps/libserde_derive-86d96a74bd7eff56.so' --extern 'serde_json=[redacted]/abi_stable_crates/target/debug/deps/libserde_json-8969eba699194ab2.rmeta' --cfg 'feature="rust_1_36"' --cfg 'feature="rust_1_38"' --cfg 'feature="rust_1_39"' --cfg 'feature="nightly_rust"'` (exit code: 1)

This seems to be the same bug as rust-lang/rust#67006.

cargo doc runs fine on stable-x86_64-unknown-linux-gnu - rustc 1.39.0 (4560ea788 2019-11-04).

@rodrimati1992 rodrimati1992 added the C-build-failure Category: This is a crate that failed to build label Dec 5, 2019
@jyn514
Copy link
Member

jyn514 commented Dec 5, 2019

This is not a docs.rs bug. Feel free to open an issue in https://github.com/rust-lang/rust/ if you think it is sufficiently different from rust-lang/rust#67006.

@jyn514 jyn514 closed this as completed Dec 5, 2019
@rodrimati1992
Copy link
Author

It is a build failure that would be fixed by building this crate with rustdoc stable,which is why I mention it at the end of the comment.

@rodrimati1992
Copy link
Author

cargo +nightly doc has been buggy enough for me that I would prefer if building with stable was an option on a per-crate basis.

@jyn514 jyn514 changed the title abi_stable 0.8.0 fails to build due to nightly rustdoc ICE Add option to build with stable Dec 5, 2019
@jyn514 jyn514 reopened this Dec 5, 2019
@jyn514
Copy link
Member

jyn514 commented Dec 5, 2019

This seems unlikely to be possible in the near future, see #228 (comment). However I would like to support this so I'm leaving the issue open.

@jyn514 jyn514 added wishlist and removed C-build-failure Category: This is a crate that failed to build labels Dec 5, 2019
@jyn514
Copy link
Member

jyn514 commented Dec 5, 2019

The nightly options are --resource-suffix, --static-root-path, and --disable-per-crate-search. The 3rd could probably be worked around, but the first two are necessary to ensure the proper CSS files are linked for the documentation.

@jyn514
Copy link
Member

jyn514 commented Dec 27, 2019

@rodrimati1992 I rebuilt your crate manually, but it failed with a different ICE! Sorry for the trouble haha, here's the new error if you want to file a bug: https://docs.rs/crate/abi_stable/0.8.1/builds/208296

@rodrimati1992
Copy link
Author

This ICE has already been reported for servo in rust-lang/rust#67601 .

@jyn514 jyn514 added C-build-failure Category: This is a crate that failed to build E-hard Effort: This will require a lot of work S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions and removed wishlist labels Jun 27, 2020
@TheBlueMatt
Copy link

TheBlueMatt commented Jun 14, 2021

We also now see failure to build due to rust-lang/rust#84738. Maybe its time to switch to stable (or stable-built-with-unstable-flags-enabled) now given the recent instability of nightly?

@jyn514
Copy link
Member

jyn514 commented Jun 14, 2021

@TheBlueMatt this is not currently possible, see #506 (comment)

@TheBlueMatt
Copy link

TheBlueMatt commented Jun 14, 2021 via email

@jyn514
Copy link
Member

jyn514 commented Jun 14, 2021

Pinning a nightly is tracked by #228, not here.

I am not willing to have the docs.rs team be in charge of finding a "blessed" nightly that works for everyone, we don't have the time or manpower to be responsible for that.

@TheBlueMatt
Copy link

TheBlueMatt commented Jun 14, 2021 via email

@jyn514
Copy link
Member

jyn514 commented Jun 14, 2021

@TheBlueMatt building rustc from source takes about 45 minutes on consumer hardware, and we would need somewhere to store the artifacts. There is no nightly that corresponds to stable because it will be missing backports, and it means a great deal more complexity for the team because it introduces a 6-12 week delay between when features are introduced to rustdoc and docs.rs can start using them. So I don't consider that a good alternative at this time, I think pinning nightlies is much more feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-build-failure Category: This is a crate that failed to build E-hard Effort: This will require a lot of work S-needs-design Status: There's a problem here, but no obvious solution; or the solution raises other questions
Projects
None yet
Development

No branches or pull requests

3 participants