7

Properly re-use def path hash in incremental mode by Aaron1011 · Pull Request #7...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/79721
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Member

Aaron1011 commented 15 days ago

Fixes #79661

In incremental compilation mode, we update a DefPathHash -> DefId
mapping every time we create a DepNode for a foreign DefId.
This mapping is written out to the on-disk incremental cache, and is
read by the next compilation session to allow us to lazily decode
DefIds.

When we decode a DepNode from the current incremental cache, we need
to ensure that any previously-recorded DefPathHash -> DefId mapping
gets recorded in the new mapping that we write out. However, PR #74967
didn't do this in all cases, leading to us being unable to decode a
DefPathHash in certain circumstances.

This PR refactors some of the code around DepNode deserialization to
prevent this kind of mistake from happening again.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK