Skip to content

DEP_* env variable not set in nightly test run #9063

@kamulos

Description

@kamulos

This happens with the nightly version, but not with the stable.

> cargo +nightly version
cargo 1.51.0-nightly (329895f5b 2021-01-06)

Reproduce

Cargo.toml

[package]
name = "asdf"
version = "0.1.0"
authors = ["xyxy"]
edition = "2018"

[dependencies]
libsodium-sys = "0.2"

[build-dependencies]
cc = "1.0"

test.c

void test() {}

build.rs

fn main() {
    cc::Build::new()
        .file("test.c")
        .include(std::env::var_os("DEP_SODIUM_INCLUDE").expect("DEP_SODIUM_INCLUDE is not set"))
        .compile("test.a");
}

Now just run cargo +nighly test. With stable this works perfectly, with nightly the DEP_SODIUM_INCLUDE env variable is not set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions