chore: gitignore rust bridge build artifacts - #31349
Conversation
Ignore the compiled, platform-specific Rust extension output (litellm/rust_bridge/_native*.so/.pyd) and the litellm-rust/target/ build dir so local maturin/cargo builds don't show up as untracked files. Also drop the two stale self-referential .gitignore entries; .gitignore is tracked, so ignoring it did nothing except add confusion. Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
|
|
Greptile SummaryThis PR updates
Confidence Score: 5/5Safe to merge — the change only adds three new ignore patterns and removes two no-op self-references; no tracked files are affected and no source code is modified. The change is confined to .gitignore. The new patterns are specific, well-scoped to the Rust build output paths, and the author verified with git ls-files | git check-ignore --stdin -v that no currently-tracked files are newly ignored. The self-referential .gitignore removals are purely cosmetic. No files require special attention.
|
| Filename | Overview |
|---|---|
| .gitignore | Adds ignore rules for Rust bridge build artifacts (_native*.so, _native*.pyd, litellm-rust/target/) and removes two duplicate self-referential .gitignore entries that had no effect |
Reviews (1): Last reviewed commit: "chore: gitignore rust bridge build artif..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Relevant issues
None; spotted while reviewing
git statuson a local checkoutPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
make test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewScreenshots / Proof of Fix
Before, the locally built Rust extension shows up as untracked:
After the change, the same artifact is ignored, and the rule matches as expected:
I also verified that no currently-tracked file becomes newly ignored:
Type
🧹 Refactoring
🚄 Infrastructure
Changes
The optional Rust extension (
litellm-rust/crates, exposed vialitellm/rust_bridge/) compiles to a platform-specific shared library that the loader imports aslitellm.rust_bridge._native, falling back toNonewhen it's absent. Building it locally with maturin/cargo dropslitellm/rust_bridge/_native.cpython-312-darwin.so(or the Linux/Windows equivalent) into the tree, where it showed up as an untracked file because nothing in.gitignorecovered*.so,*.pyd,_native*, or the Rusttarget/dir. These are regenerable build outputs and shouldn't be committed, so this adds rules for themWhile in there I also removed the two stale
.gitignoreself-references..gitignoreis tracked, so listing it inside itself did nothing except add confusion (and won't suppress edits to the file either way)Slack Thread