Draft
Conversation
mkolodner-sc
commented
Apr 10, 2026
| from typing import Optional | ||
|
|
||
|
|
||
| def run_command_and_stream_stdout(cmd: str) -> Optional[int]: |
Collaborator
Author
There was a problem hiding this comment.
Removed the custom streaming helper — subprocess.run without a stdout argument already streams output to the terminal in real time (it just inherits the parent's stdout). The old approach using stdout=PIPE was actually worse since piped subprocesses buffer their output more aggressively. We also get free failure detection via check=True, which the old function didn't provide (it returned the exit code but never checked it).
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.
Scope of work done
C++ Infrastructure for GiGL
This PR adds the foundational C++ infrastructure to GiGL — everything needed to write, build, lint, and test C++ code alongside the existing Python codebase.
What's included
Build tooling —
scripts/build_cpp_extensions.pyauto-discovers and builds pybind11 C++ extensions undergigl/csrc/. The C++ build is wired intomake unit_test_pyandmake install_dev_depsso it happens automatically without a separate step.Formatting and linting —
.clang-formatand.clang-tidyconfigs establish the C++ style conventions (naming, formatting, static analysis checks).make format_cppandmake lint_cpprun these, and both are included in the standard CI targets.Dependency installation —
requirements/install_cpp_deps.shhandles installing clang-format, clang-tidy, and cmake on both Mac and Linux, including the PATH setup needed on Mac where Homebrew intentionally doesn't override Apple's built-in clang.Compile commands generation —
scripts/generate_compile_commands.pygeneratesbuild/compile_commands.jsonso clang-tidy can resolve include paths correctly.Shared build constants — Compiler flags and source paths live in
gigl/cpp_build_constants.pyas a single source of truth used by both the build and lint scripts.Documentation —
docs/cpp_style_guide.mddocuments the formatting and linting rules and how to run them.Unit test scaffolding —
tests/unit/cpp/with a CMakeLists and a smoke test to verify the infrastructure works end to end.Where is the documentation for this feature?: N/A
Did you add automated tests or write a test plan?
Updated Changelog.md? NO
Ready for code review?: NO