Skip to content

Fix bugs in new all_public_paths_by_def_id logic.#775

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_890533066
Mar 27, 2026
Merged

Fix bugs in new all_public_paths_by_def_id logic.#775
copybara-service[bot] merged 1 commit intomainfrom
test_890533066

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service bot commented Mar 27, 2026

Fix bugs in new all_public_paths_by_def_id logic.

PublicPaths::merge was using < when it should've been > leading to a preference
for dependencies instead of the source crate when both were available.
I've fixed the bug and added a test for it.

symbol_unqualified_name wasn't using all_public_paths_by_def_id causing symbols to be spelled with a valid path but an invalid name. Updated the logic to use all_public_paths to account for renaming in the unqualified symbol name.

@copybara-service copybara-service bot force-pushed the test_890533066 branch 2 times, most recently from 275142b to a0bb237 Compare March 27, 2026 20:08
@copybara-service copybara-service bot changed the title Fix bug in PublicPaths::merge logic. Fix bugs in new all_public_paths_by_def_id logic. Mar 27, 2026
PublicPaths::merge was using `<` when it should've been `>` leading to a preference
for dependencies instead of the source crate when both were available.
I've fixed the bug and added a test for it.

`symbol_unqualified_name` wasn't using `all_public_paths_by_def_id` causing symbols to be spelled with a valid path but an invalid name. Updated the logic to use `all_public_paths` to account for renaming in the unqualified symbol name.

PiperOrigin-RevId: 890604192
@copybara-service copybara-service bot merged commit 8cff812 into main Mar 27, 2026
@copybara-service copybara-service bot deleted the test_890533066 branch March 27, 2026 20:15
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