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

chore: fix cargo docs from failing #205

Closed
wants to merge 22 commits into from
Closed

chore: fix cargo docs from failing #205

wants to merge 22 commits into from

Conversation

dutterbutter
Copy link
Contributor

@dutterbutter dutterbutter commented May 13, 2022

Summary of changes

Changes introduced in this pull request:

  • Adds submodules deps

Reference issue to close (if applicable)

Closes #225

@dutterbutter dutterbutter changed the title chore: add submodules to fix docs deps issue chore: fix cargo docs from failing May 13, 2022
@dutterbutter
Copy link
Contributor Author

dutterbutter commented May 13, 2022

Still an issue building docs in the CI for some reason. It could be due to this reported issue that seems to have regressed rust-lang/rust#93476, but reportedly should be fixed in rust-lang/rust#96447

Error:

error: internal compiler error: unexpected panic

error: Unrecognized option: 'crate-version'

error: could not document `webb-client`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type lib --crate-name webb_client client/src/lib.rs -o /home/runner/work/protocol-substrate/protocol-substrate/target/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=668ea3d87c858775 -L dependency=/home/runner/work/protocol-substrate/protocol-substrate/target/debug/deps --extern async_std=/home/runner/work/protocol-substrate/protocol-substrate/target/debug/deps/libasync_std-ed4ce62ea06324cd.rmeta --extern codec=/home/runner/work/protocol-substrate/protocol-substrate/target/debug/deps/libparity_scale_codec-0a1d53ccd132db98.rmeta --extern subxt=/home/runner/work/protocol-substrate/protocol-substrate/target/debug/deps/libsubxt-35710cea342ecd9b.rmeta --crate-version 0.1.0` (exit status: 1)

Backtrace

thread 'rustc' panicked at 'no entry found for key', src/librustdoc/passes/collect_intra_doc_links.rs:930:16
stack backtrace:
   0: rust_begin_unwind
             at /rustc/498eeb72f590e518e19746b346be53713689e207/library/std/src/panicking.rs:577:5
   1: core::panicking::panic_fmt
             at /rustc/498eeb72f590e518e19746b346be53713689e207/library/core/src/panicking.rs:135:14
   2: core::panicking::panic_display
             at /rustc/498eeb72f590e518e19746b346be53713689e207/library/core/src/panicking.rs:65:5
   3: core::panicking::panic_str
             at /rustc/498eeb72f590e518e19746b346be53713689e207/library/core/src/panicking.rs:56:5
   4: core::option::expect_failed
             at /rustc/498eeb72f590e518e19746b346be53713689e207/library/core/src/option.rs:1840:5
   5: rustdoc::passes::collect_intra_doc_links::resolve_associated_trait_item
   6: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
   7: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve
   8: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_link
   9: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  10: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  11: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  12: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  13: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  14: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
  15: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::core::run_global_ctxt::{closure#8}>
  16: rustdoc::core::run_global_ctxt
  17: <rustc_session::session::Session>::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache), rustdoc::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#0}>
  18: <rustc_interface::interface::Compiler>::enter::<rustdoc::main_options::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
  19: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustdoc::main_options::{closure#0}>::{closure#1}>
  20: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorReported>, rustdoc::main_options::{closure#0}>
  21: rustdoc::main_options
  22: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustdoc::main_args::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@dutterbutter dutterbutter added the wip 🚧 Work in-progress label May 13, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 13, 2022

Codecov Report

Merging #205 (4cd41b4) into main (fee902e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #205   +/-   ##
=======================================
  Coverage   63.57%   63.57%           
=======================================
  Files         107      107           
  Lines        7611     7611           
=======================================
  Hits         4839     4839           
  Misses       2772     2772           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fee902e...4cd41b4. Read the comment docs.

@dutterbutter dutterbutter self-assigned this May 13, 2022
@drewstone
Copy link
Contributor

@dutterbutter what is the status of this?

@dutterbutter
Copy link
Contributor Author

dutterbutter commented May 17, 2022

@drewstone I cannot seem to determine why cargo doc is failing in the CI with error: could not document webb-client as described above.

Running the commands locally works perfectly fine and you can view the docs accordingly. However in the CI it is not the case. I will try to playing with different rust versions perhaps but we are not seeing this issue on any of other Rust doc workflows.

@drewstone
Copy link
Contributor

Can we exclude the client from the docs and get this working again @dutterbutter ?

@dutterbutter
Copy link
Contributor Author

Yes that shouldn't be a problem.

@drewstone
Copy link
Contributor

@dutterbutter can you upmerge this branch and see if the docs can be fixed now that the submodule is removed?

@dutterbutter dutterbutter mentioned this pull request Jun 14, 2022
@dutterbutter
Copy link
Contributor Author

Closing in favour of #225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip 🚧 Work in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Fix Doc CI
3 participants