Function rustc_incremental::persist::fs::prepare_session_directory[][src]

pub fn prepare_session_directory(
    sess: &Session,
    crate_name: &str,
    stable_crate_id: StableCrateId
) -> Result<(), ErrorReported>
Expand description

Allocates the private session directory. The boolean in the Ok() result indicates whether we should try loading a dep graph from the successfully initialized directory, or not. The post-condition of this fn is that we have a valid incremental compilation session directory, if the result is Ok. A valid session directory is one that contains a locked lock file. It may or may not contain a dep-graph and work products from a previous session. If the call fails, the fn may leave behind an invalid session directory. The garbage collection will take care of it.