use serde::de::{self, Deserialize};
use serde_json;
-use core::{Package, TargetKind};
+use core::{Epoch, Package, TargetKind};
use util;
use util::{Fresh, Dirty, Freshness, internal, profile};
use util::errors::{CargoResult, CargoResultExt};
#[serde(skip_serializing, skip_deserializing)]
memoized_hash: Mutex<Option<u64>>,
rustflags: Vec<String>,
+ epoch: Epoch,
}
fn serialize_deps<S>(deps: &[(String, Arc<Fingerprint>)], ser: S)
features: String::new(),
deps: Vec::new(),
memoized_hash: Mutex::new(Some(hash)),
+ epoch: Epoch::Epoch2015,
rustflags: Vec::new(),
}))
}).collect())
if self.local.len() != old.local.len() {
bail!("local lens changed");
}
+ if self.epoch != old.epoch {
+ bail!("epoch changed")
+ }
for (new, old) in self.local.iter().zip(&old.local) {
match (new, old) {
(&LocalFingerprint::Precalculated(ref a),
ref deps,
ref local,
memoized_hash: _,
+ epoch,
ref rustflags,
} = *self;
- (rustc, features, target, path, profile, local, rustflags).hash(h);
+ (rustc, features, target, path, profile, local, epoch, rustflags).hash(h);
h.write_usize(deps.len());
for &(ref name, ref fingerprint) in deps {
deps: deps,
local: vec![local],
memoized_hash: Mutex::new(None),
+ epoch: unit.pkg.manifest().epoch(),
rustflags: extra_flags,
});
cx.fingerprints.insert(*unit, Arc::clone(&fingerprint));
deps: Vec::new(),
local: local,
memoized_hash: Mutex::new(None),
+ epoch: Epoch::Epoch2015,
rustflags: Vec::new(),
};
let compare = compare_old_fingerprint(&loc, &fingerprint);