Skip to content

bindeps crashes cargo #16881

@Rustacian

Description

@Rustacian

Problem

adding

redux_helper32 = { path = "../redux_helper32", artifact = "bin", target = "i686-pc-windows-msvc" }

see https://codeberg.org/Rustacian/fdb-mirror/src/branch/master/fdb/Cargo.toml#L33

to a dependency crashes cargo with the following error:

thread 'main' (44636) panicked at src\tools\cargo\src\cargo\core\compiler\build_context\target_info.rs:1086:29:
called Option::unwrap() on a None value
stack backtrace:
0: 0x7ff6c783e6c0 - git_midx_writer_dump
1: 0x7ff6c7855b11 - git_midx_writer_dump
2: 0x7ff6c78468f4 - git_midx_writer_dump
3: 0x7ff6c781e852 - git_midx_writer_dump
4: 0x7ff6c78346a8 - git_midx_writer_dump
5: 0x7ff6c7834963 - git_midx_writer_dump
6: 0x7ff6c781e95a - git_midx_writer_dump
7: 0x7ff6c781c0df - git_midx_writer_dump
8: 0x7ff6c781f19e - git_midx_writer_dump
9: 0x7ff6c7915bdd - git_midx_writer_dump
10: 0x7ff6c7915ba7 - git_midx_writer_dump
11: 0x7ff6c791594e - git_midx_writer_dump
12: 0x7ff6c68ee919 - git_filter_source_repo
13: 0x7ff6c65d828a - git_filter_source_repo
14: 0x7ff6c6ddd367 - git_filter_source_repo
15: 0x7ff6c6ddd3ae - git_filter_source_repo
16: 0x7ff6c6ddd3ae - git_filter_source_repo
17: 0x7ff6c6ddd3ae - git_filter_source_repo
18: 0x7ff6c6ddd3ae - git_filter_source_repo
19: 0x7ff6c6ddd50e - git_filter_source_repo
20: 0x7ff6c6ddd3ae - git_filter_source_repo
21: 0x7ff6c6ab6ee0 - git_filter_source_repo
22: 0x7ff6c6c1080c - git_filter_source_repo
23: 0x7ff6c6b945d7 - git_filter_source_repo
24: 0x7ff6c6b92860 - git_filter_source_repo
25: 0x7ff6c6b998b1 - git_filter_source_repo
26: 0x7ff6c6ba29ab - git_filter_source_repo
27: 0x7ff6c62c56cb - git_libgit2_prerelease
28: 0x7ff6c6271602 -
29: 0x7ff6c626d492 -
30: 0x7ff6c623e896 -
31: 0x7ff6c6259d0c -
32: 0x7ff6c78325e0 - git_midx_writer_dump
33: 0x7ff6c630bd2c - git_filter_source_repo
34: 0x7ff6c786cf9c - git_midx_writer_dump
35: 0x7ffb3aaae8d7 - BaseThreadInitThunk
36: 0x7ffb3b76c48c - RtlUserThreadStart

Steps

  1. checkout https://github.com/Rustacian/testnew/ (Hello world with config for nightly and bindeps, and one additional dependency)

  2. change the dependency

    fdb = { git = "https://codeberg.org/Rustacian/fdb-mirror.git", branch = "master" }

    to

    fdb = { git = "https://codeberg.org/Rustacian/fdb-mirror.git", branch = "main" }

  3. observe successful compilation via cargo check (the dependency doesn't use a binary dependency)

  4. change back to

    fdb = { git = "https://codeberg.org/Rustacian/fdb-mirror.git", branch = "master" }

    (the branch "master" adds the binary dependency and build.rs)

  5. observe crash via cargo check

Possible Solution(s)

No response

Notes

The dependency itself compiles just fine in either version when not compiled as a dependency.

Version

cargo 1.97.0-nightly (eb94155a9 2026-04-09)
release: 1.97.0-nightly
commit-hash: eb94155a9a60943bd7b1cb04abec42f5d0de6ddc
commit-date: 2026-04-09
host: x86_64-pc-windows-msvc
libgit2: 1.9.2 (sys:0.20.4 vendored)
libcurl: 8.19.0-DEV (sys:0.4.87+curl-8.19.0 vendored ssl:Schannel)
os: Windows 10.0.26200 (Windows 11 Professional) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Z-bindepsNightly: binary artifact dependencies

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions