Rust bindings build script accesses CARGO_MANIFEST_DIR
at compile time instead of run time
#3353
Labels
CARGO_MANIFEST_DIR
at compile time instead of run time
#3353
Problem
CARGO_MANIFEST_DIR
is accessed in build.rs via theenv!
macro rather thanenv::var
, which makes it access that variable at compile time instead of run time as it should.This is for example causing problems when pulling in
tree-sitter
viarules_rust
in bazel, where compilation and running happen in completely separate environments.Steps to reproduce
bazel
bazel build :foo
Reported error:
followed by a stack trace.
Expected behavior
Build works, which happens if patching
tree-sitter
with #3352 🙂Tree-sitter version (tree-sitter --version)
tree-sitter 0.22.6
Operating system/version
Linux
The text was updated successfully, but these errors were encountered: