Skip to content

Resolve fully qualified name paths relative to the repository root - #1483

Open
sorinc03 wants to merge 1 commit into
Instagram:mainfrom
sorinc03:fix/full-repo-relative-paths
Open

sorinc03 wants to merge 1 commit into
Instagram:mainfrom
sorinc03:fix/full-repo-relative-paths

Conversation

@sorinc03

@sorinc03 sorinc03 commented Nov 2, 2026

Copy link
Copy Markdown

FullRepoManager reads relative filenames against its repository root, but FullyQualifiedNameProvider passed those filenames directly to a helper expecting root-prefixed paths. With an absolute root this raises ValueError; pyproject-based module discovery can instead resolve against the wrong working directory.

Resolve filenames against the supplied root at the provider boundary, while preserving the caller's original cache keys. Absolute filenames and the helper's outside-root checks retain their behavior. Clarify the manager's path documentation.

Fixes #1367.

Test plan

  • Added real-file integration tests for relative/absolute roots and filenames, relative-import qualification, original cache keys, nested pyproject discovery, and outside-root rejection.
  • Before the fix: three errors and one assertion failure in the targeted reproduction.
  • 85 focused tests pass.
  • Full Python 3.11 suite: 2,165 tests, 14 skips, two expected failures, no unexpected failures; 95.8% coverage.
  • Repository format, lint, Pyre, and diff checks pass.

Meta CLA is already on file. Other Python/platform configurations remain for CI.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent Path Processing

1 participant