rust/compiler
bors a183141e2d Auto merge of #87990 - Aaron1011:moved-src-dir, r=cjgillot
Include (potentially remapped) working dir in crate hash

Fixes #85019

A `SourceFile` created during compilation may have a relative
path (e.g. if rustc itself is invoked with a relative path).
When we write out crate metadata, we convert all relative paths
to absolute paths using the current working directory.

However, the working directory is not included in the crate hash.
This means that the crate metadata can change while the crate
hash remains the same. Among other problems, this can cause a
fingerprint mismatch ICE, since incremental compilation uses
the crate metadata hash to determine if a foreign query is green.

This commit moves the field holding the working directory from
`Session` to `Options`, including it as part of the crate hash.

cc `@ohsayan`
2021-08-17 01:32:15 +00:00
..
rustc rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_apfloat rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_arena rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_ast Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_ast_lowering Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_ast_passes Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_ast_pretty Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_attr rustc: Fill out remaining parts of C-unwind ABI 2021-08-03 07:06:19 -07:00
rustc_builtin_macros Auto merge of #87581 - Amanieu:asm_clobber_abi, r=nagisa 2021-08-14 22:29:27 +00:00
rustc_codegen_cranelift Update rustc_codegen_cratelift for working_dir change 2021-08-15 15:17:37 -05:00
rustc_codegen_llvm Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_codegen_ssa Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_data_structures Remove duplicate trait bounds in rustc_data_structures::graph 2021-08-09 08:52:04 -05:00
rustc_driver Reduce verbosity of RUSTC_LOG 2021-08-09 21:39:39 -04:00
rustc_error_codes Rollup merge of #87700 - kornelski:e530text, r=oli-obk 2021-08-11 04:18:36 +09:00
rustc_errors Modify structured suggestion output 2021-08-11 09:46:24 +00:00
rustc_expand Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_feature feature gate doc(primitive) 2021-08-16 05:41:16 +00:00
rustc_fs_util rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_graphviz rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_hir Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_hir_pretty Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_incremental rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_index rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_infer Rollup merge of #88030 - fee1-dead:fixme, r=oli-obk 2021-08-16 23:37:30 +02:00
rustc_interface Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_lexer Renamed variable str -> tail for clarity 2021-08-11 13:57:28 +02:00
rustc_lint Rollup merge of #87967 - m-ou-se:non-fmt-panic-detect-fake-spans, r=cjgillot 2021-08-16 23:37:28 +02:00
rustc_lint_defs Auto merge of #87324 - asquared31415:named-asm-labels, r=Amanieu 2021-08-14 17:33:38 +00:00
rustc_llvm Auto merge of #87798 - durin42:llvm-14, r=nikic 2021-08-08 04:33:22 +00:00
rustc_macros Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_metadata Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_middle Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_mir Skip assert ICE with default_method_body_is_const 2021-08-16 12:04:01 +00:00
rustc_mir_build Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_parse Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_parse_format rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_passes Auto merge of #87050 - jyn514:no-doc-primitive, r=manishearth 2021-08-16 15:36:44 +00:00
rustc_plugin_impl Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_privacy move Constness into TraitPredicate 2021-08-13 09:26:33 +00:00
rustc_query_impl Auto merge of #87515 - crlf0710:trait_upcasting_part2, r=bjorn3 2021-08-03 16:58:56 +00:00
rustc_query_system Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_resolve Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_save_analysis Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_serialize rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_session Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_span Auto merge of #87050 - jyn514:no-doc-primitive, r=manishearth 2021-08-16 15:36:44 +00:00
rustc_symbol_mangling Auto merge of #85296 - bjorn3:plugin_cleanup, r=petrochenkov 2021-08-12 04:30:41 +00:00
rustc_target Auto merge of #87581 - Amanieu:asm_clobber_abi, r=nagisa 2021-08-14 22:29:27 +00:00
rustc_trait_selection Assign FIXMEs to me and remove obsolete ones 2021-08-14 16:48:01 +00:00
rustc_traits Assign FIXMEs to me and remove obsolete ones 2021-08-14 16:48:01 +00:00
rustc_ty_utils rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_type_ir rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_typeck Use multi span suggestions for closure migrations. 2021-08-16 11:38:28 +02:00