Skip to content

fix(remappings): use lockfile install paths - #372

Open
mario-eth wants to merge 1 commit into
mainfrom
fix/remappings-lock-paths
Open

fix(remappings): use lockfile install paths#372
mario-eth wants to merge 1 commit into
mainfrom
fix/remappings-lock-paths

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:39

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 updates remapping generation to prefer dependency install directories derived from soldeer.lock, making remappings deterministic when multiple installed versions satisfy a version requirement.

Changes:

  • Use soldeer.lock entries to compute a dependency’s install path when available.
  • Add a unit test to verify that the locked version is preferred over other matching installed versions.

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

Comment on lines +365 to +372
let locked_path = read_lockfile(&paths.lock).ok().and_then(|lockfile| {
lockfile.entries.into_iter().find(|entry| entry.name() == dependency.name())
});
let path = locked_path
.map(|entry| entry.install_path(&paths.dependencies))
.or_else(|| dependency.install_path_sync(&paths.dependencies))
.ok_or(RemappingsError::DependencyNotFound(dependency.to_string()))?;
let path = dunce::canonicalize(path)?;
.install_path_sync(&paths.dependencies)
.ok_or(RemappingsError::DependencyNotFound(dependency.to_string()))?,
)?;
let locked_path = read_lockfile(&paths.lock).ok().and_then(|lockfile| {
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.

2 participants