Skip to content

Commit

Permalink
Auto merge of #8421 - alexcrichton:read-env-dep, r=ehuss
Browse files Browse the repository at this point in the history
Parse `# env-dep` directives in dep-info files

This commit updates Cargo's parsing of rustc's dep-info files to account
for changes made upstream in rust-lang/rust#71858. This means that if
`env!` or `option_env!` is used in crate files Cargo will correctly
rebuild the crate if the env var changes.

Closes #8417
  • Loading branch information
bors committed Jun 30, 2020
2 parents f12d72e + 0750a6f commit 77b4058
Show file tree
Hide file tree
Showing 7 changed files with 461 additions and 112 deletions.
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/context/compilation_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ fn compute_metadata(
// cause a new hash due to the rustc version changing, but this allows
// cargo to be extra careful to deal with different versions of cargo that
// use the same rustc version.
1.hash(&mut hasher);
2.hash(&mut hasher);

// Unique metadata per (name, source, version) triple. This'll allow us
// to pull crates from anywhere without worrying about conflicts.
Expand Down
Loading

0 comments on commit 77b4058

Please sign in to comment.