Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Change Log

## 0.9.23

- Fixed a case where the DLS would repeatedly cancel its own in-flight analysis when no import paths could be resolved

## 0.9.22
- Fixed an issue in server logging where the large allocations could be made by debug prints even at lower debug levels
Expand Down
9 changes: 9 additions & 0 deletions src/actions/analysis_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ pub struct IsolatedAnalysisJob {
token: JobToken,
}

const ISOLATED_ANALYSIS_MARKER: u32 = 0;

impl IsolatedAnalysisJob {
fn new(token: JobToken,
analysis: &mut AnalysisStorage,
Expand All @@ -436,6 +438,7 @@ impl IsolatedAnalysisJob {
// We make a hash from the device path
let mut hasher = DefaultHasher::new();
Hash::hash(&path, &mut hasher);
Hash::hash(&ISOLATED_ANALYSIS_MARKER, &mut hasher);
let hash = hasher.finish();
// TODO: error handling
let content = vfs.snapshot_file(&path)?;
Expand Down Expand Up @@ -498,6 +501,8 @@ pub struct DeviceAnalysisJob {
device_analysis_options: DeviceAnalysisJobOptions,
}

const DEVICE_ANALYSIS_MARKER: u32 = 1;

impl DeviceAnalysisJob {
fn new(token: JobToken,
analysis: &mut AnalysisStorage,
Expand All @@ -518,6 +523,7 @@ impl DeviceAnalysisJob {
for path in &sorted_paths {
Hash::hash(path, &mut hasher);
}
Hash::hash(&DEVICE_ANALYSIS_MARKER, &mut hasher);
let hash = hasher.finish();

trace!("Bases are {:?}", bases.iter().collect::<Vec<&CanonPath>>());
Expand Down Expand Up @@ -603,6 +609,8 @@ pub struct LinterJob {
token: JobToken,
}

const LINT_ANALYSIS_MARKER: u32 = 2;

impl LinterJob {
fn new(token: JobToken,
analysis: &mut AnalysisStorage,
Expand All @@ -615,6 +623,7 @@ impl LinterJob {
let timestamp = SystemTime::now();
let mut hasher = DefaultHasher::new();
Hash::hash(&file, &mut hasher);
Hash::hash(&LINT_ANALYSIS_MARKER, &mut hasher);
let hash = hasher.finish();
if let Ok(isolated_analysis) = analysis.get_isolated_analysis(&file) {
Ok(LinterJob {
Expand Down
Loading