Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only store valid proc marco item for doc link #133105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bvanjoi
Copy link
Contributor

@bvanjoi bvanjoi commented Nov 16, 2024

Fixes #132743

The definition item can be detected if it is exported in the doc, so store these items rather than skipping.

r? @petrochenkov

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 16, 2024
@petrochenkov
Copy link
Contributor

How does this gets to an ICE?
The logic in fn resolve_and_cache_rustdoc_path tries to never resolve external doc links in proc macro crates.

@petrochenkov
Copy link
Contributor

Storing these def ids goes against our (likely?) general direction of making proc macro crates more isolated and less needed after macro expansion (#125721).
cc @bjorn3

@bvanjoi
Copy link
Contributor Author

bvanjoi commented Nov 22, 2024

How does this gets to an ICE?

During the compilation of a proc macro crate, the fn resolve_and_cache_rustdoc_path records the information mod m {} because it is not considered an external crate.

However, when building the docs for current crate, it attempts to use the information mod m {}. This information is not actually stored, leading to a panic.

Storing these def ids goes against our (likely?) general direction of making proc macro crates more isolated and less needed after macro expansion

Following these principles, removing the check def.is_local might be a better solution.

@bvanjoi
Copy link
Contributor Author

bvanjoi commented Nov 22, 2024

UPDATE: now it will only store the valid proc macro item

@bvanjoi bvanjoi changed the title store the defs in proc macro crate only store valid proc marco item for doc link Nov 22, 2024
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 22, 2024
@bvanjoi
Copy link
Contributor Author

bvanjoi commented Nov 23, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 23, 2024
@petrochenkov
Copy link
Contributor

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Nov 23, 2024

📌 Commit 30d68eb has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE building Leptos 0.7.0 release candidate
5 participants