Skip to content

pbjson-types/build.rs doesn't respect change of CARGO_MANIFEST_DIR #97

@golovasteek

Description

@golovasteek

Currently the CARGO_MANIFEST_DIR in build.rs is retrieved at compile time.
According to documentation https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts it is set at execution time as well.

Currently the value, that is set at run-time is ignored.

This breaks caching of the build script, in build systems like bazel, where compilation is executed in sandboxes, and the path is different every time.

Are there any downsides of reading the value at runtime using std::env::var ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions