Remove dead code from install.sh and install.ps1 - #588
Merged
dustinvannoy-db merged 1 commit intoJul 27, 2026
Merged
Conversation
Pure cleanup — no behavior change. Each item below was verified to have zero reachable call sites or reads: - install.sh: drop `deprecation_notice()`. The "skills are moving" announcement has shipped and is being retired; the function had no call sites. - install.ps1: drop `Show-DeprecationNotice` for the same reason. - install.ps1: drop the `$VenvDir` / `$VenvPython` block. The venv now lives in databricks-mcp-server/mcp_install.ps1, and Invoke-Uninstall edits JSON via ConvertFrom-Json/ConvertTo-Json rather than shelling out to a Python interpreter, so neither variable is read anywhere. (The bash `VENV_PYTHON` is still live and is left alone.) - install.ps1: drop the vestigial `$line = " "` assignment inside the `$drawCheckbox` scriptblock — assigned, never read. - install.ps1: drop the unreachable `$i++` after `Write-Err` in the arg-parse `default` arm; `Write-Err` ends in `exit 1`. The MCP deprecation shims, the no-op `--skills-only` arm, the AgentBExcluded knob, and the uninstall MCP-cleanup helpers are all reachable and left untouched. Co-authored-by: omnigent <noreply@omnigent.ai>
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.
Pure cleanup of confirmed dead/unreachable/vestigial code in the two top-level installer scripts. No behavior change — every deletion was verified to have zero reachable call sites or reads.
Deleted
install.shdeprecation_notice()install.ps1Show-DeprecationNoticeinstall.ps1$VenvDir/$VenvPythonblockdatabricks-mcp-server/mcp_install.ps1, andInvoke-Uninstalledits JSON viaConvertFrom-Json/ConvertTo-Jsonrather than shelling out to a Python interpreter.install.ps1$line = " "in$drawCheckboxinstall.ps1$i++afterWrite-Errin the arg-parsedefaultarmWrite-Errends inexit 1.The bash
VENV_PYTHONis genuinely live (read at three call sites) and was deliberately left in place — only the PowerShell counterpart was dead.Explicitly left untouched
Show-McpMovedNotice/mcp_moved_noticeand the--mcp/-Mcp,--mcp-path/-McpPath,--mcp-only/-McpOnly, andDEVKIT_INSTALL_MCParms — reachable, they warn and point atmcp_install.--skills-only/-SkillsOnlyarm despite its empty body — load-bearing, since removing it would make the flag fall through to the error/exit path.$AgentBExcluded/AGENT_B_EXCLUDEDempty-array knob and its no-op loops — a documented deliberate knob.Test-McpJsonHasDatabricks,Remove-McpJsonKey,Remove-McpTomlBlock) and theirmcpTargets/planMcpplumbing.$script:InstallSkillsalways-true const — cosmetic, out of scope.Gates
bash -n install.sh— passes.shellcheck install.sh— 49 findings before, 49 after, and the normalized finding set is byte-identical (diffclean). No new warnings.install.ps1parse check — not run: no PowerShell binary is installed on the machine used for this change (pwsh,powershell, and the usual/usr/local/microsoft/powershellinstall paths are all absent). The PowerShell edits are localized deletions of whole function definitions, a variable-assignment block, and two single statements, but the parse gate is genuinely unverified and should be confirmed on a host withpwsh.deprecation_notice,Show-DeprecationNotice,VenvPython,VenvDir, and$line = " "all have zero occurrences; all KEEP-list symbols are still present at their expected sites.Co-authored-by: omnigent noreply@omnigent.ai
This pull request and its description were written by Isaac.