Closed
Description
Describe the bug
In order to pass a file path to the C preprocessor, I define it using a -D
style macro in compiler_flags
, containing an invocation of $(rootpath ...)
. This works fine when building the standard target, but the expansion doesn’t seem to take place with repl_ghci_args
, even though the docs say that Make-style substitution occurs on repl_ghci_args
, and I’m specifying it here.
To Reproduce
- Check out
[email protected]:github/semantic.git
and thebazel-experiments
branch. - Run
bazel build //semantic-python:lib
and observe everything working. - Run
bazel run //semantic-python:lib@repl
and observe that the preprocessor macroNODE_TYPES_PATH
has not expanded itsrootpath
.
Expected behavior
The given macro should not be ../../../../$(rootpath @tree-sitter-python//:src/node-types.json)
I looked through haskell_impl.bzl
in this repo and observed that expand_make_variables
exists; is it a matter of calling that? Is it possible for me to do that manually from my build script?
Environment
- OS name + version: macOS Catalina
- Bazel version: 3.1.0
- Version of the rules: 0.12