Remove feed_local_def_id by oli-obk · Pull Request #121089 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation37 Commits9 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

@oli-obk

best reviewed commit by commit

Basically I returned TyCtxtFeed from create_def and then preserved that in the local caches

based on #121084

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.

labels

Feb 14, 2024

@oli-obk

This comment was marked as resolved.

@bors

This comment was marked as resolved.

@cjgillot

@bors

📌 Commit a640db5 has been approved by cjgillot

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

Feb 18, 2024

@petrochenkov

I don't understand what we get from this, to be honest.
What are the additional guarantees from keeping Feeds in node_id_to_def_id tables?

@oli-obk

What are the additional guarantees from keeping Feeds in node_id_to_def_id tables?

that you don't feed from another query but the one that created the DefId. Feed cannot be transferred across query boundaries.

feed_local_def_id is a massive footgun and if anone uses it from anywhere but the resolver it will cause undebuggable incremental ICEs. The reason the resolver is fine is that it is (like the analysis query, an outermost (not called from another query) eval_always query.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 19, 2024

@bors

Remove feed_local_def_id

best reviewed commit by commit

Basically I returned TyCtxtFeed from create_def and then preserved that in the local caches

based on rust-lang#121084

r? @petrochenkov

@bors

@petrochenkov

What are the additional guarantees from keeping Feeds in node_id_to_def_id tables?

that you don't feed from another query but the one that created the DefId. Feed cannot be transferred across query boundaries.

feed_local_def_id is a massive footgun and if anone uses it from anywhere but the resolver it will cause undebuggable incremental ICEs. The reason the resolver is fine is that it is (like the analysis query, an outermost (not called from another query) eval_always query.

I probably makes sense to put this explanation as a comment on struct Feed.

petrochenkov

@petrochenkov

Feed cannot be transferred across query boundaries.

I'm not sure if it's a hard guarantee, or something that we need to keep in mind when writing new code.

For example, what happens if we put Feed into ResolverOutputs?
Then it will be usable from other queries through tcx.resolutions(()).

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@bors bors added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Feb 19, 2024

@oli-obk

I'm not sure if it's a hard guarantee

I'll add a negative impl for the relevant traits

@oli-obk

@rust-timer

This comment has been minimized.

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 19, 2024

@bors

Remove feed_local_def_id

best reviewed commit by commit

Basically I returned TyCtxtFeed from create_def and then preserved that in the local caches

based on rust-lang#121084

r? @petrochenkov

@oli-obk

@oli-obk

@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

Mar 5, 2024

@rust-log-analyzer

This comment has been minimized.

@petrochenkov

r=me after updating the failing test.
@rustbot author

@rustbot rustbot 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

Mar 5, 2024

@oli-obk

@oli-obk

@bors

📌 Commit ef00fae 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-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Mar 5, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Mar 6, 2024

@matthiaskrgr

…enkov

Remove feed_local_def_id

best reviewed commit by commit

Basically I returned TyCtxtFeed from create_def and then preserved that in the local caches

based on rust-lang#121084

r? @petrochenkov

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Mar 6, 2024

@matthiaskrgr

…enkov

Remove feed_local_def_id

best reviewed commit by commit

Basically I returned TyCtxtFeed from create_def and then preserved that in the local caches

based on rust-lang#121084

r? @petrochenkov

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 6, 2024

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Mar 7, 2024

@workingjubilee

…enkov

Remove feed_local_def_id

best reviewed commit by commit

Basically I returned TyCtxtFeed from create_def and then preserved that in the local caches

based on rust-lang#121084

r? @petrochenkov

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 7, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 7, 2024

@bors

…llaumeGomez

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Mar 8, 2024

@rust-timer

Rollup merge of rust-lang#121089 - oli-obk:create_def_feed, r=petrochenkov

Remove feed_local_def_id

best reviewed commit by commit

Basically I returned TyCtxtFeed from create_def and then preserved that in the local caches

based on rust-lang#121084

r? @petrochenkov

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.