Skip to content

feat: Add Intelligent Dependency Conflict Analysis#4

Merged
psywarrior1998 merged 5 commits intomainfrom
feature/dependency-analysis
Aug 10, 2025
Merged

feat: Add Intelligent Dependency Conflict Analysis#4
psywarrior1998 merged 5 commits intomainfrom
feature/dependency-analysis

Conversation

@psywarrior1998
Copy link
Copy Markdown
Owner

This pull request introduces a critical safety feature that checks for potential dependency conflicts before performing any package upgrades. This prevents users from accidentally breaking their environment by upgrading a package that is required by another installed tool.

Key Changes:

  • Pre-flight Conflict Check: Before the upgrade confirmation prompt, the tool now runs a pip install --dry-run command with all targeted packages.
  • Warning Display: If pip detects any dependency conflicts during the dry run, the errors are parsed and displayed to the user in a high-visibility warning panel.
  • Informed Confirmation: The user is explicitly asked if they still wish to proceed after being shown any potential conflicts.

Technical Implementation:

  • A new function, check_for_conflicts, has been added to orchestrate the pip --dry-run simulation.
  • The function captures stderr from the pip subprocess to detect and extract the conflict error block.
  • Regular expressions are used to cleanly parse the relevant error messages.
  • The main upgrade function was modified to call this check and conditionally display the warning Panel.

This approach leverages pip's own battle-tested dependency resolver instead of attempting to reinvent it, ensuring accuracy and reliability.

@psywarrior1998 psywarrior1998 merged commit 526b244 into main Aug 10, 2025
5 checks passed
@psywarrior1998 psywarrior1998 deleted the feature/dependency-analysis branch August 31, 2025 12:19
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