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

Use same FxHashMap in rustdoc-json-types and librustdoc. #127456

Closed
wants to merge 1 commit into from

Conversation

aDotInTheVoid
Copy link
Member

@aDotInTheVoid aDotInTheVoid commented Jul 7, 2024

Reopening of #110051, because bors has seemingly abandoned us there :'(

try-job: dist-arm-linux

try-job: dist-armhf-linux

try-job: armhf-gnu

try-job: test-various

r? @ghost

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 7, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 7, 2024

rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing src/librustdoc/json/conversions.rs; otherwise, make sure you bump the FORMAT_VERSION constant.

cc @CraftSpider, @aDotInTheVoid, @Enselic, @obi1kenobi

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@aDotInTheVoid aDotInTheVoid marked this pull request as draft July 7, 2024 12:45
@aDotInTheVoid
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 7, 2024
Use same `FxHashMap` in `rustdoc-json-types` and `librustdoc`.

Reopening of rust-lang#110051, because bors has seemingly abandoned us there :'(

`@bors` try

r? `@ghost`
@bors
Copy link
Contributor

bors commented Jul 7, 2024

⌛ Trying commit c36aa67 with merge b9ea6da...

@bors
Copy link
Contributor

bors commented Jul 7, 2024

☀️ Try build successful - checks-actions
Build commit: b9ea6da (b9ea6dabf21b78b1f58f3278da591be2a1d8f2bd)

@aDotInTheVoid
Copy link
Member Author

This with more try jobs, to try to catch the thing that only happened on merge (and not try) last time

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 8, 2024
Use same `FxHashMap` in `rustdoc-json-types` and `librustdoc`.

Reopening of rust-lang#110051, because bors has seemingly abandoned us there :'(

try-job: dist-arm-linux

try-job: dist-armhf-linux

try-job: armhf-gnu

try-job: test-various

r? `@ghost`
@bors
Copy link
Contributor

bors commented Jul 8, 2024

⌛ Trying commit c36aa67 with merge 0244829...

@rust-log-analyzer
Copy link
Collaborator

The job dist-arm-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
   Compiling threadpool v1.8.1
[RUSTC-TIMING] tempfile test:false 1.538
[RUSTC-TIMING] askama test:false 0.253
   Compiling rustdoc-json-types v0.1.0 (/checkout/src/rustdoc-json-types)
error[E0464]: multiple candidates for `rmeta` dependency `rustc_hash` found
  |
8 | extern crate rustc_hash;
  | ^^^^^^^^^^^^^^^^^^^^^^^^
  |
  |
  = note: candidate #1: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/arm-unknown-linux-gnueabi/lib/librustc_hash-3437225a76a8ce61.rmeta
  = note: candidate #2: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/arm-unknown-linux-gnueabi/lib/librustc_hash-c3ad6f4e0fca41d4.rmeta
[RUSTC-TIMING] itertools test:false 3.192
   Compiling base64 v0.21.7
[RUSTC-TIMING] rustix test:false 6.224
   Compiling minifier v0.3.0
---
[RUSTC-TIMING] pulldown_cmark test:false 4.819
[RUSTC-TIMING] regex_automata test:false 19.241


