ttsc 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/compiler/internal/build/BuildExecution.d.ts +6 -3
- package/lib/compiler/internal/build/BuildExecution.js +40 -12
- package/lib/compiler/internal/build/BuildExecution.js.map +1 -1
- package/lib/compiler/internal/build/RunBuildOptions.d.ts +2 -1
- package/lib/compiler/internal/startResidentTransform.js +5 -4
- package/lib/compiler/internal/startResidentTransform.js.map +1 -1
- package/lib/compiler/internal/transformProjectInMemory.js +9 -7
- package/lib/compiler/internal/transformProjectInMemory.js.map +1 -1
- package/lib/internal/javascriptRuntimeCapabilities.d.ts +13 -4
- package/lib/internal/javascriptRuntimeCapabilities.js +56 -6
- package/lib/internal/javascriptRuntimeCapabilities.js.map +1 -1
- package/lib/internal/pluginSource.d.ts +1 -0
- package/lib/internal/pluginSource.js +1 -0
- package/lib/internal/pluginSource.js.map +1 -1
- package/lib/internal/resolveNodeBinary.d.ts +6 -1
- package/lib/internal/resolveNodeBinary.js +6 -2
- package/lib/internal/resolveNodeBinary.js.map +1 -1
- package/lib/internal/runtimeExecutableIdentity.d.ts +22 -13
- package/lib/internal/runtimeExecutableIdentity.js +192 -102
- package/lib/internal/runtimeExecutableIdentity.js.map +1 -1
- package/lib/launcher/internal/runTtsc.js +2 -2
- package/lib/launcher/internal/runTtsc.js.map +1 -1
- package/lib/launcher/internal/runtime/installRuntimeHooks.js +58 -4
- package/lib/launcher/internal/runtime/installRuntimeHooks.js.map +1 -1
- package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.d.ts +5 -1
- package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js +7 -2
- package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js.map +1 -1
- package/lib/launcher/internal/ttscserver/runTtscserver.js +8 -1
- package/lib/launcher/internal/ttscserver/runTtscserver.js.map +1 -1
- package/lib/launcher/internal/watch/WatchTopology.d.ts +20 -3
- package/lib/launcher/internal/watch/WatchTopology.js +31 -9
- package/lib/launcher/internal/watch/WatchTopology.js.map +1 -1
- package/lib/plugin/internal/CapabilityResolutionFormat.d.ts +21 -62
- package/lib/plugin/internal/CapabilityResolutionFormat.js +15 -106
- package/lib/plugin/internal/CapabilityResolutionFormat.js.map +1 -1
- package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.d.ts +6 -0
- package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js +4 -4
- package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js.map +1 -1
- package/lib/plugin/internal/load/loadProjectPlugins.d.ts +17 -3
- package/lib/plugin/internal/load/loadProjectPlugins.js +86 -23
- package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
- package/lib/plugin/internal/readCapabilityResolution.d.ts +6 -0
- package/lib/plugin/internal/readCapabilityResolution.js +8 -5
- package/lib/plugin/internal/readCapabilityResolution.js.map +1 -1
- package/lib/plugin/internal/source/GoEnvironmentReading.d.ts +9 -3
- package/lib/plugin/internal/source/GoEnvironmentReading.js +53 -7
- package/lib/plugin/internal/source/GoEnvironmentReading.js.map +1 -1
- package/lib/plugin/internal/source/NativeSourcePackages.d.ts +44 -6
- package/lib/plugin/internal/source/NativeSourcePackages.js +150 -8
- package/lib/plugin/internal/source/NativeSourcePackages.js.map +1 -1
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.d.ts +21 -3
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js +32 -7
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js.map +1 -1
- package/lib/plugin/internal/source/PluginContentIdentities.d.ts +265 -0
- package/lib/plugin/internal/source/PluginContentIdentities.js +452 -0
- package/lib/plugin/internal/source/PluginContentIdentities.js.map +1 -0
- package/lib/plugin/internal/source/PluginLoadAnswers.d.ts +63 -0
- package/lib/plugin/internal/source/PluginLoadAnswers.js +128 -0
- package/lib/plugin/internal/source/PluginLoadAnswers.js.map +1 -0
- package/lib/plugin/internal/source/SourceBuildCacheLayout.d.ts +10 -0
- package/lib/plugin/internal/source/SourceBuildCacheLayout.js +12 -0
- package/lib/plugin/internal/source/SourceBuildCacheLayout.js.map +1 -1
- package/lib/plugin/internal/source/SourcePluginWorkspace.d.ts +13 -2
- package/lib/plugin/internal/source/SourcePluginWorkspace.js +140 -4
- package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -1
- package/lib/plugin/internal/source/buildSourcePlugin.d.ts +15 -2
- package/lib/plugin/internal/source/buildSourcePlugin.js +27 -4
- package/lib/plugin/internal/source/buildSourcePlugin.js.map +1 -1
- package/lib/plugin/internal/source/computeCacheKey.d.ts +21 -5
- package/lib/plugin/internal/source/computeCacheKey.js +71 -29
- package/lib/plugin/internal/source/computeCacheKey.js.map +1 -1
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.d.ts +7 -3
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js +74 -35
- package/lib/plugin/internal/source/hashPluginBuildEnvironment.js.map +1 -1
- package/lib/plugin/internal/source/pluginBuildEnvironment.d.ts +8 -3
- package/lib/plugin/internal/source/pluginBuildEnvironment.js +8 -4
- package/lib/plugin/internal/source/pluginBuildEnvironment.js.map +1 -1
- package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js +12 -2
- package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js.map +1 -1
- package/lib/plugin/internal/source/pluginBuildVersions.d.ts +2 -2
- package/lib/plugin/internal/source/pluginBuildVersions.js +4 -17
- package/lib/plugin/internal/source/pluginBuildVersions.js.map +1 -1
- package/lib/plugin/internal/source/pluginSourceState.d.ts +6 -2
- package/lib/plugin/internal/source/pluginSourceState.js +20 -8
- package/lib/plugin/internal/source/pluginSourceState.js.map +1 -1
- package/lib/plugin/internal/source/pluginSourceStateHolds.d.ts +7 -2
- package/lib/plugin/internal/source/pluginSourceStateHolds.js +12 -7
- package/lib/plugin/internal/source/pluginSourceStateHolds.js.map +1 -1
- package/lib/plugin/internal/source/processPluginBuildEnvironment.d.ts +7 -2
- package/lib/plugin/internal/source/processPluginBuildEnvironment.js +8 -3
- package/lib/plugin/internal/source/processPluginBuildEnvironment.js.map +1 -1
- package/lib/plugin/internal/source/provenPluginSourceDigest.d.ts +28 -0
- package/lib/plugin/internal/source/provenPluginSourceDigest.js +41 -0
- package/lib/plugin/internal/source/provenPluginSourceDigest.js.map +1 -0
- package/lib/plugin/internal/source/pruneCacheFileRoot.d.ts +3 -2
- package/lib/plugin/internal/source/pruneCacheFileRoot.js +3 -2
- package/lib/plugin/internal/source/pruneCacheFileRoot.js.map +1 -1
- package/lib/plugin/internal/source/ttscPackageVersion.d.ts +26 -0
- package/lib/plugin/internal/source/ttscPackageVersion.js +47 -0
- package/lib/plugin/internal/source/ttscPackageVersion.js.map +1 -0
- package/lib/plugin/internal/writeCapabilityResolution.d.ts +6 -0
- package/lib/plugin/internal/writeCapabilityResolution.js +11 -7
- package/lib/plugin/internal/writeCapabilityResolution.js.map +1 -1
- package/lib/plugin/resolveCapabilityPlugins.js +67 -15
- package/lib/plugin/resolveCapabilityPlugins.js.map +1 -1
- package/lib/structures/internal/TtscSingleFileEmitOptions.d.ts +5 -1
- package/package.json +8 -8
- package/src/compiler/internal/build/BuildExecution.ts +48 -14
- package/src/compiler/internal/build/RunBuildOptions.ts +2 -1
- package/src/compiler/internal/startResidentTransform.ts +12 -3
- package/src/compiler/internal/transformProjectInMemory.ts +10 -2
- package/src/internal/javascriptRuntimeCapabilities.ts +71 -5
- package/src/internal/pluginSource.ts +1 -0
- package/src/internal/resolveNodeBinary.ts +12 -1
- package/src/internal/runtimeExecutableIdentity.ts +227 -141
- package/src/launcher/internal/runTtsc.ts +6 -2
- package/src/launcher/internal/runtime/installRuntimeHooks.ts +68 -3
- package/src/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.ts +11 -2
- package/src/launcher/internal/ttscserver/runTtscserver.ts +18 -1
- package/src/launcher/internal/watch/WatchTopology.ts +38 -9
- package/src/plugin/internal/CapabilityResolutionFormat.ts +23 -107
- package/src/plugin/internal/load/PluginDescriptorEvaluationCache.ts +14 -4
- package/src/plugin/internal/load/loadProjectPlugins.ts +226 -98
- package/src/plugin/internal/readCapabilityResolution.ts +17 -6
- package/src/plugin/internal/source/GoEnvironmentReading.ts +74 -5
- package/src/plugin/internal/source/NativeSourcePackages.ts +262 -5
- package/src/plugin/internal/source/PluginBuildEnvironmentReadings.ts +41 -5
- package/src/plugin/internal/source/PluginContentIdentities.ts +563 -0
- package/src/plugin/internal/source/PluginLoadAnswers.ts +151 -0
- package/src/plugin/internal/source/SourceBuildCacheLayout.ts +14 -0
- package/src/plugin/internal/source/SourcePluginWorkspace.ts +176 -2
- package/src/plugin/internal/source/buildSourcePlugin.ts +43 -3
- package/src/plugin/internal/source/computeCacheKey.ts +103 -47
- package/src/plugin/internal/source/hashPluginBuildEnvironment.ts +144 -29
- package/src/plugin/internal/source/pluginBuildEnvironment.ts +9 -2
- package/src/plugin/internal/source/pluginBuildEnvironmentWorker.ts +18 -2
- package/src/plugin/internal/source/pluginBuildVersions.ts +5 -26
- package/src/plugin/internal/source/pluginSourceState.ts +28 -12
- package/src/plugin/internal/source/pluginSourceStateHolds.ts +15 -8
- package/src/plugin/internal/source/processPluginBuildEnvironment.ts +8 -2
- package/src/plugin/internal/source/provenPluginSourceDigest.ts +45 -0
- package/src/plugin/internal/source/pruneCacheFileRoot.ts +3 -2
- package/src/plugin/internal/source/ttscPackageVersion.ts +45 -0
- package/src/plugin/internal/writeCapabilityResolution.ts +29 -8
- package/src/plugin/resolveCapabilityPlugins.ts +87 -13
- package/src/structures/internal/TtscSingleFileEmitOptions.ts +8 -1
|
@@ -5,9 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.pluginSourceState = pluginSourceState;
|
|
7
7
|
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
|
+
const PluginContentIdentities_1 = require("./PluginContentIdentities");
|
|
8
9
|
const pluginBuildEnvironment_1 = require("./pluginBuildEnvironment");
|
|
9
|
-
const pluginSourceDigest_1 = require("./pluginSourceDigest");
|
|
10
10
|
const processPluginBuildEnvironment_1 = require("./processPluginBuildEnvironment");
|
|
11
|
+
const provenPluginSourceDigest_1 = require("./provenPluginSourceDigest");
|
|
11
12
|
/**
|
|
12
13
|
* The state of one plugin source directory as a plugin binary is built from it:
|
|
13
14
|
* the digest of its sources (`pluginSourceDigest`) together with the
|
|
@@ -29,7 +30,9 @@ const processPluginBuildEnvironment_1 = require("./processPluginBuildEnvironment
|
|
|
29
30
|
* process's own environment the environment is read once per directory and set
|
|
30
31
|
* of variables (`processPluginBuildEnvironment`), and a proof that must not
|
|
31
32
|
* accept a stale one compares through `pluginSourceStateHolds`, which reads it
|
|
32
|
-
* again before it refutes a state.
|
|
33
|
+
* again before it refutes a state. A caller that names its project proves the
|
|
34
|
+
* sources and the SDK from that project's plugin cache records instead of
|
|
35
|
+
* reading them in every new process (#1725).
|
|
33
36
|
*
|
|
34
37
|
* @param directory The source directory.
|
|
35
38
|
* @param options.env An effective environment other than this process's, which
|
|
@@ -38,6 +41,7 @@ const processPluginBuildEnvironment_1 = require("./processPluginBuildEnvironment
|
|
|
38
41
|
* caller already read it.
|
|
39
42
|
* @param options.environment The directory's `pluginBuildEnvironment`, when the
|
|
40
43
|
* caller already read it, as a plugin build's key does.
|
|
44
|
+
* @param options.projectRoot Project whose plugin cache root holds the records.
|
|
41
45
|
* @returns The state, as lowercase hex.
|
|
42
46
|
* @throws When a listed source file cannot be read, as the build itself would.
|
|
43
47
|
* @evidence contracts/common.md#principled-implementation The state combines source and environment digests because both affect compiled plugin behavior; supplied readings preserve the exact inputs a build already keyed on.
|
|
@@ -46,18 +50,26 @@ const processPluginBuildEnvironment_1 = require("./processPluginBuildEnvironment
|
|
|
46
50
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain module-root versus overlay environment meaning and the provenance required for supplied digests.
|
|
47
51
|
* @evidence contracts/portability.md#os-neutral-implementation Native source and toolchain identity are delegated to the shared filesystem/process readers; the final digest is platform-independent serialized text.
|
|
48
52
|
* @evidence contracts/performance.md#efficient-algorithms Composition serializes/hashes supplied digest strings whose public inputs are not length-validated; owning generated digests are fixed-width hex. Missing readings delegate native source enumeration/full reads and environment variable/witness/tool/SDK work, without establishing an unmeasured dominant cost ranking.
|
|
49
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Supplied source/environment strings are trusted producer readings, not independently revalidated here. Process-environment memos require their owner's variable/path witness checks; explicit injected environments are read fresh. Equality inherits the selected-source and native metadata premises.
|
|
53
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Supplied source/environment strings are trusted producer readings, not independently revalidated here. Process-environment memos require their owner's variable/path witness checks; explicit injected environments are read fresh. A named project lets missing source and SDK readings come from its record store across processes. Equality inherits the selected-source and native metadata premises.
|
|
50
54
|
*
|
|
51
55
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This function retains no resource or state after returning; process-environment memo lifetime belongs to its separate owner.
|
|
52
56
|
*/
|
|
53
57
|
function pluginSourceState(directory, options = {}) {
|
|
58
|
+
const sourceDigest = options.sourceDigest ??
|
|
59
|
+
(0, provenPluginSourceDigest_1.provenPluginSourceDigest)(directory, options.projectRoot, options.env);
|
|
60
|
+
const environment = options.environment ??
|
|
61
|
+
(options.env === undefined
|
|
62
|
+
? (0, processPluginBuildEnvironment_1.processPluginBuildEnvironment)(directory, false, options.projectRoot)
|
|
63
|
+
: (0, pluginBuildEnvironment_1.pluginBuildEnvironment)(directory, options.env, undefined, options.projectRoot === undefined
|
|
64
|
+
? undefined
|
|
65
|
+
: PluginContentIdentities_1.PluginContentIdentities.open({
|
|
66
|
+
projectRoot: options.projectRoot,
|
|
67
|
+
env: options.env,
|
|
68
|
+
sources: [directory],
|
|
69
|
+
})));
|
|
54
70
|
return node_crypto_1.default
|
|
55
71
|
.createHash("sha256")
|
|
56
|
-
.update(`source=${
|
|
57
|
-
`environment=${options.environment ??
|
|
58
|
-
(options.env === undefined
|
|
59
|
-
? (0, processPluginBuildEnvironment_1.processPluginBuildEnvironment)(directory)
|
|
60
|
-
: (0, pluginBuildEnvironment_1.pluginBuildEnvironment)(directory, options.env))}\n`)
|
|
72
|
+
.update(`source=${sourceDigest}\nenvironment=${environment}\n`)
|
|
61
73
|
.digest("hex");
|
|
62
74
|
}
|
|
63
75
|
//# sourceMappingURL=pluginSourceState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginSourceState.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginSourceState.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AAEjC,qEAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"pluginSourceState.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginSourceState.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AAEjC,uEAAoE;AACpE,qEAAkE;AAClE,mFAAgF;AAChF,yEAAsE;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,2BACE,SAAiB,EACjB,OAAO,GAKH,EAAE;IAEN,MAAM,YAAY,GAChB,OAAO,CAAC,YAAY;QACpB,IAAA,mDAAwB,EAAC,SAAS,EAAE,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACxE,MAAM,WAAW,GACf,OAAO,CAAC,WAAW;QACnB,CAAC,OAAO,CAAC,GAAG,KAAK,SAAS;YACxB,CAAC,CAAC,IAAA,6DAA6B,EAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC;YACtE,CAAC,CAAC,IAAA,+CAAsB,EACpB,SAAS,EACT,OAAO,CAAC,GAAG,EACX,SAAS,EACT,OAAO,CAAC,WAAW,KAAK,SAAS;gBAC/B,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,iDAAuB,CAAC,IAAI,CAAC;oBAC3B,WAAW,EAAE,OAAO,CAAC,WAAW;oBAChC,GAAG,EAAE,OAAO,CAAC,GAAG;oBAChB,OAAO,EAAE,CAAC,SAAS,CAAC;iBACrB,CAAC,CACP,CAAC,CAAC;IACT,OAAO,qBAAM;SACV,UAAU,CAAC,QAAQ,CAAC;SACpB,MAAM,CAAC,UAAU,YAAY,iBAAiB,WAAW,IAAI,CAAC;SAC9D,MAAM,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -12,12 +12,16 @@
|
|
|
12
12
|
* is refuted. A compile keys its binaries on a fresh read, so a state it
|
|
13
13
|
* reported after a change gets one comparison with a refreshed environment.
|
|
14
14
|
* That retry does not guarantee equality for a changing or differently keyed
|
|
15
|
-
* environment, and a supplied source digest remains the caller's premise.
|
|
15
|
+
* environment, and a supplied source digest remains the caller's premise. A
|
|
16
|
+
* caller that names its project proves the sources and the SDK from that
|
|
17
|
+
* project's plugin cache records instead of reading them in every new process
|
|
18
|
+
* (#1725).
|
|
16
19
|
*
|
|
17
20
|
* @param directory The source directory, as the envelope names it.
|
|
18
21
|
* @param state The state the envelope reported.
|
|
19
22
|
* @param options.sourceDigest The directory's `pluginSourceDigest`, when the
|
|
20
23
|
* caller holds one it can vouch for.
|
|
24
|
+
* @param options.projectRoot Project whose plugin cache root holds the records.
|
|
21
25
|
* @throws When a listed source file cannot be read, as the build itself would.
|
|
22
26
|
* @evidence contracts/common.md#principled-implementation Equality uses shared state composition and one real environment refresh after mismatch. This allows changed observations to be reconsidered without certifying the second comparison must match; supplied digest validity and native witness premises remain with their owners.
|
|
23
27
|
* @evidence contracts/common.md#clear-and-simple-design One source reading is passed through both attempts and only the environment owner performs the refresh.
|
|
@@ -25,10 +29,11 @@
|
|
|
25
29
|
* @evidence contracts/common.md#meaningful-documentation The prose states source-digest provenance, environment invalidation and the reason a mismatching state gets a fresh comparison.
|
|
26
30
|
* @evidence contracts/portability.md#os-neutral-implementation Source reads and Go/environment witnesses use the same native boundary implementations as builds, rather than comparing OS names or guessed installation paths.
|
|
27
31
|
* @evidence contracts/performance.md#efficient-algorithms At most one source digest computation is requested and reused by both comparisons; supplied strings bypass it. Native enumeration/file bytes, full environment identity/witness checks, optional tool/SDK refresh and digest-string hashing contribute work; mismatch repeats environment resolution once rather than bounding total cost by comparison count.
|
|
28
|
-
* @evidence contracts/performance.md#reuse-equivalent-work A caller's proven source digest and the process owner's still-valid environment are reused; a mismatch forces the owning environment refresh before returning false.
|
|
32
|
+
* @evidence contracts/performance.md#reuse-equivalent-work A caller's proven source digest and the process owner's still-valid environment are reused; a mismatch forces the owning environment refresh before returning false. A named project lets the source and SDK readings come from its record store across processes.
|
|
29
33
|
*
|
|
30
34
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The proof owns no retained source buffer, process or watcher; its caller owns any saved source digest.
|
|
31
35
|
*/
|
|
32
36
|
export declare function pluginSourceStateHolds(directory: string, state: string, options?: {
|
|
37
|
+
projectRoot?: string;
|
|
33
38
|
sourceDigest?: string;
|
|
34
39
|
}): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pluginSourceStateHolds = pluginSourceStateHolds;
|
|
4
|
-
const pluginSourceDigest_1 = require("./pluginSourceDigest");
|
|
5
4
|
const pluginSourceState_1 = require("./pluginSourceState");
|
|
6
5
|
const processPluginBuildEnvironment_1 = require("./processPluginBuildEnvironment");
|
|
6
|
+
const provenPluginSourceDigest_1 = require("./provenPluginSourceDigest");
|
|
7
7
|
/**
|
|
8
8
|
* Whether one plugin source directory still holds the state a transform
|
|
9
9
|
* reported for it (`pluginSourceState`), under this process's environment.
|
|
@@ -18,12 +18,16 @@ const processPluginBuildEnvironment_1 = require("./processPluginBuildEnvironment
|
|
|
18
18
|
* is refuted. A compile keys its binaries on a fresh read, so a state it
|
|
19
19
|
* reported after a change gets one comparison with a refreshed environment.
|
|
20
20
|
* That retry does not guarantee equality for a changing or differently keyed
|
|
21
|
-
* environment, and a supplied source digest remains the caller's premise.
|
|
21
|
+
* environment, and a supplied source digest remains the caller's premise. A
|
|
22
|
+
* caller that names its project proves the sources and the SDK from that
|
|
23
|
+
* project's plugin cache records instead of reading them in every new process
|
|
24
|
+
* (#1725).
|
|
22
25
|
*
|
|
23
26
|
* @param directory The source directory, as the envelope names it.
|
|
24
27
|
* @param state The state the envelope reported.
|
|
25
28
|
* @param options.sourceDigest The directory's `pluginSourceDigest`, when the
|
|
26
29
|
* caller holds one it can vouch for.
|
|
30
|
+
* @param options.projectRoot Project whose plugin cache root holds the records.
|
|
27
31
|
* @throws When a listed source file cannot be read, as the build itself would.
|
|
28
32
|
* @evidence contracts/common.md#principled-implementation Equality uses shared state composition and one real environment refresh after mismatch. This allows changed observations to be reconsidered without certifying the second comparison must match; supplied digest validity and native witness premises remain with their owners.
|
|
29
33
|
* @evidence contracts/common.md#clear-and-simple-design One source reading is passed through both attempts and only the environment owner performs the refresh.
|
|
@@ -31,15 +35,16 @@ const processPluginBuildEnvironment_1 = require("./processPluginBuildEnvironment
|
|
|
31
35
|
* @evidence contracts/common.md#meaningful-documentation The prose states source-digest provenance, environment invalidation and the reason a mismatching state gets a fresh comparison.
|
|
32
36
|
* @evidence contracts/portability.md#os-neutral-implementation Source reads and Go/environment witnesses use the same native boundary implementations as builds, rather than comparing OS names or guessed installation paths.
|
|
33
37
|
* @evidence contracts/performance.md#efficient-algorithms At most one source digest computation is requested and reused by both comparisons; supplied strings bypass it. Native enumeration/file bytes, full environment identity/witness checks, optional tool/SDK refresh and digest-string hashing contribute work; mismatch repeats environment resolution once rather than bounding total cost by comparison count.
|
|
34
|
-
* @evidence contracts/performance.md#reuse-equivalent-work A caller's proven source digest and the process owner's still-valid environment are reused; a mismatch forces the owning environment refresh before returning false.
|
|
38
|
+
* @evidence contracts/performance.md#reuse-equivalent-work A caller's proven source digest and the process owner's still-valid environment are reused; a mismatch forces the owning environment refresh before returning false. A named project lets the source and SDK readings come from its record store across processes.
|
|
35
39
|
*
|
|
36
40
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The proof owns no retained source buffer, process or watcher; its caller owns any saved source digest.
|
|
37
41
|
*/
|
|
38
42
|
function pluginSourceStateHolds(directory, state, options = {}) {
|
|
39
|
-
const
|
|
40
|
-
|
|
43
|
+
const projectRoot = options.projectRoot;
|
|
44
|
+
const sourceDigest = options.sourceDigest ?? (0, provenPluginSourceDigest_1.provenPluginSourceDigest)(directory, projectRoot);
|
|
45
|
+
if ((0, pluginSourceState_1.pluginSourceState)(directory, { projectRoot, sourceDigest }) === state)
|
|
41
46
|
return true;
|
|
42
|
-
(0, processPluginBuildEnvironment_1.processPluginBuildEnvironment)(directory, true);
|
|
43
|
-
return (0, pluginSourceState_1.pluginSourceState)(directory, { sourceDigest }) === state;
|
|
47
|
+
(0, processPluginBuildEnvironment_1.processPluginBuildEnvironment)(directory, true, projectRoot);
|
|
48
|
+
return (0, pluginSourceState_1.pluginSourceState)(directory, { projectRoot, sourceDigest }) === state;
|
|
44
49
|
}
|
|
45
50
|
//# sourceMappingURL=pluginSourceStateHolds.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginSourceStateHolds.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginSourceStateHolds.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"pluginSourceStateHolds.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginSourceStateHolds.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,mFAAgF;AAChF,yEAAsE;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,gCACE,SAAiB,EACjB,KAAa,EACb,OAAO,GAAoD,EAAE;IAE7D,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,YAAY,GAChB,OAAO,CAAC,YAAY,IAAI,IAAA,mDAAwB,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAC3E,IAAI,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK;QACvE,OAAO,IAAI,CAAC;IACd,IAAA,6DAA6B,EAAC,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAC5D,OAAO,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK,CAAC;AAC/E,CAAC"}
|
|
@@ -19,15 +19,20 @@
|
|
|
19
19
|
* possible metadata-restored change. The build itself never reads through here:
|
|
20
20
|
* it keys each binary on a fresh read.
|
|
21
21
|
*
|
|
22
|
+
* A caller that names its project lets a reading this process does not hold
|
|
23
|
+
* prove the SDK and executables from that project's plugin cache records
|
|
24
|
+
* (#1725) instead of reading the whole GOROOT in every new process.
|
|
25
|
+
*
|
|
22
26
|
* @param directory The directory a build runs `go` in.
|
|
23
27
|
* @param refresh Whether to read the environment again rather than reuse it.
|
|
28
|
+
* @param projectRoot Project whose plugin cache root holds the records.
|
|
24
29
|
* @evidence contracts/common.md#principled-implementation Variable serialization is sorted and length-delimited; reuse additionally requires unchanged pre-read metadata for every external dependency, including all contributing GOROOT directories and files, under the witness's documented metadata-distinguishability premise.
|
|
25
30
|
* @evidence contracts/common.md#clear-and-simple-design One process-local map owns environment memoization; fresh construction and witness validation remain separate operations shared with build verification.
|
|
26
31
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Refresh performs the real environment read rather than assuming that a stable compiler path or quiet source tree implies a stable toolchain.
|
|
27
32
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain why environment probing is retained, its variable/path invalidation, and why builds still read fresh; descriptive prose and tags are separated.
|
|
28
33
|
* @evidence contracts/portability.md#os-neutral-implementation Native environment and filesystem identity are delegated to the shared platform-aware probe and metadata witness rather than inferred from an OS name.
|
|
29
34
|
* @evidence contracts/performance.md#efficient-algorithms The delegated owner serializes/hashes variable names/values after text-sensitive sorting and validates witnessed native paths. A qualified hit avoids cold tool/content preparation but not native lookup/path/link/text costs. Misses/refresh delegate actual Go/toolchain/SDK readings; V/P counts alone do not bound all bytes or native work.
|
|
30
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced.
|
|
35
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced. A miss naming a project proves the SDK and executables from that project's record store across processes.
|
|
31
36
|
* @evidence contracts/performance.md#bound-retention-and-release-resources PluginBuildEnvironmentReadings owns the process-shared map and asynchronous worker/request lifetimes, not this forwarding call. Existing keys are replaced, but distinct directory/variable combinations retain historical witnesses without an eviction bound; consumers and the owner govern that retention.
|
|
32
37
|
*/
|
|
33
|
-
export declare function processPluginBuildEnvironment(directory: string, refresh?: boolean): string;
|
|
38
|
+
export declare function processPluginBuildEnvironment(directory: string, refresh?: boolean, projectRoot?: string): string;
|
|
@@ -23,18 +23,23 @@ const PluginBuildEnvironmentReadings_1 = require("./PluginBuildEnvironmentReadin
|
|
|
23
23
|
* possible metadata-restored change. The build itself never reads through here:
|
|
24
24
|
* it keys each binary on a fresh read.
|
|
25
25
|
*
|
|
26
|
+
* A caller that names its project lets a reading this process does not hold
|
|
27
|
+
* prove the SDK and executables from that project's plugin cache records
|
|
28
|
+
* (#1725) instead of reading the whole GOROOT in every new process.
|
|
29
|
+
*
|
|
26
30
|
* @param directory The directory a build runs `go` in.
|
|
27
31
|
* @param refresh Whether to read the environment again rather than reuse it.
|
|
32
|
+
* @param projectRoot Project whose plugin cache root holds the records.
|
|
28
33
|
* @evidence contracts/common.md#principled-implementation Variable serialization is sorted and length-delimited; reuse additionally requires unchanged pre-read metadata for every external dependency, including all contributing GOROOT directories and files, under the witness's documented metadata-distinguishability premise.
|
|
29
34
|
* @evidence contracts/common.md#clear-and-simple-design One process-local map owns environment memoization; fresh construction and witness validation remain separate operations shared with build verification.
|
|
30
35
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Refresh performs the real environment read rather than assuming that a stable compiler path or quiet source tree implies a stable toolchain.
|
|
31
36
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain why environment probing is retained, its variable/path invalidation, and why builds still read fresh; descriptive prose and tags are separated.
|
|
32
37
|
* @evidence contracts/portability.md#os-neutral-implementation Native environment and filesystem identity are delegated to the shared platform-aware probe and metadata witness rather than inferred from an OS name.
|
|
33
38
|
* @evidence contracts/performance.md#efficient-algorithms The delegated owner serializes/hashes variable names/values after text-sensitive sorting and validates witnessed native paths. A qualified hit avoids cold tool/content preparation but not native lookup/path/link/text costs. Misses/refresh delegate actual Go/toolchain/SDK readings; V/P counts alone do not bound all bytes or native work.
|
|
34
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced.
|
|
39
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced. A miss naming a project proves the SDK and executables from that project's record store across processes.
|
|
35
40
|
* @evidence contracts/performance.md#bound-retention-and-release-resources PluginBuildEnvironmentReadings owns the process-shared map and asynchronous worker/request lifetimes, not this forwarding call. Existing keys are replaced, but distinct directory/variable combinations retain historical witnesses without an eviction bound; consumers and the owner govern that retention.
|
|
36
41
|
*/
|
|
37
|
-
function processPluginBuildEnvironment(directory, refresh = false) {
|
|
38
|
-
return PluginBuildEnvironmentReadings_1.PluginBuildEnvironmentReadings.read(directory, refresh);
|
|
42
|
+
function processPluginBuildEnvironment(directory, refresh = false, projectRoot) {
|
|
43
|
+
return PluginBuildEnvironmentReadings_1.PluginBuildEnvironmentReadings.read(directory, refresh, projectRoot);
|
|
39
44
|
}
|
|
40
45
|
//# sourceMappingURL=processPluginBuildEnvironment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processPluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/processPluginBuildEnvironment.ts"],"names":[],"mappings":";;;AAAA,qFAAkF;AAElF
|
|
1
|
+
{"version":3,"file":"processPluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/processPluginBuildEnvironment.ts"],"names":[],"mappings":";;;AAAA,qFAAkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,uCACE,SAAiB,EACjB,OAAO,GAAG,KAAK,EACf,WAAoB;IAEpB,OAAO,+DAA8B,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `pluginSourceDigest` of a plugin source directory, proven from the
|
|
3
|
+
* records of `projectRoot`'s plugin cache when the caller names its project.
|
|
4
|
+
*
|
|
5
|
+
* WARNING (#1725): a consumer that proves a reported plugin-source state in a
|
|
6
|
+
* new process, such as a bundler worker, a capability host or the language
|
|
7
|
+
* server, read every source byte again because its own memo starts empty. The
|
|
8
|
+
* load that reported the state already recorded this digest
|
|
9
|
+
* (`PluginContentIdentities`), so a process that names the same project reuses
|
|
10
|
+
* it while the files' metadata still holds. Without a project, or when no store
|
|
11
|
+
* can be opened, the bytes are read as before.
|
|
12
|
+
*
|
|
13
|
+
* @param directory The source directory.
|
|
14
|
+
* @param projectRoot Project whose plugin cache root holds the records.
|
|
15
|
+
* @param env Environment selecting that cache root; this process's by default.
|
|
16
|
+
* @returns The digest, as lowercase hex.
|
|
17
|
+
* @throws When a listed source file cannot be read, as `pluginSourceDigest`
|
|
18
|
+
* does.
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation The record store applies its separable-signature rule to exactly the files the digest reads; every unproved premise falls back to the content reader.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design Store opening and the population proof stay with PluginContentIdentities; this entry only names the project for consumers outside the loader.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No path, timestamp or process memo stands for content; the store refuses a root inside the source.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation The paragraphs state the regression, the reuse premise and the fallback.
|
|
23
|
+
* @evidence contracts/portability.md#os-neutral-implementation Cache-root selection and device-keyed references are delegated to the shared owners.
|
|
24
|
+
* @evidence contracts/performance.md#efficient-algorithms A proven digest stats the selected files; an unproven one also reads their bytes once. Opening the store writes two reference probes.
|
|
25
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The digest the load recorded is reused across processes under the same project's store.
|
|
26
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The store lives for this call; records belong to the cache root's single-file pruning.
|
|
27
|
+
*/
|
|
28
|
+
export declare function provenPluginSourceDigest(directory: string, projectRoot?: string, env?: NodeJS.ProcessEnv): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.provenPluginSourceDigest = provenPluginSourceDigest;
|
|
4
|
+
const PluginContentIdentities_1 = require("./PluginContentIdentities");
|
|
5
|
+
/**
|
|
6
|
+
* The `pluginSourceDigest` of a plugin source directory, proven from the
|
|
7
|
+
* records of `projectRoot`'s plugin cache when the caller names its project.
|
|
8
|
+
*
|
|
9
|
+
* WARNING (#1725): a consumer that proves a reported plugin-source state in a
|
|
10
|
+
* new process, such as a bundler worker, a capability host or the language
|
|
11
|
+
* server, read every source byte again because its own memo starts empty. The
|
|
12
|
+
* load that reported the state already recorded this digest
|
|
13
|
+
* (`PluginContentIdentities`), so a process that names the same project reuses
|
|
14
|
+
* it while the files' metadata still holds. Without a project, or when no store
|
|
15
|
+
* can be opened, the bytes are read as before.
|
|
16
|
+
*
|
|
17
|
+
* @param directory The source directory.
|
|
18
|
+
* @param projectRoot Project whose plugin cache root holds the records.
|
|
19
|
+
* @param env Environment selecting that cache root; this process's by default.
|
|
20
|
+
* @returns The digest, as lowercase hex.
|
|
21
|
+
* @throws When a listed source file cannot be read, as `pluginSourceDigest`
|
|
22
|
+
* does.
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation The record store applies its separable-signature rule to exactly the files the digest reads; every unproved premise falls back to the content reader.
|
|
24
|
+
* @evidence contracts/common.md#clear-and-simple-design Store opening and the population proof stay with PluginContentIdentities; this entry only names the project for consumers outside the loader.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No path, timestamp or process memo stands for content; the store refuses a root inside the source.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation The paragraphs state the regression, the reuse premise and the fallback.
|
|
27
|
+
* @evidence contracts/portability.md#os-neutral-implementation Cache-root selection and device-keyed references are delegated to the shared owners.
|
|
28
|
+
* @evidence contracts/performance.md#efficient-algorithms A proven digest stats the selected files; an unproven one also reads their bytes once. Opening the store writes two reference probes.
|
|
29
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The digest the load recorded is reused across processes under the same project's store.
|
|
30
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The store lives for this call; records belong to the cache root's single-file pruning.
|
|
31
|
+
*/
|
|
32
|
+
function provenPluginSourceDigest(directory, projectRoot, env = process.env) {
|
|
33
|
+
return PluginContentIdentities_1.PluginContentIdentities.sourceDirectory(projectRoot === undefined
|
|
34
|
+
? undefined
|
|
35
|
+
: PluginContentIdentities_1.PluginContentIdentities.open({
|
|
36
|
+
projectRoot,
|
|
37
|
+
env,
|
|
38
|
+
sources: [directory],
|
|
39
|
+
}), directory);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=provenPluginSourceDigest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenPluginSourceDigest.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/provenPluginSourceDigest.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,kCACE,SAAiB,EACjB,WAAoB,EACpB,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,OAAO,iDAAuB,CAAC,eAAe,CAC5C,WAAW,KAAK,SAAS;QACvB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,iDAAuB,CAAC,IAAI,CAAC;YAC3B,WAAW;YACX,GAAG;YACH,OAAO,EAAE,CAAC,SAAS,CAAC;SACrB,CAAC,EACN,SAAS,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -2,8 +2,9 @@ import type { IPluginCachePruneOptions } from "./IPluginCachePruneOptions";
|
|
|
2
2
|
/**
|
|
3
3
|
* Opportunistically bound a part of the cache root whose entries are single
|
|
4
4
|
* files: the descriptor evaluations under `descriptors/`, the capability
|
|
5
|
-
* answers under `capabilities/`,
|
|
6
|
-
* `
|
|
5
|
+
* answers under `capabilities/`, the plugin content identities under
|
|
6
|
+
* `identities/`, the plugin-load answers under `answers/`, and the lowered
|
|
7
|
+
* orphan sources under `ttsx-orphan/`.
|
|
7
8
|
*
|
|
8
9
|
* The policy is the plugin cache's (`CachePrunePolicy`). An entry's last use is
|
|
9
10
|
* its modification time: a write sets it, and every hit records a use by
|
|
@@ -11,8 +11,9 @@ const SourceBuildCacheLayout_1 = require("./SourceBuildCacheLayout");
|
|
|
11
11
|
/**
|
|
12
12
|
* Opportunistically bound a part of the cache root whose entries are single
|
|
13
13
|
* files: the descriptor evaluations under `descriptors/`, the capability
|
|
14
|
-
* answers under `capabilities/`,
|
|
15
|
-
* `
|
|
14
|
+
* answers under `capabilities/`, the plugin content identities under
|
|
15
|
+
* `identities/`, the plugin-load answers under `answers/`, and the lowered
|
|
16
|
+
* orphan sources under `ttsx-orphan/`.
|
|
16
17
|
*
|
|
17
18
|
* The policy is the plugin cache's (`CachePrunePolicy`). An entry's last use is
|
|
18
19
|
* its modification time: a write sets it, and every hit records a use by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pruneCacheFileRoot.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pruneCacheFileRoot.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,yDAAsD;AAEtD,qEAAkE;AAElE
|
|
1
|
+
{"version":3,"file":"pruneCacheFileRoot.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pruneCacheFileRoot.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,yDAAsD;AAEtD,qEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,4BACE,IAAY,EACZ,OAAO,GAAuD,EAAE;IAEhE,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,iBAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,cAAc,EAAE;YAAE,OAAO;QAC3D,IAAI,GAAG,+CAAsB,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,mBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,mCAAgB,CAAC,cAAc,CAAC,CAAC;QAChE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,+CAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7D,IACE,OAAO,CAAC,KAAK,KAAK,IAAI;YACtB,OAAO,KAAK,IAAI;YAChB,OAAO,IAAI,GAAG;YACd,GAAG,GAAG,OAAO,GAAG,mCAAgB,CAAC,cAAc;YAE/C,OAAO;QACT,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,mCAAgB,CAAC,SAAS,CAAC;QAChE,MAAM,cAAc,GAClB,OAAO,CAAC,cAAc,IAAI,mCAAgB,CAAC,gBAAgB,CAAC;QAC9D,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,mCAAgB,CAAC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,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,KAAK,mCAAgB,CAAC,cAAc;YACrE,SAAS;QACX,MAAM,IAAI,GAAG,mBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,iBAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBAAE,SAAS;YAC9B,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC;QAAC,MAAM,CAAC;YACP,sEAAsE;QACxE,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,+EAA+E;AAC/E,SAAS,WAAW,CAAC,IAAY;IAC/B,IAAI,CAAC;QACH,iBAAE,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACjC,OAAO,CAAC,iBAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,gEAAgE;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The version of this ttsc package, read from its own manifest once per
|
|
3
|
+
* process, or `"0.0.0"` when the manifest cannot be read or names none.
|
|
4
|
+
*
|
|
5
|
+
* WARNING (#1726): a reader that only needs ttsc's own version must take it
|
|
6
|
+
* here, never from `pluginBuildVersions`, which also resolves the project's
|
|
7
|
+
* `typescript` package. A plugin descriptor evaluator opens a record store
|
|
8
|
+
* while its module resolution recorder runs, and on a runtime whose
|
|
9
|
+
* `require.resolve` consults resolve hooks every such lookup became an input of
|
|
10
|
+
* the descriptor: absent `typescript` candidates below the cache root's
|
|
11
|
+
* ancestors, whose proofs the system temporary directory's metadata then
|
|
12
|
+
* withdrew. Reading a file here resolves no module.
|
|
13
|
+
*
|
|
14
|
+
* The host installation is assumed stable for the process lifetime; changing
|
|
15
|
+
* its manifest does not refresh the label.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/common.md#principled-implementation The label is this package's manifest version, the same value plugin keys and record identities have always named; an unreadable manifest yields the documented default instead of a guess.
|
|
18
|
+
* @evidence contracts/common.md#clear-and-simple-design One reader owns the host label; `pluginBuildVersions` composes it with the project's compiler version.
|
|
19
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The manifest beside the compiled module is read directly; no module resolution or fixture version stands in for it.
|
|
20
|
+
* @evidence contracts/common.md#meaningful-documentation The paragraphs state the value, the regression that motivates a resolution-free reader and the process-stable premise.
|
|
21
|
+
* @evidence contracts/portability.md#os-neutral-implementation The manifest path is joined with Node path APIs relative to this module, without separator or case assumptions.
|
|
22
|
+
* @evidence contracts/performance.md#efficient-algorithms The first call reads and parses one small manifest; later calls return the retained label.
|
|
23
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Every caller in the process shares one reading of an installation assumed stable for that process.
|
|
24
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources One label string is retained for the process lifetime; the synchronous read leaves no descriptor open.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ttscPackageVersion(): string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ttscPackageVersion = ttscPackageVersion;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
/**
|
|
10
|
+
* The version of this ttsc package, read from its own manifest once per
|
|
11
|
+
* process, or `"0.0.0"` when the manifest cannot be read or names none.
|
|
12
|
+
*
|
|
13
|
+
* WARNING (#1726): a reader that only needs ttsc's own version must take it
|
|
14
|
+
* here, never from `pluginBuildVersions`, which also resolves the project's
|
|
15
|
+
* `typescript` package. A plugin descriptor evaluator opens a record store
|
|
16
|
+
* while its module resolution recorder runs, and on a runtime whose
|
|
17
|
+
* `require.resolve` consults resolve hooks every such lookup became an input of
|
|
18
|
+
* the descriptor: absent `typescript` candidates below the cache root's
|
|
19
|
+
* ancestors, whose proofs the system temporary directory's metadata then
|
|
20
|
+
* withdrew. Reading a file here resolves no module.
|
|
21
|
+
*
|
|
22
|
+
* The host installation is assumed stable for the process lifetime; changing
|
|
23
|
+
* its manifest does not refresh the label.
|
|
24
|
+
*
|
|
25
|
+
* @evidence contracts/common.md#principled-implementation The label is this package's manifest version, the same value plugin keys and record identities have always named; an unreadable manifest yields the documented default instead of a guess.
|
|
26
|
+
* @evidence contracts/common.md#clear-and-simple-design One reader owns the host label; `pluginBuildVersions` composes it with the project's compiler version.
|
|
27
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The manifest beside the compiled module is read directly; no module resolution or fixture version stands in for it.
|
|
28
|
+
* @evidence contracts/common.md#meaningful-documentation The paragraphs state the value, the regression that motivates a resolution-free reader and the process-stable premise.
|
|
29
|
+
* @evidence contracts/portability.md#os-neutral-implementation The manifest path is joined with Node path APIs relative to this module, without separator or case assumptions.
|
|
30
|
+
* @evidence contracts/performance.md#efficient-algorithms The first call reads and parses one small manifest; later calls return the retained label.
|
|
31
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Every caller in the process shares one reading of an installation assumed stable for that process.
|
|
32
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources One label string is retained for the process lifetime; the synchronous read leaves no descriptor open.
|
|
33
|
+
*/
|
|
34
|
+
function ttscPackageVersion() {
|
|
35
|
+
if (version !== undefined)
|
|
36
|
+
return version;
|
|
37
|
+
try {
|
|
38
|
+
const manifest = JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.resolve(__dirname, "..", "..", "..", "..", "package.json"), "utf8"));
|
|
39
|
+
version = manifest.version ?? "0.0.0";
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
version = "0.0.0";
|
|
43
|
+
}
|
|
44
|
+
return version;
|
|
45
|
+
}
|
|
46
|
+
let version;
|
|
47
|
+
//# sourceMappingURL=ttscPackageVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ttscPackageVersion.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/ttscPackageVersion.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACE,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAC1C,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CACzB,iBAAE,CAAC,YAAY,CACb,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAC/D,MAAM,CACP,CACsB,CAAC;QAC1B,OAAO,GAAG,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,OAAO,CAAC;IACpB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,IAAI,OAA2B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ITtscCapabilityResolutionEntry } from "./ITtscCapabilityResolutionEntry";
|
|
2
2
|
import type { ITtscCapabilityResolutionPlugin } from "./ITtscCapabilityResolutionPlugin";
|
|
3
|
+
import { PluginContentIdentities } from "./source/PluginContentIdentities";
|
|
3
4
|
/**
|
|
4
5
|
* Record the answer and the state it was true for.
|
|
5
6
|
*
|
|
@@ -53,6 +54,11 @@ export declare function writeCapabilityResolution(options: {
|
|
|
53
54
|
env?: NodeJS.ProcessEnv;
|
|
54
55
|
/** Pre-load authority key; a moved evaluation authority refuses the write. */
|
|
55
56
|
expectedAuthority?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Record store of the project's plugin cache, which proves the runtime and
|
|
59
|
+
* the plugin sources and SDK from metadata instead of their bytes (#1725).
|
|
60
|
+
*/
|
|
61
|
+
identities?: PluginContentIdentities.Store;
|
|
56
62
|
}, answer: {
|
|
57
63
|
/**
|
|
58
64
|
* The evaluation-time content hash or unavailable null state reported by
|
|
@@ -10,8 +10,8 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
10
10
|
const SidecarEnvironment_1 = require("../../compiler/internal/sharedHost/SidecarEnvironment");
|
|
11
11
|
const E2ETrace_1 = require("../../internal/E2ETrace");
|
|
12
12
|
const CapabilityResolutionFormat_1 = require("./CapabilityResolutionFormat");
|
|
13
|
+
const PluginContentIdentities_1 = require("./source/PluginContentIdentities");
|
|
13
14
|
const SourceBuildCacheLayout_1 = require("./source/SourceBuildCacheLayout");
|
|
14
|
-
const pluginSourceDigest_1 = require("./source/pluginSourceDigest");
|
|
15
15
|
const pluginSourceFilesSignature_1 = require("./source/pluginSourceFilesSignature");
|
|
16
16
|
const pluginSourceState_1 = require("./source/pluginSourceState");
|
|
17
17
|
/**
|
|
@@ -116,7 +116,7 @@ function writeCapabilityResolution(options, answer) {
|
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
const evidence =
|
|
119
|
+
const evidence = PluginContentIdentities_1.PluginContentIdentities.sourceEvidence(PluginContentIdentities_1.PluginContentIdentities.mintReference(node_path_1.default.dirname(file)));
|
|
120
120
|
const entry = {
|
|
121
121
|
hostInputHashes,
|
|
122
122
|
hostInputRealpaths,
|
|
@@ -124,7 +124,7 @@ function writeCapabilityResolution(options, answer) {
|
|
|
124
124
|
manifest: answer.manifest,
|
|
125
125
|
pluginSources: Object.fromEntries(Object.entries(answer.pluginSources).map(([directory, state]) => [
|
|
126
126
|
directory,
|
|
127
|
-
recordPluginSource(directory, state, evidence),
|
|
127
|
+
recordPluginSource(directory, state, evidence, node_path_1.default.resolve(options.cwd), options.identities),
|
|
128
128
|
])),
|
|
129
129
|
plugins: answer.plugins.map((plugin) => ({
|
|
130
130
|
binary: plugin.binary,
|
|
@@ -173,18 +173,22 @@ function writeCapabilityResolution(options, answer) {
|
|
|
173
173
|
* when both signatures agree, every stamp was separable from a reference minted
|
|
174
174
|
* before the read, and the digest gives the very state the load reported, so
|
|
175
175
|
* the entry never vouches for sources the binary was not built from. Anything
|
|
176
|
-
* else records the state alone, which a read proves in full.
|
|
176
|
+
* else records the state alone, which a read proves in full. The digest comes
|
|
177
|
+
* from the project's record store when its metadata still holds there, which
|
|
178
|
+
* places it inside the same two signatures, so a new process does not read
|
|
179
|
+
* every source byte again (#1725).
|
|
177
180
|
*/
|
|
178
|
-
function recordPluginSource(directory, state, evidence) {
|
|
181
|
+
function recordPluginSource(directory, state, evidence, projectRoot, identities) {
|
|
179
182
|
try {
|
|
180
183
|
const before = (0, pluginSourceFilesSignature_1.pluginSourceFilesSignature)(directory, evidence);
|
|
181
|
-
const digest = (
|
|
184
|
+
const digest = PluginContentIdentities_1.PluginContentIdentities.sourceDirectory(identities, directory);
|
|
182
185
|
const after = (0, pluginSourceFilesSignature_1.pluginSourceFilesSignature)(directory, evidence);
|
|
183
186
|
if (before !== undefined &&
|
|
184
187
|
after !== undefined &&
|
|
185
188
|
before.signature === after.signature &&
|
|
186
189
|
after.separable &&
|
|
187
|
-
(0, pluginSourceState_1.pluginSourceState)(directory, { sourceDigest: digest }) ===
|
|
190
|
+
(0, pluginSourceState_1.pluginSourceState)(directory, { projectRoot, sourceDigest: digest }) ===
|
|
191
|
+
state) {
|
|
188
192
|
return { digest, signature: after.signature, state };
|
|
189
193
|
}
|
|
190
194
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeCapabilityResolution.js","sourceRoot":"","sources":["../../../src/plugin/internal/writeCapabilityResolution.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,8FAA2F;AAC3F,sDAAmD;AACnD,6EAA0E;AAI1E,4EAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"writeCapabilityResolution.js","sourceRoot":"","sources":["../../../src/plugin/internal/writeCapabilityResolution.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,8FAA2F;AAC3F,sDAAmD;AACnD,6EAA0E;AAI1E,8EAA2E;AAC3E,4EAAyE;AACzE,oFAAiF;AACjF,kEAA+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,mCACE,OAqBC,EACD,MA8BC;IAED,IAAI,IAAI,GAAG,uDAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9D,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,mBAAQ,CAAC,oBAAoB,CAAC,eAAe,EAAE;YAC7C,MAAM,EAAE,+BAA+B;SACxC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IACE,OAAO,CAAC,iBAAiB,KAAK,SAAS;QACvC,OAAO,CAAC,iBAAiB,KAAK,IAAI,EAClC,CAAC;QACD,mBAAQ,CAAC,oBAAoB,CAAC,eAAe,EAAE;YAC7C,IAAI;YACJ,MAAM,EAAE,mBAAmB;SAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,UAAU,GAAG;QACjB,GAAG,IAAI,GAAG,CACR,MAAM,C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