We're not using runfiles anymore, don't use associated macro define.#371
Open
hzeller wants to merge 1 commit into
Open
We're not using runfiles anymore, don't use associated macro define.#371hzeller wants to merge 1 commit into
hzeller wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the preprocessor macro BAZEL_CURRENT_REPOSITORY with BAZEL_BUILD in app/Main.cc and defines BAZEL_BUILD in the BUILD file. The reviewer notes that @rules_cc//cc/runfiles is still listed in the dependencies of the binary and should be removed to complete the cleanup as described in the pull request.
hzeller
force-pushed
the
feature-20260611-runfile
branch
from
June 11, 2026 15:32
7bb4d4e to
c08d761
Compare
Contributor
Author
|
Can this be merged ? |
Contributor
Author
|
Ping. |
Contributor
Author
|
did this fall under the radar ? |
Contributor
Author
|
Regular ping :) |
Contributor
Author
|
Maybe 'pong' helps ? |
Contributor
Author
|
Regular ping... |
Contributor
Author
We used to use runfiles to work with tcl dependencies. Since we don't need that anymore, just add a regular `BAZEL_BUILD` define to choose the behavior in the bazel build and remove the unneeded dependency. Signed-off-by: Henner Zeller <h.zeller@acm.org>
hzeller
force-pushed
the
feature-20260611-runfile
branch
from
July 15, 2026 05:32
c08d761 to
379c5c3
Compare
Contributor
|
taking a look right now! |
dsengupta0628
approved these changes
Jul 16, 2026
dsengupta0628
left a comment
Contributor
There was a problem hiding this comment.
Correctness ✅
- Root reason sound: remove runfiles dependency--> BAZEL_CURRENT_REPOSITORY vanishes --> guarded blocks silently drop out (readline + tcl env setup lost in bazel build). Explicit BAZEL_BUILD define restores intent.
- All 3 #ifdef sites flipped consistently. No stray BAZEL_CURRENT_REPOSITORY left.
- @rules_cc//cc/runfiles referenced only at this one dep line — safe to remove.
- Transitive deps //bazel:tcl_library_init + //:tcl_readline_setup still present, so headers bazel/tcl_library_init.h / src/tcl_readline_setup.h keep their own build inputs. Binary-level
runfiles dep was serving only the macro. Clean.
Style / conventions ✅
- BAZEL_BUILD clearer intent than repurposing a toolchain-internal macro. This is good as BAZEL_CURRENT_REPOSITORY was never meant as a build-mode flag, just happened to exist.
- Matches OpenSTA bazel patterns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We used to use runfiles to work with tcl dependencies. Since we don't need that anymore, just add a regular
BAZEL_BUILDdefine to choose the behavior in the bazel build and remove the unneeded dependency.