Skip to content

fix(config): preserve broad dependency aliases#15872

Open
mablr wants to merge 1 commit into
masterfrom
mablr/oss-581-preserve-broad-dependency-aliases
Open

fix(config): preserve broad dependency aliases#15872
mablr wants to merge 1 commit into
masterfrom
mablr/oss-581-preserve-broad-dependency-aliases

Conversation

@mablr

@mablr mablr commented Jul 23, 2026

Copy link
Copy Markdown
Member

Motivation

Close OSS-581

This preserves broader auto-detected dependency remappings when the root project defines a narrower alias in the same namespace. The narrower root mapping remains authoritative through longest-prefix resolution, while the broader dependency mapping provides a fallback for imports outside that subtree. Root mappings still suppress equal or more specific dependency aliases, preserving the existing protection against dependencies overriding project code. Carefully assessed it will not reopen #9146.

For example, pkg/sub/=src/local/ can now coexist with pkg/=lib/pkg/src/: imports under pkg/sub/ resolve locally, while other pkg/ imports resolve from the dependency.

Keep broader auto-detected dependency remappings when a narrower project
remapping already covers part of the namespace. Root mappings remain
authoritative over equal or more specific dependency aliases.
@mablr
mablr marked this pull request as draft July 23, 2026 19:03
@mablr
mablr marked this pull request as ready for review July 24, 2026 07:51

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@mablr
mablr enabled auto-merge (squash) July 24, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants