Skip to content

fix(install): error on conflicting dependency directory names - #366

Open
mario-eth wants to merge 1 commit into
mainfrom
fix/dependency-dir-conflicts
Open

fix(install): error on conflicting dependency directory names#366
mario-eth wants to merge 1 commit into
mainfrom
fix/dependency-dir-conflicts

Conversation

@mario-eth

Copy link
Copy Markdown
Owner

No description provided.

@mario-eth
mario-eth requested review from beeb and a lite review from Copilot August 18, 2026 03:38

Copilot AI 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.

Pull request overview

This PR adds an early validation step to prevent installing/updating multiple dependencies that would map to the same on-disk directory name after filename sanitization, returning a clear error instead of proceeding into potentially conflicting filesystem operations.

Changes:

  • Add a shared validate_dependency_path_collisions guard and invoke it at the start of install/update flows.
  • Introduce a new InstallError::PathCollision error variant with a descriptive message.
  • Add a regression test covering a sanitized-name collision case (foo/bar vs foo-bar).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/core/src/update.rs Runs the new collision validation before spawning update tasks.
crates/core/src/install.rs Implements collision validation and invokes it in parallel and sequential install entrypoints; adds a regression test.
crates/core/src/errors.rs Adds a new InstallError::PathCollision variant used by the validation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

3 participants