fix(make): export EXAMPLE variable for sub-make invocations#633
Open
Alex-ai-future wants to merge 1 commit into
Open
fix(make): export EXAMPLE variable for sub-make invocations#633Alex-ai-future wants to merge 1 commit into
Alex-ai-future wants to merge 1 commit into
Conversation
github-actions
Bot
requested review from
hyeongyun0916,
liu-cong,
sagearc and
yankay
June 4, 2026 07:13
Alex-ai-future
marked this pull request as ready for review
June 4, 2026 07:15
Alex-ai-future
requested review from
dannyharnik,
kfirtoledo and
vMaroon
as code owners
June 4, 2026 07:15
Contributor
Author
|
After testing, this is an actual bug that appears in Mac and Linux at the same time. |
|
This PR is marked as stale after 21d of inactivity. After an additional 14d of inactivity (7d to become rotten, then 7d more), it will be closed. To prevent this PR from being closed, add a comment or remove the |
Collaborator
|
Thanks @Alex-ai-future |
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.
Summary
make run-example kv_cache_indexsilently ranofflineinstead.Root Cause
run-examplecalls sub-makes via$(MAKE), but Make doesn't pass internal variables to sub-makes by default.The sub-make re-evaluates
EXAMPLEfromMAKECMDGOALS. Its command ismake run-example-only(one word), so$(word 2,$(MAKECMDGOALS))is empty and it falls back to the defaultoffline.Fix
Added
export EXAMPLEso the value is inherited by sub-makes as an environment variable.Why CI didn't catch this
CI calls
make run-example-only <name>directly inhack/verify-examples.sh, bypassing therun-examplewrapper entirely.run-example-onlyreceives the full argument list, soMAKECMDGOALSis correct. Only therun-examplewrapper (used by local developers) triggers this bug.Impact
make run-example kv_cache_indexofflinekv_cache_indexmake run-example onlineofflineonlinemake run-example(no arg)offline