Command BootstrapCommand { command: cd "/checkout" && env -u MAKEFLAGS -u MFLAGS AR_arm_unknown_linux_gnueabi="arm-unknown-linux-gnueabi-ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="false" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="false" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER="arm-unknown-linux-gnueabi-gcc" CARGO_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools" CC_arm_unknown_linux_gnueabi="sccache arm-unknown-linux-gnueabi-gcc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="arm-unknown-linux-gnueabi" CFG_RELEASE="1.81.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.81.0" CFG_VERSION="1.81.0-nightly (024482958 2024-07-08)" CFG_VER_DATE="2024-07-08" CFG_VER_HASH="0244829583442fad93ab969fbdb71403e6693523" CFG_VIRTUAL_RUST_SOURCE_BASE_DIR="/rustc/0244829583442fad93ab969fbdb71403e6693523" CFLAGS_arm_unknown_linux_gnueabi="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfloat-abi=soft" CXXFLAGS_arm_unknown_linux_gnueabi="-ffunction-sections -fdata-sections -fPIC -march=armv6 -marm -mfloat-abi=soft" CXX_arm_unknown_linux_gnueabi="sccache arm-unknown-linux-gnueabi-g++" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" LIBC_CHECK_CFG="1" LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/lib" LZMA_API_STATIC="1" RANLIB_arm_unknown_linux_gnueabi="arm-unknown-linux-gnueabi-ar s" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/checkout/obj/build/arm-unknown-linux-gnueabi/native" RUSTC="/checkout/obj/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_CARGO_REGISTRY_SRC_TO_REMAP="/cargo/registry/src/index.crates.io-6f17d22bba15001f=/rust/deps" RUSTC_DEBUGINFO_MAP="/checkout=/rustc/0244829583442fad93ab969fbdb71403e6693523" RUSTC_ERROR_METADATA_DST="/checkout/obj/build/tmp/extended-error-metadata" RUSTC_HOST_FLAGS="-Zunstable-options --check-cfg=cfg(bootstrap)" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Dwarnings" RUSTC_PRINT_STEP_TIMINGS="1" RUSTC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUSTC_SNAPSHOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib" RUSTC_STAGE="1" RUSTC_SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/checkout/obj/build/bootstrap/debug/rustc" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.81.0-nightly\t(024482958\t2024-07-08) --cfg=parallel_compiler -Clinker=arm-unknown-linux-gnueabi-gcc" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) -Zdual-proc-macros -Zmacro-backtrace -Csplit-debuginfo=off --cfg=parallel_compiler -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Zunstable-options -Zon-broken-pipe=kill" RUST_TEST_THREADS="8" SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1" TERM="xterm" __CARGO_DEFAULT_LIB_METADATA="nightlytool-rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "arm-unknown-linux-gnueabi" "--release" "-Zdual-proc-macros" "-Zbinary-dep-depinfo" "-j" "8" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rustdoc/Cargo.toml", failure_behavior: Exit, stdout: Print, stderr: Print, run_always: false } did not execute successfully.

Build completed unsuccessfully in 0:21:01
  local time: Mon Jul  8 02:42:40 UTC 2024
  network time: Mon, 08 Jul 2024 02:42:40 GMT

@bors
Copy link
Contributor

bors commented Jul 8, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 8, 2024
@bors
Copy link
Contributor

bors commented Jul 29, 2024

☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts.

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
rustdoc-json: Use FxHashMap from rustdoc_json_types

Alternative to rust-lang#110051 and rust-lang#127456.

This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead.

For the rustdoc-type republish on crates.io, I'll filter out the `pub use`, and not change the API at all. That code [already replaces the hashmap](https://github.com/aDotInTheVoid/rustdoc-types/blob/8d6528669ec64c2af43d1c79a228b7711cefdad7/update.sh#L11) to use the one in `std::collections` (instead of `FxHashMap`)

try-job: dist-arm-linux

r? `@GuillaumeGomez`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 15, 2024
…llaumeGomez

rustdoc-json: Use FxHashMap from rustdoc_json_types

Alternative to rust-lang#110051 and rust-lang#127456.

This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead.

For the rustdoc-type republish on crates.io, It will filter out the `pub use`, and not change source at all. aDotInTheVoid/rustdoc-types#30. That code [already replaces the hashmap](https://github.com/aDotInTheVoid/rustdoc-types/blob/8d6528669ec64c2af43d1c79a228b7711cefdad7/update.sh#L11) to use the one in `std::collections` (instead of `FxHashMap`)

try-job: dist-arm-linux

r? `@GuillaumeGomez`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 15, 2024
…llaumeGomez

rustdoc-json: Use FxHashMap from rustdoc_json_types

Alternative to rust-lang#110051 and rust-lang#127456.

This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead.

For the rustdoc-type republish on crates.io, It will filter out the `pub use`, and not change source at all. aDotInTheVoid/rustdoc-types#30. That code [already replaces the hashmap](https://github.com/aDotInTheVoid/rustdoc-types/blob/8d6528669ec64c2af43d1c79a228b7711cefdad7/update.sh#L11) to use the one in `std::collections` (instead of `FxHashMap`)

try-job: dist-arm-linux

r? ``@GuillaumeGomez``
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
Rollup merge of rust-lang#129124 - aDotInTheVoid:rdj-hashmap-3, r=GuillaumeGomez

rustdoc-json: Use FxHashMap from rustdoc_json_types

Alternative to rust-lang#110051 and rust-lang#127456.

This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead.

For the rustdoc-type republish on crates.io, It will filter out the `pub use`, and not change source at all. aDotInTheVoid/rustdoc-types#30. That code [already replaces the hashmap](https://github.com/aDotInTheVoid/rustdoc-types/blob/8d6528669ec64c2af43d1c79a228b7711cefdad7/update.sh#L11) to use the one in `std::collections` (instead of `FxHashMap`)

try-job: dist-arm-linux

r? ``@GuillaumeGomez``
@aDotInTheVoid
Copy link
Member Author

Superseeded by #129124, which did it the other way around (reexport the fxhashmap from rustdoc-json-types, and use that in (bits of) librustdoc), thereby avoiding the sysroot issues that plagued this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants