Skip to content

Stack overflow on virtual project with patched dependencies which point at each other #7163

Closed
@handicraftsman

Description

@handicraftsman

Literally this

handicraftsman@NickolayPC:~/Projects/airkit$ cargo build --verbose

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted

Steps

  1. Create a root project Cargo.toml with [workspace] section and [patch.crates-io] section
[workspace]
members = [
    "auragfx",
    "auragfx-backend-glutin"
]

[patch.crates-io]
auragfx = { path = "./auragfx" }
auragfx-backend-glutin = { path = "./auragfx-backend-glutin" }
  1. Create other two manifests
[package]
name = "auragfx"
version = "0.1.0"
authors = ["handicraftsman <nickolay02@inbox.ru>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["backend-glutin"]

backend-glutin = ["auragfx-backend-glutin"]

[dependencies]
spirv_cross = "0.15.0"
shaderc = "0.6.0"

auragfx-backend-glutin = { version = "0.1.0", optional = true }
[package]
name = "auragfx-backend-glutin"
version = "0.1.0"
authors = ["handicraftsman <nickolay02@inbox.ru>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
auragfx = "0.1.0"
glutin = "0.21.0"
gl = "0.13.0"
  1. ???

Notes

Output of cargo version:

cargo 1.38.0-nightly (e3563dbdc 2019-07-16)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions