@ttsc/unplugin 0.31.1 → 0.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/bridge/projectRecordMoved.js +1 -1
- package/lib/core/bridge/projectRecordMoved.js.map +1 -1
- package/lib/core/bridge/projectRecordMoved.mjs +1 -1
- package/lib/core/bridge/projectRecordMoved.mjs.map +1 -1
- package/lib/core/observer/createInputObserver.js +1 -1
- package/lib/core/observer/createInputObserver.js.map +1 -1
- package/lib/core/observer/createInputObserver.mjs +1 -1
- package/lib/core/observer/createInputObserver.mjs.map +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.js +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.js.map +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.js +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js +2 -2
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs +2 -2
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.cts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.mts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.ts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.js +10 -4
- package/lib/core/transform/inputs/pluginSourceFilesDigest.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs +11 -5
- package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceHolds.d.cts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.d.mts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.d.ts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.js +9 -4
- package/lib/core/transform/inputs/pluginSourceHolds.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceHolds.mjs +9 -4
- package/lib/core/transform/inputs/pluginSourceHolds.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceState.d.cts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.d.mts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.d.ts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.js +8 -3
- package/lib/core/transform/inputs/pluginSourceState.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceState.mjs +8 -3
- package/lib/core/transform/inputs/pluginSourceState.mjs.map +1 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.cts +7 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.mts +7 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.ts +7 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.js +10 -6
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.js.map +1 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs +10 -6
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs.map +1 -1
- package/lib/core/transform/transformTtsc.js +1 -1
- package/lib/core/transform/transformTtsc.js.map +1 -1
- package/lib/core/transform/transformTtsc.mjs +1 -1
- package/lib/core/transform/transformTtsc.mjs.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js +2 -2
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +2 -2
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.js +2 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.js.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs +2 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaseline.d.cts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.d.mts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.d.ts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.js +3 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.js.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaseline.mjs +3 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.mjs.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.d.cts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.d.mts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.d.ts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.js +3 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.js.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.mjs +3 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.mjs.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.cts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.mts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.ts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js +6 -3
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs +6 -3
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/bridge/projectRecordMoved.ts +3 -1
- package/src/core/observer/createInputObserver.ts +2 -0
- package/src/core/transform/generation/captureFailedGenerationInputStates.ts +1 -0
- package/src/core/transform/generation/captureTransformGeneration.ts +6 -1
- package/src/core/transform/generation/failedGenerationEnvironmentChanged.ts +12 -2
- package/src/core/transform/inputs/pluginSourceFilesDigest.ts +11 -4
- package/src/core/transform/inputs/pluginSourceHolds.ts +13 -3
- package/src/core/transform/inputs/pluginSourceState.ts +8 -2
- package/src/core/transform/inputs/preparePluginBuildEnvironments.ts +24 -5
- package/src/core/transform/transformTtsc.ts +2 -0
- package/src/core/transform/validation/captureUniversalHostInputValidation.ts +2 -1
- package/src/core/transform/validation/matchesUniversalHostInputTrees.ts +2 -1
- package/src/core/transform/watch/captureWatchInputBaseline.ts +4 -0
- package/src/core/transform/watch/captureWatchInputBaselines.ts +7 -1
- package/src/core/transform/watch/watchInputEvidenceMatchesDisk.ts +12 -2
|
@@ -28,4 +28,6 @@ export declare function captureWatchInputBaselines(files: Iterable<string>, file
|
|
|
28
28
|
tree?: boolean;
|
|
29
29
|
accessibleEntries?: boolean;
|
|
30
30
|
nativePredicates?: readonly (keyof NonNullable<TtscWatchInputBaseline["nativePredicates"]>)[];
|
|
31
|
+
/** Project whose plugin cache records prove a plugin tree (#1725). */
|
|
32
|
+
projectRoot?: string;
|
|
31
33
|
}): Map<string, TtscWatchInputBaseline | undefined>;
|
|
@@ -28,4 +28,6 @@ export declare function captureWatchInputBaselines(files: Iterable<string>, file
|
|
|
28
28
|
tree?: boolean;
|
|
29
29
|
accessibleEntries?: boolean;
|
|
30
30
|
nativePredicates?: readonly (keyof NonNullable<TtscWatchInputBaseline["nativePredicates"]>)[];
|
|
31
|
+
/** Project whose plugin cache records prove a plugin tree (#1725). */
|
|
32
|
+
projectRoot?: string;
|
|
31
33
|
}): Map<string, TtscWatchInputBaseline | undefined>;
|
|
@@ -111,7 +111,9 @@ function capture(file, filesystem, identities, options) {
|
|
|
111
111
|
identity: pathIdentityKey.pathIdentityKey(file, identities),
|
|
112
112
|
realpath: compilerInputRealpathObservation.compilerInputRealpathObservation(file, filesystem),
|
|
113
113
|
stat,
|
|
114
|
-
...(options.tree === true
|
|
114
|
+
...(options.tree === true
|
|
115
|
+
? { tree: pluginSourceState.pluginSourceState(file, undefined, options.projectRoot) }
|
|
116
|
+
: {}),
|
|
115
117
|
};
|
|
116
118
|
}
|
|
117
119
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureWatchInputBaselines.js","sources":["../../../../src/core/transform/watch/captureWatchInputBaselines.ts"],"sourcesContent":[null],"names":["DEFAULT_FILESYSTEM_OPERATIONS","createHostPathIdentityContext","stableStringify","compilerStatKind","compilerInputTextHash","hashText","MISSING_INPUT_STATE","nativeInputPredicateState","compilerAccessibleEntries","pathIdentityKey","compilerInputRealpathObservation","pluginSourceState"],"mappings":";;;;;;;;;;;;;;;AAiBA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,0BAA0B,CACxC,KAAuB,EACvB,UAAA,GAAgDA,2DAA6B,EAC7E,OAAA,
|
|
1
|
+
{"version":3,"file":"captureWatchInputBaselines.js","sources":["../../../../src/core/transform/watch/captureWatchInputBaselines.ts"],"sourcesContent":[null],"names":["DEFAULT_FILESYSTEM_OPERATIONS","createHostPathIdentityContext","stableStringify","compilerStatKind","compilerInputTextHash","hashText","MISSING_INPUT_STATE","nativeInputPredicateState","compilerAccessibleEntries","pathIdentityKey","compilerInputRealpathObservation","pluginSourceState"],"mappings":";;;;;;;;;;;;;;;AAiBA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,0BAA0B,CACxC,KAAuB,EACvB,UAAA,GAAgDA,2DAA6B,EAC7E,OAAA,GAQI,EAAE,EAAA;IAEN,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,MAAsD;AACpE,QAAA,MAAM,UAAU,GAAGC,2DAA6B,CAAC,UAAU,CAAC;QAC5D,OAAO,IAAI,GAAG,CACZ,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;AACpB,YAAA,IAAI;gBACF,OAAO;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,EAAE,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC;cAC/D,EAAE,CAAC;KACR;AACH;;;;"}
|
|
@@ -109,7 +109,9 @@ function capture(file, filesystem, identities, options) {
|
|
|
109
109
|
identity: pathIdentityKey(file, identities),
|
|
110
110
|
realpath: compilerInputRealpathObservation(file, filesystem),
|
|
111
111
|
stat,
|
|
112
|
-
...(options.tree === true
|
|
112
|
+
...(options.tree === true
|
|
113
|
+
? { tree: pluginSourceState(file, undefined, options.projectRoot) }
|
|
114
|
+
: {}),
|
|
113
115
|
};
|
|
114
116
|
}
|
|
115
117
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureWatchInputBaselines.mjs","sources":["../../../../src/core/transform/watch/captureWatchInputBaselines.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAiBA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,0BAA0B,CACxC,KAAuB,EACvB,UAAA,GAAgD,6BAA6B,EAC7E,OAAA,
|
|
1
|
+
{"version":3,"file":"captureWatchInputBaselines.mjs","sources":["../../../../src/core/transform/watch/captureWatchInputBaselines.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAiBA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,0BAA0B,CACxC,KAAuB,EACvB,UAAA,GAAgD,6BAA6B,EAC7E,OAAA,GAQI,EAAE,EAAA;IAEN,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,MAAsD;AACpE,QAAA,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC;QAC5D,OAAO,IAAI,GAAG,CACZ,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;AACpB,YAAA,IAAI;gBACF,OAAO;oBACL,IAAI;oBACJ,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,C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,10 @@ import type { TtscWatchInputEvidence } from "./TtscWatchInputEvidence.cjs";
|
|
|
10
10
|
* a graph input by its state hash and physical target; a host input by the host
|
|
11
11
|
* bytes' hash. The root-file membership is a walk over many paths and never
|
|
12
12
|
* stands for one, so its evidence matches nothing here; the record holds it
|
|
13
|
-
* apart. Evidence without a state proves nothing and does not match.
|
|
13
|
+
* apart. Evidence without a state proves nothing and does not match. A plugin
|
|
14
|
+
* tree is proven through the plugin cache records of the project the caller
|
|
15
|
+
* names, so a new process does not read its sources and SDK again
|
|
16
|
+
* (samchon/ttsc#1725).
|
|
14
17
|
*
|
|
15
18
|
* @evidence contracts/common.md#principled-implementation Each codec replays its recorded meaning: complete predicates, graph hash plus physical target, raw host hash or plugin-tree state; membership and absent state cannot establish one-path agreement.
|
|
16
19
|
* @evidence contracts/common.md#clear-and-simple-design Discriminant branches delegate each observation to the codec owner and expose one conservative boolean comparison.
|
|
@@ -21,4 +24,4 @@ import type { TtscWatchInputEvidence } from "./TtscWatchInputEvidence.cjs";
|
|
|
21
24
|
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This asks whether current disk observations match a record; observer and plugin-tree owners establish any valid reuse, rather than caching this boolean without change witnesses.
|
|
22
25
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Comparison contexts and observed buffers are call-local; retained tree caches and active watchers have separate owners.
|
|
23
26
|
*/
|
|
24
|
-
export declare function watchInputEvidenceMatchesDisk(file: string, evidence: TtscWatchInputEvidence, filesystem?: TtscTransformFilesystemOperations): boolean;
|
|
27
|
+
export declare function watchInputEvidenceMatchesDisk(file: string, evidence: TtscWatchInputEvidence, filesystem?: TtscTransformFilesystemOperations, projectRoot?: string): boolean;
|
|
@@ -10,7 +10,10 @@ import type { TtscWatchInputEvidence } from "./TtscWatchInputEvidence.mjs";
|
|
|
10
10
|
* a graph input by its state hash and physical target; a host input by the host
|
|
11
11
|
* bytes' hash. The root-file membership is a walk over many paths and never
|
|
12
12
|
* stands for one, so its evidence matches nothing here; the record holds it
|
|
13
|
-
* apart. Evidence without a state proves nothing and does not match.
|
|
13
|
+
* apart. Evidence without a state proves nothing and does not match. A plugin
|
|
14
|
+
* tree is proven through the plugin cache records of the project the caller
|
|
15
|
+
* names, so a new process does not read its sources and SDK again
|
|
16
|
+
* (samchon/ttsc#1725).
|
|
14
17
|
*
|
|
15
18
|
* @evidence contracts/common.md#principled-implementation Each codec replays its recorded meaning: complete predicates, graph hash plus physical target, raw host hash or plugin-tree state; membership and absent state cannot establish one-path agreement.
|
|
16
19
|
* @evidence contracts/common.md#clear-and-simple-design Discriminant branches delegate each observation to the codec owner and expose one conservative boolean comparison.
|
|
@@ -21,4 +24,4 @@ import type { TtscWatchInputEvidence } from "./TtscWatchInputEvidence.mjs";
|
|
|
21
24
|
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This asks whether current disk observations match a record; observer and plugin-tree owners establish any valid reuse, rather than caching this boolean without change witnesses.
|
|
22
25
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Comparison contexts and observed buffers are call-local; retained tree caches and active watchers have separate owners.
|
|
23
26
|
*/
|
|
24
|
-
export declare function watchInputEvidenceMatchesDisk(file: string, evidence: TtscWatchInputEvidence, filesystem?: TtscTransformFilesystemOperations): boolean;
|
|
27
|
+
export declare function watchInputEvidenceMatchesDisk(file: string, evidence: TtscWatchInputEvidence, filesystem?: TtscTransformFilesystemOperations, projectRoot?: string): boolean;
|
|
@@ -10,7 +10,10 @@ import type { TtscWatchInputEvidence } from "./TtscWatchInputEvidence";
|
|
|
10
10
|
* a graph input by its state hash and physical target; a host input by the host
|
|
11
11
|
* bytes' hash. The root-file membership is a walk over many paths and never
|
|
12
12
|
* stands for one, so its evidence matches nothing here; the record holds it
|
|
13
|
-
* apart. Evidence without a state proves nothing and does not match.
|
|
13
|
+
* apart. Evidence without a state proves nothing and does not match. A plugin
|
|
14
|
+
* tree is proven through the plugin cache records of the project the caller
|
|
15
|
+
* names, so a new process does not read its sources and SDK again
|
|
16
|
+
* (samchon/ttsc#1725).
|
|
14
17
|
*
|
|
15
18
|
* @evidence contracts/common.md#principled-implementation Each codec replays its recorded meaning: complete predicates, graph hash plus physical target, raw host hash or plugin-tree state; membership and absent state cannot establish one-path agreement.
|
|
16
19
|
* @evidence contracts/common.md#clear-and-simple-design Discriminant branches delegate each observation to the codec owner and expose one conservative boolean comparison.
|
|
@@ -21,4 +24,4 @@ import type { TtscWatchInputEvidence } from "./TtscWatchInputEvidence";
|
|
|
21
24
|
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This asks whether current disk observations match a record; observer and plugin-tree owners establish any valid reuse, rather than caching this boolean without change witnesses.
|
|
22
25
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Comparison contexts and observed buffers are call-local; retained tree caches and active watchers have separate owners.
|
|
23
26
|
*/
|
|
24
|
-
export declare function watchInputEvidenceMatchesDisk(file: string, evidence: TtscWatchInputEvidence, filesystem?: TtscTransformFilesystemOperations): boolean;
|
|
27
|
+
export declare function watchInputEvidenceMatchesDisk(file: string, evidence: TtscWatchInputEvidence, filesystem?: TtscTransformFilesystemOperations, projectRoot?: string): boolean;
|
|
@@ -20,7 +20,10 @@ var MISSING_INPUT_STATE = require('../validation/MISSING_INPUT_STATE.js');
|
|
|
20
20
|
* a graph input by its state hash and physical target; a host input by the host
|
|
21
21
|
* bytes' hash. The root-file membership is a walk over many paths and never
|
|
22
22
|
* stands for one, so its evidence matches nothing here; the record holds it
|
|
23
|
-
* apart. Evidence without a state proves nothing and does not match.
|
|
23
|
+
* apart. Evidence without a state proves nothing and does not match. A plugin
|
|
24
|
+
* tree is proven through the plugin cache records of the project the caller
|
|
25
|
+
* names, so a new process does not read its sources and SDK again
|
|
26
|
+
* (samchon/ttsc#1725).
|
|
24
27
|
*
|
|
25
28
|
* @evidence contracts/common.md#principled-implementation Each codec replays its recorded meaning: complete predicates, graph hash plus physical target, raw host hash or plugin-tree state; membership and absent state cannot establish one-path agreement.
|
|
26
29
|
* @evidence contracts/common.md#clear-and-simple-design Discriminant branches delegate each observation to the codec owner and expose one conservative boolean comparison.
|
|
@@ -31,13 +34,13 @@ var MISSING_INPUT_STATE = require('../validation/MISSING_INPUT_STATE.js');
|
|
|
31
34
|
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This asks whether current disk observations match a record; observer and plugin-tree owners establish any valid reuse, rather than caching this boolean without change witnesses.
|
|
32
35
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Comparison contexts and observed buffers are call-local; retained tree caches and active watchers have separate owners.
|
|
33
36
|
*/
|
|
34
|
-
function watchInputEvidenceMatchesDisk(file, evidence, filesystem = DEFAULT_FILESYSTEM_OPERATIONS.DEFAULT_FILESYSTEM_OPERATIONS) {
|
|
37
|
+
function watchInputEvidenceMatchesDisk(file, evidence, filesystem = DEFAULT_FILESYSTEM_OPERATIONS.DEFAULT_FILESYSTEM_OPERATIONS, projectRoot) {
|
|
35
38
|
const state = evidence.state;
|
|
36
39
|
if (state === undefined || state.codec === "membership")
|
|
37
40
|
return false;
|
|
38
41
|
try {
|
|
39
42
|
if (state.codec === "tree") {
|
|
40
|
-
return pluginSourceHolds.pluginSourceHolds(file, state.digest, filesystem);
|
|
43
|
+
return pluginSourceHolds.pluginSourceHolds(file, state.digest, filesystem, undefined, projectRoot);
|
|
41
44
|
}
|
|
42
45
|
if (state.codec === "predicates") {
|
|
43
46
|
return matchesGraphInputObservation.matchesGraphInputObservation(file, state.observation, filesystem, createHostPathIdentityContext.createHostPathIdentityContext(filesystem));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watchInputEvidenceMatchesDisk.js","sources":["../../../../src/core/transform/watch/watchInputEvidenceMatchesDisk.ts"],"sourcesContent":[null],"names":["DEFAULT_FILESYSTEM_OPERATIONS","pluginSourceHolds","matchesGraphInputObservation","createHostPathIdentityContext","sameHostInputRealpath","hostInputRealpath","graphInputStateHash","MISSING_INPUT_STATE","hostInputStateHash"],"mappings":";;;;;;;;;;;;AAYA
|
|
1
|
+
{"version":3,"file":"watchInputEvidenceMatchesDisk.js","sources":["../../../../src/core/transform/watch/watchInputEvidenceMatchesDisk.ts"],"sourcesContent":[null],"names":["DEFAULT_FILESYSTEM_OPERATIONS","pluginSourceHolds","matchesGraphInputObservation","createHostPathIdentityContext","sameHostInputRealpath","hostInputRealpath","graphInputStateHash","MISSING_INPUT_STATE","hostInputStateHash"],"mappings":";;;;;;;;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,6BAA6B,CAC3C,IAAY,EACZ,QAAgC,EAChC,UAAA,GAAgDA,2DAA6B,EAC7E,WAAoB,EAAA;AAEpB,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK;IAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,YAAY;AAAE,QAAA,OAAO,KAAK;AACrE,IAAA,IAAI;AACF,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE;AAC1B,YAAA,OAAOC,mCAAiB,CACtB,IAAI,EACJ,KAAK,CAAC,MAAM,EACZ,UAAU,EACV,SAAS,EACT,WAAW,CACZ;QACH;AACA,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,YAAY,EAAE;AAChC,YAAA,OAAOC,yDAA4B,CACjC,IAAI,EACJ,KAAK,CAAC,WAAW,EACjB,UAAU,EACVC,2DAA6B,CAAC,UAAU,CAAC,CAC1C;QACH;AACA,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,EAAE;AAC3B,YAAA,QACEC,2CAAqB,CACnB,KAAK,CAAC,QAAQ,EACdC,mCAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,EACnCF,2DAA6B,CAAC,UAAU,CAAC,CAC1C;AACD,gBAAA,KAAK,CAAC,IAAI;qBACPG,uCAAmB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAIC,uCAAmB,CAAC;QAEpE;QACA,QACE,KAAK,CAAC,IAAI;aACTC,qCAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAID,uCAAmB,CAAC;IAEjE;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF;;;;"}
|
|
@@ -18,7 +18,10 @@ import { MISSING_INPUT_STATE } from '../validation/MISSING_INPUT_STATE.mjs';
|
|
|
18
18
|
* a graph input by its state hash and physical target; a host input by the host
|
|
19
19
|
* bytes' hash. The root-file membership is a walk over many paths and never
|
|
20
20
|
* stands for one, so its evidence matches nothing here; the record holds it
|
|
21
|
-
* apart. Evidence without a state proves nothing and does not match.
|
|
21
|
+
* apart. Evidence without a state proves nothing and does not match. A plugin
|
|
22
|
+
* tree is proven through the plugin cache records of the project the caller
|
|
23
|
+
* names, so a new process does not read its sources and SDK again
|
|
24
|
+
* (samchon/ttsc#1725).
|
|
22
25
|
*
|
|
23
26
|
* @evidence contracts/common.md#principled-implementation Each codec replays its recorded meaning: complete predicates, graph hash plus physical target, raw host hash or plugin-tree state; membership and absent state cannot establish one-path agreement.
|
|
24
27
|
* @evidence contracts/common.md#clear-and-simple-design Discriminant branches delegate each observation to the codec owner and expose one conservative boolean comparison.
|
|
@@ -29,13 +32,13 @@ import { MISSING_INPUT_STATE } from '../validation/MISSING_INPUT_STATE.mjs';
|
|
|
29
32
|
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This asks whether current disk observations match a record; observer and plugin-tree owners establish any valid reuse, rather than caching this boolean without change witnesses.
|
|
30
33
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Comparison contexts and observed buffers are call-local; retained tree caches and active watchers have separate owners.
|
|
31
34
|
*/
|
|
32
|
-
function watchInputEvidenceMatchesDisk(file, evidence, filesystem = DEFAULT_FILESYSTEM_OPERATIONS) {
|
|
35
|
+
function watchInputEvidenceMatchesDisk(file, evidence, filesystem = DEFAULT_FILESYSTEM_OPERATIONS, projectRoot) {
|
|
33
36
|
const state = evidence.state;
|
|
34
37
|
if (state === undefined || state.codec === "membership")
|
|
35
38
|
return false;
|
|
36
39
|
try {
|
|
37
40
|
if (state.codec === "tree") {
|
|
38
|
-
return pluginSourceHolds(file, state.digest, filesystem);
|
|
41
|
+
return pluginSourceHolds(file, state.digest, filesystem, undefined, projectRoot);
|
|
39
42
|
}
|
|
40
43
|
if (state.codec === "predicates") {
|
|
41
44
|
return matchesGraphInputObservation(file, state.observation, filesystem, createHostPathIdentityContext(filesystem));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watchInputEvidenceMatchesDisk.mjs","sources":["../../../../src/core/transform/watch/watchInputEvidenceMatchesDisk.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAYA
|
|
1
|
+
{"version":3,"file":"watchInputEvidenceMatchesDisk.mjs","sources":["../../../../src/core/transform/watch/watchInputEvidenceMatchesDisk.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,6BAA6B,CAC3C,IAAY,EACZ,QAAgC,EAChC,UAAA,GAAgD,6BAA6B,EAC7E,WAAoB,EAAA;AAEpB,IAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK;IAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,YAAY;AAAE,QAAA,OAAO,KAAK;AACrE,IAAA,IAAI;AACF,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE;AAC1B,YAAA,OAAO,iBAAiB,CACtB,IAAI,EACJ,KAAK,CAAC,MAAM,EACZ,UAAU,EACV,SAAS,EACT,WAAW,CACZ;QACH;AACA,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,YAAY,EAAE;AAChC,YAAA,OAAO,4BAA4B,CACjC,IAAI,EACJ,KAAK,CAAC,WAAW,EACjB,UAAU,EACV,6BAA6B,CAAC,UAAU,CAAC,CAC1C;QACH;AACA,QAAA,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,EAAE;AAC3B,YAAA,QACE,qBAAqB,CACnB,KAAK,CAAC,QAAQ,EACd,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,EACnC,6BAA6B,CAAC,UAAU,CAAC,CAC1C;AACD,gBAAA,KAAK,CAAC,IAAI;qBACP,mBAAmB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,mBAAmB,CAAC;QAEpE;QACA,QACE,KAAK,CAAC,IAAI;aACT,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,mBAAmB,CAAC;IAEjE;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttsc/unplugin",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.3",
|
|
4
4
|
"description": "Bundler adapters for ttsc plugins.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"fsevents": "^2.3.3"
|
|
203
203
|
},
|
|
204
204
|
"peerDependencies": {
|
|
205
|
-
"ttsc": "^0.31.
|
|
205
|
+
"ttsc": "^0.31.3"
|
|
206
206
|
},
|
|
207
207
|
"devDependencies": {
|
|
208
208
|
"@wrtnlabs/evidence": "^0.3.1",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"tslib": "^2.8.1",
|
|
218
218
|
"typescript": "^7.0.2",
|
|
219
219
|
"vite": "^7.3.5",
|
|
220
|
-
"ttsc": "0.31.
|
|
220
|
+
"ttsc": "0.31.3"
|
|
221
221
|
},
|
|
222
222
|
"repository": {
|
|
223
223
|
"type": "git",
|
|
@@ -61,7 +61,9 @@ export function projectRecordMoved(
|
|
|
61
61
|
refreshProcessClockReference(record.root, filesystem);
|
|
62
62
|
for (const [input, evidence] of Object.entries(record.inputs)) {
|
|
63
63
|
if (evidence === null || typeof evidence !== "object") return input;
|
|
64
|
-
if (
|
|
64
|
+
if (
|
|
65
|
+
!watchInputEvidenceMatchesDisk(input, evidence, filesystem, record.root)
|
|
66
|
+
)
|
|
65
67
|
return input;
|
|
66
68
|
}
|
|
67
69
|
if (record.membership === null) return undefined;
|
|
@@ -422,7 +422,12 @@ export async function captureTransformGeneration(props: {
|
|
|
422
422
|
// Prepare native toolchain authority before post-compile admission. Its
|
|
423
423
|
// cold subprocess and SDK reads stay off this host's event loop, and the
|
|
424
424
|
// config/walk/notification checks below include that asynchronous window.
|
|
425
|
-
await preparePluginBuildEnvironments(
|
|
425
|
+
await preparePluginBuildEnvironments(
|
|
426
|
+
result,
|
|
427
|
+
props.filesystem,
|
|
428
|
+
undefined,
|
|
429
|
+
projectRoot,
|
|
430
|
+
);
|
|
426
431
|
const { membershipPolicy, casePolicyLearned } =
|
|
427
432
|
selectReportedMembershipPolicy(primedPolicy, result);
|
|
428
433
|
TRANSFORM_RESULT_MEMBERSHIP.set(result, {
|
|
@@ -150,8 +150,18 @@ function environmentChanged(
|
|
|
150
150
|
: undefined;
|
|
151
151
|
if (
|
|
152
152
|
recorded.state === MISSING_INPUT_STATE
|
|
153
|
-
? pluginSourceState(
|
|
154
|
-
|
|
153
|
+
? pluginSourceState(
|
|
154
|
+
input,
|
|
155
|
+
prepared,
|
|
156
|
+
validation.cached.projectRoot,
|
|
157
|
+
) !== null
|
|
158
|
+
: !pluginSourceHolds(
|
|
159
|
+
input,
|
|
160
|
+
recorded.state,
|
|
161
|
+
filesystem,
|
|
162
|
+
prepared,
|
|
163
|
+
validation.cached.projectRoot,
|
|
164
|
+
)
|
|
155
165
|
)
|
|
156
166
|
return true;
|
|
157
167
|
continue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import {
|
|
3
|
-
pluginSourceDigest,
|
|
4
3
|
pluginSourceFilesSignature,
|
|
4
|
+
provenPluginSourceDigest,
|
|
5
5
|
} from "ttsc/plugin-source";
|
|
6
6
|
|
|
7
7
|
import { DEFAULT_FILESYSTEM_OPERATIONS } from "../filesystem/DEFAULT_FILESYSTEM_OPERATIONS";
|
|
@@ -24,9 +24,15 @@ import { inputMetadataEvidence } from "./inputMetadataEvidence";
|
|
|
24
24
|
* historical-directory eviction or owner partition and can grow with distinct
|
|
25
25
|
* directory spellings.
|
|
26
26
|
*
|
|
27
|
-
* @param directory The source directory.
|
|
27
|
+
* @param directory The source directory. WARNING (samchon/ttsc#1725): the map
|
|
28
|
+
* below ends with the process, and every bundler worker or restart is a new
|
|
29
|
+
* one, so each first proof read every plugin source byte again (0.35 s for
|
|
30
|
+
* typia's Go module). A caller that names its project takes a miss's digest
|
|
31
|
+
* from that project's plugin cache records, which the load that reported the
|
|
32
|
+
* state wrote.
|
|
28
33
|
* @param filesystem The operations whose clock reference the caller refreshed
|
|
29
34
|
* (`refreshFilesystemClockReference`), which decides separability.
|
|
35
|
+
* @param projectRoot Project whose plugin cache root holds the records.
|
|
30
36
|
* @throws When a listed file cannot be read, as `pluginSourceDigest` does.
|
|
31
37
|
* @evidence contracts/common.md#principled-implementation The build's exact file selector signs names and metadata around a fresh byte digest; matching separable signatures permit reuse only under the same native source-tree and refreshed-clock premises.
|
|
32
38
|
* @evidence contracts/common.md#clear-and-simple-design This coordinator owns the directory digest entry while ttsc owns selection and byte hashing and inputMetadataEvidence owns stamp interpretation.
|
|
@@ -34,12 +40,13 @@ import { inputMetadataEvidence } from "./inputMetadataEvidence";
|
|
|
34
40
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain population invalidation, before/after proof, fresh clock ordering, native-view assumptions and unbounded retained entries, with separated tags following documentation guidance.
|
|
35
41
|
* @evidence contracts/portability.md#os-neutral-implementation OS-neutral native source paths use Node resolution and ttsc's native selector; injected metadata must observe those paths. A different filesystem view or path dialect is not supported by the native enumeration/read calls here.
|
|
36
42
|
* @evidence contracts/performance.md#efficient-algorithms Reuse still enumerates and stats F files; a miss performs two metadata walks and one O(B) byte digest. Selection sorts its population, and temporary storage follows the file list and largest file buffer.
|
|
37
|
-
* @evidence contracts/performance.md#reuse-equivalent-work All calls share DIGESTS by resolved directory spelling; current separable metadata must match the signature recorded around the producer read. The key does not partition filesystem owners, so sharing assumes one native source view.
|
|
43
|
+
* @evidence contracts/performance.md#reuse-equivalent-work All calls share DIGESTS by resolved directory spelling; current separable metadata must match the signature recorded around the producer read. The key does not partition filesystem owners, so sharing assumes one native source view. A miss of a caller naming its project takes the digest the load recorded in that project's plugin cache, across processes.
|
|
38
44
|
* @evidence contracts/performance.md#bound-retention-and-release-resources DIGESTS is module-owned and retains one digest/signature per encountered key until failed stabilization deletes that key or the process ends; no historical-directory bound or explicit teardown currently exists.
|
|
39
45
|
*/
|
|
40
46
|
export function pluginSourceFilesDigest(
|
|
41
47
|
directory: string,
|
|
42
48
|
filesystem: TtscTransformFilesystemOperations = DEFAULT_FILESYSTEM_OPERATIONS,
|
|
49
|
+
projectRoot?: string,
|
|
43
50
|
): string {
|
|
44
51
|
const key = path.resolve(directory);
|
|
45
52
|
/**
|
|
@@ -56,7 +63,7 @@ export function pluginSourceFilesDigest(
|
|
|
56
63
|
) {
|
|
57
64
|
return known.digest;
|
|
58
65
|
}
|
|
59
|
-
const digest =
|
|
66
|
+
const digest = provenPluginSourceDigest(key, projectRoot);
|
|
60
67
|
const after = pluginSourceFilesSignature(key, evidence);
|
|
61
68
|
if (
|
|
62
69
|
before !== undefined &&
|
|
@@ -26,13 +26,15 @@ import { pluginSourceFilesDigest } from "./pluginSourceFilesDigest";
|
|
|
26
26
|
* @param state The state the envelope, a record, or a capture recorded.
|
|
27
27
|
* @param filesystem The operations whose clock reference the caller refreshed.
|
|
28
28
|
* @param prepared Optional already-qualified native environment authority.
|
|
29
|
+
* @param projectRoot Project whose plugin cache records prove the sources and
|
|
30
|
+
* the SDK in a new process (samchon/ttsc#1725).
|
|
29
31
|
* @evidence contracts/common.md#principled-implementation Source-state equality uses ttsc's build-key composition. Synchronous clients retain mismatch-triggered environment refresh; async clients supply current native authority and own fresh preparation separately. Unavailable source or prepared environment rejects proof.
|
|
30
32
|
* @evidence contracts/common.md#clear-and-simple-design This adapter supplies a proven source digest to the shared state comparator, keeping environment composition and refresh in ttsc's owner.
|
|
31
33
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts The fresh environment comparison corrects an actual stale environment witness; unreadable source is not hidden by expected state exceptions or perpetual compensating retries.
|
|
32
34
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain source versus environment proof, failure semantics and refreshed-clock parameters, followed by separated tags under documentation guidance.
|
|
33
35
|
* @evidence contracts/portability.md#os-neutral-implementation OS-neutral source/environment comparison uses the build's native boundaries. Injected metadata must describe that same native source tree; arbitrary foreign-filesystem views are not established by this adapter.
|
|
34
36
|
* @evidence contracts/performance.md#efficient-algorithms One proven source digest serves either the supplied-environment comparison or both synchronous environment comparisons; file work is delegated to the digest owner.
|
|
35
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Metadata-proven source digests and current native environment witnesses qualify reuse; async preparation and synchronous mismatch refresh remain distinct owning paths.
|
|
37
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Metadata-proven source digests and current native environment witnesses qualify reuse; async preparation and synchronous mismatch refresh remain distinct owning paths. A named project lets the source and SDK readings come from its plugin cache records across processes.
|
|
36
38
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This comparison acquires no retained source cache or native handle; digest storage and process-environment retention have separate owners.
|
|
37
39
|
*/
|
|
38
40
|
export function pluginSourceHolds(
|
|
@@ -40,9 +42,14 @@ export function pluginSourceHolds(
|
|
|
40
42
|
state: string,
|
|
41
43
|
filesystem: TtscTransformFilesystemOperations = DEFAULT_FILESYSTEM_OPERATIONS,
|
|
42
44
|
prepared?: { environment: string | undefined },
|
|
45
|
+
projectRoot?: string,
|
|
43
46
|
): boolean {
|
|
44
47
|
try {
|
|
45
|
-
const sourceDigest = pluginSourceFilesDigest(
|
|
48
|
+
const sourceDigest = pluginSourceFilesDigest(
|
|
49
|
+
directory,
|
|
50
|
+
filesystem,
|
|
51
|
+
projectRoot,
|
|
52
|
+
);
|
|
46
53
|
if (prepared !== undefined)
|
|
47
54
|
return (
|
|
48
55
|
prepared.environment !== undefined &&
|
|
@@ -51,7 +58,10 @@ export function pluginSourceHolds(
|
|
|
51
58
|
sourceDigest,
|
|
52
59
|
}) === state
|
|
53
60
|
);
|
|
54
|
-
return pluginSourceStateHolds(directory, state, {
|
|
61
|
+
return pluginSourceStateHolds(directory, state, {
|
|
62
|
+
projectRoot,
|
|
63
|
+
sourceDigest,
|
|
64
|
+
});
|
|
55
65
|
} catch {
|
|
56
66
|
return false;
|
|
57
67
|
}
|
|
@@ -21,6 +21,8 @@ import * as pluginSource from "ttsc/plugin-source";
|
|
|
21
21
|
*
|
|
22
22
|
* @param directory The source directory, as the envelope names it.
|
|
23
23
|
* @param prepared Optional current environment prepared by the async owner.
|
|
24
|
+
* @param projectRoot Project whose plugin cache records prove the sources and
|
|
25
|
+
* the SDK in a new process (samchon/ttsc#1725).
|
|
24
26
|
* @evidence contracts/common.md#principled-implementation The shared pluginSourceState composition combines source digest and build environment exactly as binary keys do, and an observation error preserves null rather than a plausible state.
|
|
25
27
|
* @evidence contracts/common.md#clear-and-simple-design Capture delegates state composition to ttsc while proof callers use pluginSourceHolds for mismatch refresh; the two roles are explicit without duplicate key logic.
|
|
26
28
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Missing observations cannot become hardcoded state or equal a recorded valid state through an exception branch.
|
|
@@ -33,13 +35,17 @@ import * as pluginSource from "ttsc/plugin-source";
|
|
|
33
35
|
export function pluginSourceState(
|
|
34
36
|
directory: string,
|
|
35
37
|
prepared?: { environment: string | undefined },
|
|
38
|
+
projectRoot?: string,
|
|
36
39
|
): string | null {
|
|
37
40
|
try {
|
|
38
41
|
if (prepared !== undefined)
|
|
39
42
|
return prepared.environment === undefined
|
|
40
43
|
? null
|
|
41
|
-
: pluginSource.pluginSourceState(directory,
|
|
42
|
-
|
|
44
|
+
: pluginSource.pluginSourceState(directory, {
|
|
45
|
+
environment: prepared.environment,
|
|
46
|
+
projectRoot,
|
|
47
|
+
});
|
|
48
|
+
return pluginSource.pluginSourceState(directory, { projectRoot });
|
|
43
49
|
} catch {
|
|
44
50
|
return null;
|
|
45
51
|
}
|
|
@@ -27,9 +27,15 @@ const asyncResults = new WeakSet<object>();
|
|
|
27
27
|
* awaits. Never preserve a positive batch across an await or replay the SDK
|
|
28
28
|
* witness independently for every plugin and nested validator.
|
|
29
29
|
*
|
|
30
|
+
* The project root reaches ttsc's environment worker, so that isolate proves
|
|
31
|
+
* the Go SDK and executables from the plugin cache's records instead of reading
|
|
32
|
+
* 135 MB of SDK once per bundler or runtime process (samchon/ttsc#1722).
|
|
33
|
+
*
|
|
30
34
|
* @param cached Optional resident generation whose existing source-state and
|
|
31
35
|
* environment witness may qualify source reuse. Other preparation owners
|
|
32
36
|
* retain direct source comparison.
|
|
37
|
+
* @param projectRoot Project whose plugin cache holds those records; the
|
|
38
|
+
* resident generation's own root when omitted.
|
|
33
39
|
* @evidence contracts/common.md#principled-implementation Every reported plugin directory qualifies current environment authority; only missing readings require asynchronous preparation. The same result's matching manifest state can share source proof only with a healthy exact-source tracker and the environment under which that tree was proven. Otherwise this operation compares source state once and a mismatch refreshes environment authority for the following owning validator to compare again; failed preparation cannot qualify an input.
|
|
34
40
|
* @evidence contracts/common.md#clear-and-simple-design One async boundary precedes existing synchronous generation, delivery and terminal proofs.
|
|
35
41
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Missing observations stay unproved; reported binary state never substitutes for native environment preparation or source comparison.
|
|
@@ -43,6 +49,7 @@ export async function preparePluginBuildEnvironments(
|
|
|
43
49
|
result: TtscCachedProjectTransform["result"],
|
|
44
50
|
filesystem: TtscTransformFilesystemOperations,
|
|
45
51
|
cached?: TtscCachedProjectTransform,
|
|
52
|
+
projectRoot: string | undefined = cached?.projectRoot,
|
|
46
53
|
): Promise<void> {
|
|
47
54
|
asyncResults.add(result);
|
|
48
55
|
const sources = selectPluginSourceInputs(result);
|
|
@@ -57,7 +64,11 @@ export async function preparePluginBuildEnvironments(
|
|
|
57
64
|
if (current.get(directory) !== undefined) continue;
|
|
58
65
|
awaited = true;
|
|
59
66
|
try {
|
|
60
|
-
await PluginBuildEnvironmentReadings.prepare(
|
|
67
|
+
await PluginBuildEnvironmentReadings.prepare(
|
|
68
|
+
directory,
|
|
69
|
+
false,
|
|
70
|
+
projectRoot,
|
|
71
|
+
);
|
|
61
72
|
} catch {
|
|
62
73
|
// Keep unavailable authority for admission rather than cold fallback.
|
|
63
74
|
}
|
|
@@ -79,9 +90,13 @@ export async function preparePluginBuildEnvironments(
|
|
|
79
90
|
)
|
|
80
91
|
continue;
|
|
81
92
|
if (
|
|
82
|
-
!pluginSourceHolds(
|
|
83
|
-
|
|
84
|
-
|
|
93
|
+
!pluginSourceHolds(
|
|
94
|
+
directory,
|
|
95
|
+
state,
|
|
96
|
+
filesystem,
|
|
97
|
+
{ environment },
|
|
98
|
+
projectRoot,
|
|
99
|
+
)
|
|
85
100
|
)
|
|
86
101
|
refresh.push(directory);
|
|
87
102
|
} catch {
|
|
@@ -91,7 +106,11 @@ export async function preparePluginBuildEnvironments(
|
|
|
91
106
|
}
|
|
92
107
|
for (const directory of refresh) {
|
|
93
108
|
try {
|
|
94
|
-
await PluginBuildEnvironmentReadings.prepare(
|
|
109
|
+
await PluginBuildEnvironmentReadings.prepare(
|
|
110
|
+
directory,
|
|
111
|
+
true,
|
|
112
|
+
projectRoot,
|
|
113
|
+
);
|
|
95
114
|
} catch {
|
|
96
115
|
// Synchronous admission requalifies after this asynchronous window.
|
|
97
116
|
}
|
|
@@ -165,6 +165,8 @@ export async function transformTtsc(
|
|
|
165
165
|
await preparePluginBuildEnvironments(
|
|
166
166
|
terminal.validation.cached.result,
|
|
167
167
|
filesystem,
|
|
168
|
+
undefined,
|
|
169
|
+
terminal.validation.cached.projectRoot,
|
|
168
170
|
);
|
|
169
171
|
if (cache?.get(key) !== transformed) continue;
|
|
170
172
|
}
|
|
@@ -302,7 +302,7 @@ export function captureUniversalHostInputValidation(
|
|
|
302
302
|
const prepared = usesPreparedPluginBuildEnvironments(cached.result);
|
|
303
303
|
const environment = prepared
|
|
304
304
|
? PluginBuildEnvironmentReadings.cached(directory)
|
|
305
|
-
: processPluginBuildEnvironment(directory);
|
|
305
|
+
: processPluginBuildEnvironment(directory, false, cached.projectRoot);
|
|
306
306
|
if (
|
|
307
307
|
environment === undefined ||
|
|
308
308
|
!pluginSourceHolds(
|
|
@@ -310,6 +310,7 @@ export function captureUniversalHostInputValidation(
|
|
|
310
310
|
digest,
|
|
311
311
|
filesystem,
|
|
312
312
|
prepared ? { environment } : undefined,
|
|
313
|
+
cached.projectRoot,
|
|
313
314
|
)
|
|
314
315
|
) {
|
|
315
316
|
recordGenerationProofFailure(failures, {
|
|
@@ -58,7 +58,7 @@ export function matchesUniversalHostInputTrees(
|
|
|
58
58
|
? proof?.cached === cached && proof.environments !== undefined
|
|
59
59
|
? proof.environments.get(directory)
|
|
60
60
|
: PluginBuildEnvironmentReadings.cached(directory)
|
|
61
|
-
: processPluginBuildEnvironment(directory);
|
|
61
|
+
: processPluginBuildEnvironment(directory, false, cached.projectRoot);
|
|
62
62
|
if (environment === undefined) return false;
|
|
63
63
|
if (
|
|
64
64
|
trackerProvesInputUnchanged(cached.hostInputMutationTracker, directory) &&
|
|
@@ -71,6 +71,7 @@ export function matchesUniversalHostInputTrees(
|
|
|
71
71
|
digest,
|
|
72
72
|
resultFilesystem(cached.result),
|
|
73
73
|
prepared ? { environment } : undefined,
|
|
74
|
+
cached.projectRoot,
|
|
74
75
|
)
|
|
75
76
|
)
|
|
76
77
|
return false;
|
|
@@ -15,6 +15,9 @@ import { captureWatchInputBaselines } from "./captureWatchInputBaselines";
|
|
|
15
15
|
* a recorded predicate. Unrequested listings are not enumerated.
|
|
16
16
|
* @param options.nativePredicates Native version-one codec kinds requested by
|
|
17
17
|
* recorded inputs. Raw native listings are independent of compiler listings.
|
|
18
|
+
* @param options.projectRoot Project whose plugin cache records prove a plugin
|
|
19
|
+
* tree, so a new process does not read its sources and SDK again
|
|
20
|
+
* (samchon/ttsc#1725).
|
|
18
21
|
* @evidence contracts/common.md#principled-implementation Two independently captured codec facts must agree before a baseline is returned; equality detects observed changes but cannot establish absence of intervening unobserved changes.
|
|
19
22
|
* @evidence contracts/common.md#clear-and-simple-design The singleton delegates to the batch owner, which assembles codec facts and owns independent observations and failure handling.
|
|
20
23
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unavailable reads retain their explicit codec markers and predicates; a mismatch or escaping exception declines capture without supplying expected state or retrying until a desired answer appears.
|
|
@@ -33,6 +36,7 @@ export function captureWatchInputBaseline(
|
|
|
33
36
|
nativePredicates?: readonly (keyof NonNullable<
|
|
34
37
|
TtscWatchInputBaseline["nativePredicates"]
|
|
35
38
|
>)[];
|
|
39
|
+
projectRoot?: string;
|
|
36
40
|
} = {},
|
|
37
41
|
): TtscWatchInputBaseline | undefined {
|
|
38
42
|
return captureWatchInputBaselines([file], filesystem, options).get(file);
|
|
@@ -48,6 +48,8 @@ export function captureWatchInputBaselines(
|
|
|
48
48
|
nativePredicates?: readonly (keyof NonNullable<
|
|
49
49
|
TtscWatchInputBaseline["nativePredicates"]
|
|
50
50
|
>)[];
|
|
51
|
+
/** Project whose plugin cache records prove a plugin tree (#1725). */
|
|
52
|
+
projectRoot?: string;
|
|
51
53
|
} = {},
|
|
52
54
|
): Map<string, TtscWatchInputBaseline | undefined> {
|
|
53
55
|
const selected = [...new Set(files)];
|
|
@@ -89,6 +91,8 @@ function capture(
|
|
|
89
91
|
nativePredicates?: readonly (keyof NonNullable<
|
|
90
92
|
TtscWatchInputBaseline["nativePredicates"]
|
|
91
93
|
>)[];
|
|
94
|
+
/** Project whose plugin cache records prove a plugin tree (#1725). */
|
|
95
|
+
projectRoot?: string;
|
|
92
96
|
},
|
|
93
97
|
): TtscWatchInputBaseline {
|
|
94
98
|
const stat = compilerStatKind(file, filesystem);
|
|
@@ -141,6 +145,8 @@ function capture(
|
|
|
141
145
|
identity: pathIdentityKey(file, identities),
|
|
142
146
|
realpath: compilerInputRealpathObservation(file, filesystem),
|
|
143
147
|
stat,
|
|
144
|
-
...(options.tree === true
|
|
148
|
+
...(options.tree === true
|
|
149
|
+
? { tree: pluginSourceState(file, undefined, options.projectRoot) }
|
|
150
|
+
: {}),
|
|
145
151
|
};
|
|
146
152
|
}
|