mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
fix(javascript): retain static facts under projection pressure (#7986)
* fix(javascript): retain static facts under projection pressure * fix(javascript): scope IPC ambiguity to omitted projections * fix(javascript): preserve IPC uncertainty for omitted sources * fix(javascript): qualify IPC pairing by wrapper coverage * fix(javascript): retain provisional IPC wrapper matches
This commit is contained in:
1 parent
f60e42a9ae
commit
54f5cf7e14
13 files changed
+1174
-40
No files matched your search
@@ -82,6 +82,7 @@ export const analyzeAndAdoptJavaScriptArtifactFiles = async (
|
||||
readonly interruption: AnalysisError | null;
|
||||
}> => {
|
||||
const state = emptyArtifactAnalysis();
|
||||
const sourceIndices: number[] = [];
|
||||
let interruption: AnalysisError | null = null;
|
||||
const selectedFileCount =
|
||||
fileSet.files.length - (fileSet.source_selection?.unselected_files ?? 0);
|
||||
@@ -119,6 +120,22 @@ export const analyzeAndAdoptJavaScriptArtifactFiles = async (
|
||||
onPhase === undefined ? undefined : (phase) => onPhase(file, phase),
|
||||
);
|
||||
const facts = result.ok ? result.value : result.error;
|
||||
for (const revoked of facts.revokedStaticProjections ?? []) {
|
||||
const index = sourceIndices[revoked.sourceIndex];
|
||||
const previous = index === undefined ? undefined : state.files[index];
|
||||
if (previous === undefined)
|
||||
throw new TypeError(
|
||||
"Revoked application projection has no retained source",
|
||||
);
|
||||
state.files[index!] = {
|
||||
...previous,
|
||||
application_projection_failure: {
|
||||
reason: revoked.error.message,
|
||||
error: projectAnalysisError(revoked.error),
|
||||
limits: revoked.error.reportedLimits,
|
||||
},
|
||||
};
|
||||
}
|
||||
const applicationProjectionFailure = facts.applicationProjectionFailure;
|
||||
if (facts.projection !== null)
|
||||
projection.adoptFileProjection(facts.projection);
|
||||
@@ -139,6 +156,7 @@ export const analyzeAndAdoptJavaScriptArtifactFiles = async (
|
||||
error: projectAnalysisError(error),
|
||||
limits,
|
||||
};
|
||||
sourceIndices.push(state.files.length);
|
||||
state.files.push({
|
||||
file,
|
||||
javascript: facts.javascript,
|
||||
|
||||
Reference in new issue
Block a user