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

Fixed inability to deserialize crate_universe lockfiles #1760

Merged
merged 3 commits into from
Jan 6, 2023

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Jan 6, 2023

This change fixes an issue raised in #1759 where, because crate_universe lockfiles are unable to be de-seralized, they fail the repin step in crates_repository.

ERROR: Error computing the main repository mapping: no such package '@crate_index//': Command [/private/var/tmp/_bazel_user/4560c17322c66335f5669efa18a57737/external/crate_index/cargo-bazel, "query", "--lockfile", /Users/user/Code/tmp-infinite-rules-rust-repin/rs/cargo-bazel-lock.json, "--config", /private/var/tmp/_bazel_user/4560c17322c66335f5669efa18a57737/external/crate_index/cargo-bazel.json, "--splicing-manifest", /private/var/tmp/_bazel_user/4560c17322c66335f5669efa18a57737/external/crate_index/splicing_manifest.json, "--cargo", /private/var/tmp/_bazel_user/4560c17322c66335f5669efa18a57737/external/rust_darwin_x86_64__x86_64-apple-darwin__stable_tools/bin/cargo, "--rustc", /private/var/tmp/_bazel_user/4560c17322c66335f5669efa18a57737/external/rust_darwin_x86_64__x86_64-apple-darwin__stable_tools/bin/rustc] failed with exit code 101.
STDOUT ------------------------------------------------------------------------

STDERR ------------------------------------------------------------------------
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid length 1, expected struct Glob with 2 elements", line: 22, column: 13)', src/cli/query.rs:52:60
stack backtrace:
   0:        0x1016b6db2 - std::backtrace_rs::backtrace::libunwind::trace::h74d17ea919046bae
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:        0x1016b6db2 - std::backtrace_rs::backtrace::trace_unsynchronized::h2fc77fd5a14165ac
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x1016b6db2 - std::sys_common::backtrace::_print_fmt::h2687aa7717781133
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:65:5
   3:        0x1016b6db2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdc69a6f447628e71
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:44:22
   4:        0x1016d819a - core::fmt::write::hb9e764fa47ae8444
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/fmt/mod.rs:1209:17
   5:        0x1016b2fcc - std::io::Write::write_fmt::h8fc98987ed860a54
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/io/mod.rs:1682:15
   6:        0x1016b6b7a - std::sys_common::backtrace::_print::h882e8250b822b8b0
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:47:5
   7:        0x1016b6b7a - std::sys_common::backtrace::print::h488fe4c0b1fb9d50
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:34:9
   8:        0x1016b87b6 - std::panicking::default_hook::{{closure}}::h5618ea3156b8b833
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:267:22
   9:        0x1016b8507 - std::panicking::default_hook::h0421c26a8a92801c
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:286:9
  10:        0x1016b8efd - std::panicking::rust_panic_with_hook::h57383cd32463c250
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:688:13
  11:        0x1016b8cb3 - std::panicking::begin_panic_handler::{{closure}}::h1d1f7305cfe67fdd
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:579:13
  12:        0x1016b7248 - std::sys_common::backtrace::__rust_end_short_backtrace::hd8e12e82ff026bae
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:137:18
  13:        0x1016b897d - rust_begin_unwind
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:575:5
  14:        0x1016fcdf3 - core::panicking::panic_fmt::h7894cd1015cfee41
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/panicking.rs:65:14
  15:        0x1016fd0b5 - core::result::unwrap_failed::h3077b600131e58d4
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/result.rs:1791:5
  16:        0x1007732d2 - core::result::Result<T,E>::unwrap::h5cf387c6f58d5f22
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/result.rs:1113:23
  17:        0x10094cf84 - cargo_bazel::cli::query::query::he3421a7652a8c18e
                               at /Users/user/Code/rules_rust/crate_universe/src/cli/query.rs:52:29
  18:        0x1006688e6 - cargo_bazel::main::he9fab85c38633567
                               at /Users/user/Code/rules_rust/crate_universe/src/main.rs:12:37
  19:        0x100668cde - core::ops::function::FnOnce::call_once::h9b7a13435a911f49
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:251:5
  20:        0x100668b61 - std::sys_common::backtrace::__rust_begin_short_backtrace::h51b7c2403c8a5840
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/sys_common/backtrace.rs:121:18
  21:        0x100668b24 - std::rt::lang_start::{{closure}}::h403e1c8900c231e6
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/rt.rs:166:18
  22:        0x1016ad774 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h61195f273fbb2744
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ops/function.rs:286:13
  23:        0x1016ad774 - std::panicking::try::do_call::h742c41daae50fa78
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:483:40
  24:        0x1016ad774 - std::panicking::try::h289fd06090f9252d
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:447:19
  25:        0x1016ad774 - std::panic::catch_unwind::h442e40ac2db064f5
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panic.rs:137:14
  26:        0x1016ad774 - std::rt::lang_start_internal::{{closure}}::haebd6112c3b7ec52
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/rt.rs:148:48
  27:        0x1016ad774 - std::panicking::try::do_call::h5621965127b9aadb
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:483:40
  28:        0x1016ad774 - std::panicking::try::h55c66b03bc020b32
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panicking.rs:447:19
  29:        0x1016ad774 - std::panic::catch_unwind::hf00d6becf2cfdae2
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/panic.rs:137:14
  30:        0x1016ad774 - std::rt::lang_start_internal::h9ca2efac34d80f78
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/rt.rs:148:20
  31:        0x100668af7 - std::rt::lang_start::h0548ed87534b1193
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/std/src/rt.rs:165:17
  32:        0x100668978 - _main

@UebelAndre UebelAndre enabled auto-merge (squash) January 6, 2023 21:01
@UebelAndre UebelAndre merged commit 614499a into bazelbuild:main Jan 6, 2023
@UebelAndre UebelAndre deleted the crate_universe branch January 6, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants