Skip to content

chore: remove legacy pcb-sch position-write helpers - #1252

Open
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-legacy-pcb-sch-position-write-helpers-52596d
Open

detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-legacy-pcb-sch-position-write-helpers-52596d

Conversation

@detail-app

@detail-app detail-app Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Remove the legacy direct-to-disk position-writing utilities replace_pcb_sch_comments, remove_positions, and the private write_position_block helper from pcb-sch/src/position.rs, along with their three now-orphaned tests. Also drop the tempfile dev-dependency from pcb-sch (only used by the removed tests) and the now-unused std::fs::OpenOptions, std::io::{Seek, Write}, and std::path::Path imports.

These functions had no production callers: their last consumers (the deprecated direct-to-disk fallback in the pcb/savePositions handler and the pcb/removePosition request handler in pcb-zen/src/lsp/mod.rs) were intentionally removed in commit cc41a2e ("Remove legacy LSP position APIs"). Production now uses the atomic edit_position_comments + LSP TextEdit path exclusively, which never writes to disk directly.

History


Dead Code PRs can be configured here.


Note

Low Risk
Dead-code cleanup with no remaining callers; production position updates still go through edit_position_comments and LSP edits.

Overview
Removes unused direct-to-disk schematic position utilities from pcb-sch: replace_pcb_sch_comments, remove_positions, and the private write_position_block, plus related I/O imports.

Also deletes three tests that exercised file writes via tempfile, drops the tempfile dev-dependency from pcb-sch, and updates Cargo.lock. In-memory position editing via edit_position_comments (and LSP TextEdit flows) is unchanged.

Reviewed by Cursor Bugbot for commit ef1e493. Bugbot is set up for automated code reviews on this repo. Configure here.

@detail-app
detail-app Bot requested a review from akhilles September 8, 2026 05:53

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Build Performance

Board Base (median) Head (median) Change
demo/b/Demeter 63ms ±12 63ms ±8 -1.2%
demo/b/DM0001/Governor 83ms ±6 81ms ±8 -2.3%
demo/b/DM0002/Marlow 66ms ±8 65ms ±5 -1.7%
demo/b/DM0003/Bramble 81ms ±5 80ms ±6 -1.0%
demo/b/Feign 58ms ±12 57ms ±8 -1.0%
demo/b/Renfield 60ms ±2 60ms ±9 -0.4%
demo/b/Seward 63ms ±5 63ms ±5 -1.1%
arduino/b/Nano 59ms ±7 60ms ±8 +1.2%
arduino/b/unoQ 188ms ±10 140ms ±7 1.32× ±0.10 faster

Measured with hyperfine. Times show median ±stddev.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: Cursor Bugbot and Cursor Security Agent completed successfully with no findings requiring human review, and this is a small dead-code cleanup (deletions only, no user-facing behavior change). No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant