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
|
@@ -11,6 +11,7 @@ const GoEnvironmentReading_1 = require("./GoEnvironmentReading");
|
|
|
11
11
|
const GoSourceInputs_1 = require("./GoSourceInputs");
|
|
12
12
|
const GoToolResolution_1 = require("./GoToolResolution");
|
|
13
13
|
const PluginBuildEnvironmentWitness_1 = require("./PluginBuildEnvironmentWitness");
|
|
14
|
+
const PluginContentIdentities_1 = require("./PluginContentIdentities");
|
|
14
15
|
const spawnGoTool_1 = require("./spawnGoTool");
|
|
15
16
|
/**
|
|
16
17
|
* Hash the environment a plugin build is keyed on into `hash`: the Go
|
|
@@ -45,26 +46,29 @@ const spawnGoTool_1 = require("./spawnGoTool");
|
|
|
45
46
|
* variable carries: the Go tool, the Go environment file `go env -w` writes,
|
|
46
47
|
* the executables the C toolchain commands name, and GOROOT. A consumer that
|
|
47
48
|
* keeps the reading compares their metadata before reusing it.
|
|
49
|
+
* @param identities Record store that lets a new process prove the GOROOT
|
|
50
|
+
* corpus and executable bytes from their metadata (`PluginContentIdentities`,
|
|
51
|
+
* #1722); without it every process reads them.
|
|
48
52
|
* @evidence contracts/common.md#principled-implementation Fixed artifact flags, observed compiler bytes/version, selected reported-or-fallback build values, named command executables and selected SDK files enter the same framed identity used by source-state reporting. Fallback values and metadata-qualified reuse are explicit premises, not complete observation of arbitrary toolchain inputs.
|
|
49
53
|
* @evidence contracts/common.md#clear-and-simple-design Private helpers separate compiler identity, Go-reported settings, external variables and SDK content while sharing one hash sink and optional pre-read witness.
|
|
50
54
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Cache signatures include real identity/change metadata and effective invocation context; failed SDK witnessing refuses reuse rather than accepting a VERSION-only proxy.
|
|
51
55
|
* @evidence contracts/common.md#meaningful-documentation Native documentation names the input classes and witness purpose; private comments explain context-sensitive compiler memoization and SDK exclusions without treating a passing check as proof.
|
|
52
56
|
* @evidence contracts/portability.md#os-neutral-implementation Node path/stat/process APIs resolve native tool identities; platform-specific executable suffixes and environment lookup are isolated in GoToolResolution, and Go supplies its own effective build settings.
|
|
53
57
|
* @evidence contracts/performance.md#efficient-algorithms SDK traversal sorts reached entry names and selected file paths, performs native stat/realpath/link queries and serializes topology/metadata/path text. Matching manifests share aggregate hashes; changes read full selected files via the caller adapter, retaining file buffers with population/topology data. Compiler misses capture at most three complete version/byte readings when native metadata moves during a reading; only a stable attempt enters the memo. Go env can run up to three times for its file witness, and command tokens can each perform executable searches/full reads. Environment sorting/framing and command substring parsing also process name/value/command bytes; E/D/F/B alone do not capture native lookup or text comparison costs.
|
|
54
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Compiler memo identity includes selected path/file metadata and invocation cwd/environment; SDK aggregate reuse requires matching complete ordered metadata/topology.
|
|
55
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources Compiler, Go-environment-path and SDK maps retain historical distinct tool/context/root keys without eviction. SDK population/topology and full individual file reads contribute transient bytes; synchronous probes delegate process/capture lifetime to their owner and do not certify arbitrary descendants are gone. No independent entry/record/file/output byte ceiling is imposed here.
|
|
58
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Compiler memo identity includes selected path/file metadata and invocation cwd/environment; SDK aggregate reuse requires matching complete ordered metadata/topology. With a record store, a new process reuses the SDK aggregate and executable digests only while their signatures match the recorded ones and every stamp is separable from a freshly minted reference (#1722); `go version` and `go env` stay live because they report toolchain selection no file metadata shows. All of this relies on native metadata distinguishability and sequential observation premises. Physical directories expand once per selection policy while aliases retain edges; optional caller witnesses receive reached selected dependencies.
|
|
59
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Compiler, Go-environment-path and SDK maps retain historical distinct tool/context/root keys without eviction; persisted records belong to the single-file collector. SDK population/topology and full individual file reads contribute transient bytes; synchronous probes delegate process/capture lifetime to their owner and do not certify arbitrary descendants are gone. No independent entry/record/file/output byte ceiling is imposed here.
|
|
56
60
|
*/
|
|
57
|
-
function hashPluginBuildEnvironment(hash, goBinary, directory, env, filesystem, witness) {
|
|
61
|
+
function hashPluginBuildEnvironment(hash, goBinary, directory, env, filesystem, witness, identities) {
|
|
58
62
|
// Fixed artifact policy must invalidate binaries and reported source states
|
|
59
63
|
// together, including binaries cached before this policy was introduced.
|
|
60
64
|
hash.update(JSON.stringify(["source-build-flags", GoSourceInputs_1.GoSourceInputs.BUILD_FLAGS]));
|
|
61
65
|
if (goBinary !== undefined) {
|
|
62
66
|
hash.update(JSON.stringify([
|
|
63
67
|
"go",
|
|
64
|
-
resolveGoCompilerIdentity(goBinary, env, directory, witness),
|
|
68
|
+
resolveGoCompilerIdentity(goBinary, env, directory, witness, identities),
|
|
65
69
|
]));
|
|
66
70
|
}
|
|
67
|
-
hashGoBuildEnvironment(hash, goBinary, directory, env, filesystem, witness);
|
|
71
|
+
hashGoBuildEnvironment(hash, goBinary, directory, env, filesystem, witness, identities);
|
|
68
72
|
hashExternalGoBuildEnvironment(hash, env);
|
|
69
73
|
}
|
|
70
74
|
// Go build environment values that can change the produced binary or decide
|
|
@@ -155,7 +159,7 @@ const EXTERNAL_GO_BUILD_ENV_KEYS = [
|
|
|
155
159
|
// memo key includes that context so an environment-sensitive wrapper cannot
|
|
156
160
|
// lend its version result to another compiler invocation.
|
|
157
161
|
const goCompilerIdentityCache = new Map();
|
|
158
|
-
function resolveGoCompilerIdentity(goBinary, env = process.env, cwd = process.cwd(), witness) {
|
|
162
|
+
function resolveGoCompilerIdentity(goBinary, env = process.env, cwd = process.cwd(), witness, identities) {
|
|
159
163
|
const selected = GoToolResolution_1.GoToolResolution.resolveGoToolForBuild(goBinary, env, cwd, witness);
|
|
160
164
|
const resolved = process.platform === "win32"
|
|
161
165
|
? resolveRealPath(selected)
|
|
@@ -183,7 +187,7 @@ function resolveGoCompilerIdentity(goBinary, env = process.env, cwd = process.cw
|
|
|
183
187
|
const observed = new Map();
|
|
184
188
|
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.add(observed, resolved);
|
|
185
189
|
const memoKey = goCompilerIdentityMemoKey(goBinary, resolved, compilerEnv, cwd);
|
|
186
|
-
identity = computeGoCompilerIdentity(selected, resolved, compilerEnv, cwd);
|
|
190
|
+
identity = computeGoCompilerIdentity(selected, resolved, compilerEnv, cwd, identities);
|
|
187
191
|
if (!PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.holds(observed))
|
|
188
192
|
continue;
|
|
189
193
|
for (const [file, signature] of observed)
|
|
@@ -225,10 +229,12 @@ function goCompilerIdentityMemoKey(goBinary, resolved, env, cwd) {
|
|
|
225
229
|
return null;
|
|
226
230
|
}
|
|
227
231
|
}
|
|
228
|
-
function computeGoCompilerIdentity(goBinary, resolved, env, cwd) {
|
|
232
|
+
function computeGoCompilerIdentity(goBinary, resolved, env, cwd, identities) {
|
|
229
233
|
if (!node_fs_1.default.existsSync(resolved)) {
|
|
230
234
|
return "missing";
|
|
231
235
|
}
|
|
236
|
+
// `go version` stays a live probe: it answers which toolchain the effective
|
|
237
|
+
// environment selects (GOTOOLCHAIN, go.mod), which no file metadata shows.
|
|
232
238
|
const version = (0, spawnGoTool_1.spawnGoTool)(goBinary, ["version"], {
|
|
233
239
|
cwd,
|
|
234
240
|
encoding: "utf8",
|
|
@@ -238,9 +244,16 @@ function computeGoCompilerIdentity(goBinary, resolved, env, cwd) {
|
|
|
238
244
|
const versionText = version.error !== undefined
|
|
239
245
|
? (version.error.code ?? version.error.message)
|
|
240
246
|
: `${version.status ?? 0}:${version.stdout}${version.stderr}`;
|
|
241
|
-
const binaryHash =
|
|
247
|
+
const binaryHash = hashExecutable(resolved, identities);
|
|
242
248
|
return `sha256:${binaryHash}:${versionText}`;
|
|
243
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* The content digest of an executable, proven from its metadata in a process
|
|
252
|
+
* that has the record store (#1722) and read in full otherwise.
|
|
253
|
+
*/
|
|
254
|
+
function hashExecutable(file, identities) {
|
|
255
|
+
return PluginContentIdentities_1.PluginContentIdentities.digest(identities, "executable", file, (references) => PluginContentIdentities_1.PluginContentIdentities.fileObservation(references, file), () => hashFile(file));
|
|
256
|
+
}
|
|
244
257
|
function resolveExecutableIdentityPath(binary, env = process.env, cwd = process.cwd(), witness) {
|
|
245
258
|
const resolved = findExecutablePath(binary, env, cwd, witness);
|
|
246
259
|
return resolved === null ? binary : resolveRealPath(resolved);
|
|
@@ -282,8 +295,8 @@ function hashFile(file) {
|
|
|
282
295
|
hash.update(node_fs_1.default.readFileSync(file));
|
|
283
296
|
return hash.digest("hex");
|
|
284
297
|
}
|
|
285
|
-
function hashGoBuildEnvironment(hash, goBinary, cwd, env, filesystem, witness) {
|
|
286
|
-
const values = resolveGoBuildEnvironment(goBinary, cwd, env, filesystem, witness);
|
|
298
|
+
function hashGoBuildEnvironment(hash, goBinary, cwd, env, filesystem, witness, identities) {
|
|
299
|
+
const values = resolveGoBuildEnvironment(goBinary, cwd, env, filesystem, witness, identities);
|
|
287
300
|
for (const key of GO_BUILD_ENV_KEYS) {
|
|
288
301
|
const value = values.get(key);
|
|
289
302
|
if (value !== undefined && value !== "") {
|
|
@@ -291,16 +304,16 @@ function hashGoBuildEnvironment(hash, goBinary, cwd, env, filesystem, witness) {
|
|
|
291
304
|
}
|
|
292
305
|
}
|
|
293
306
|
}
|
|
294
|
-
function resolveGoBuildEnvironment(goBinary, cwd, env, filesystem, witness) {
|
|
307
|
+
function resolveGoBuildEnvironment(goBinary, cwd, env, filesystem, witness, identities) {
|
|
295
308
|
const values = new Map();
|
|
296
309
|
if (goBinary !== undefined) {
|
|
297
|
-
const parsed = GoEnvironmentReading_1.GoEnvironmentReading.read(goBinary, cwd, env, GO_BUILD_ENV_KEYS, witness);
|
|
310
|
+
const parsed = GoEnvironmentReading_1.GoEnvironmentReading.read(goBinary, cwd, env, GO_BUILD_ENV_KEYS, witness, identities);
|
|
298
311
|
if (parsed !== undefined) {
|
|
299
312
|
try {
|
|
300
313
|
for (const key of GO_BUILD_ENV_KEYS) {
|
|
301
314
|
const raw = parsed[key];
|
|
302
315
|
if (typeof raw === "string" && raw !== "") {
|
|
303
|
-
values.set(key, normalizeGoBuildEnvValue(key, raw, env, filesystem, witness));
|
|
316
|
+
values.set(key, normalizeGoBuildEnvValue(key, raw, env, filesystem, witness, identities));
|
|
304
317
|
}
|
|
305
318
|
}
|
|
306
319
|
}
|
|
@@ -315,22 +328,22 @@ function resolveGoBuildEnvironment(goBinary, cwd, env, filesystem, witness) {
|
|
|
315
328
|
continue;
|
|
316
329
|
const value = env[key];
|
|
317
330
|
if (value !== undefined && value !== "") {
|
|
318
|
-
values.set(key, normalizeGoBuildEnvValue(key, value, env, filesystem, witness));
|
|
331
|
+
values.set(key, normalizeGoBuildEnvValue(key, value, env, filesystem, witness, identities));
|
|
319
332
|
}
|
|
320
333
|
}
|
|
321
334
|
return values;
|
|
322
335
|
}
|
|
323
|
-
function normalizeGoBuildEnvValue(key, value, env, filesystem, witness) {
|
|
336
|
+
function normalizeGoBuildEnvValue(key, value, env, filesystem, witness, identities) {
|
|
324
337
|
if (key === "GOROOT") {
|
|
325
338
|
// Root/version observations also cover a missing SDK. The complete SDK
|
|
326
339
|
// manifest below witnesses contributing files and directories, including
|
|
327
340
|
// nested content changes that do not move the root or VERSION metadata.
|
|
328
341
|
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.add(witness, value);
|
|
329
342
|
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.add(witness, node_path_1.default.join(value, "VERSION"));
|
|
330
|
-
return resolveGoRootCacheIdentity(value, filesystem, witness);
|
|
343
|
+
return resolveGoRootCacheIdentity(value, filesystem, witness, identities);
|
|
331
344
|
}
|
|
332
345
|
if (GO_BUILD_COMMAND_ENV_KEYS.has(key)) {
|
|
333
|
-
return `${value}\0${resolveCommandCacheIdentity(value, env, witness)}`;
|
|
346
|
+
return `${value}\0${resolveCommandCacheIdentity(value, env, witness, identities)}`;
|
|
334
347
|
}
|
|
335
348
|
return value;
|
|
336
349
|
}
|
|
@@ -346,7 +359,7 @@ function normalizeGoBuildEnvValue(key, value, env, filesystem, witness) {
|
|
|
346
359
|
* which the key carries beside this identity. A program a launcher finds by its
|
|
347
360
|
* own means, not named in the command, is outside what the command can show.
|
|
348
361
|
*/
|
|
349
|
-
function resolveCommandCacheIdentity(command, env, witness) {
|
|
362
|
+
function resolveCommandCacheIdentity(command, env, witness, identities) {
|
|
350
363
|
const tokens = splitGoCommand(command);
|
|
351
364
|
if (tokens === null) {
|
|
352
365
|
return `command:unterminated:${command}`;
|
|
@@ -362,7 +375,7 @@ function resolveCommandCacheIdentity(command, env, witness) {
|
|
|
362
375
|
}
|
|
363
376
|
let identity;
|
|
364
377
|
try {
|
|
365
|
-
identity = `command:sha256:${
|
|
378
|
+
identity = `command:sha256:${hashExecutable(resolved, identities)}`;
|
|
366
379
|
}
|
|
367
380
|
catch {
|
|
368
381
|
return `command:unreadable:${resolved}`;
|
|
@@ -373,7 +386,7 @@ function resolveCommandCacheIdentity(command, env, witness) {
|
|
|
373
386
|
return;
|
|
374
387
|
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.add(witness, operand);
|
|
375
388
|
try {
|
|
376
|
-
identity += `;${index + 1}:sha256:${
|
|
389
|
+
identity += `;${index + 1}:sha256:${hashExecutable(operand, identities)}`;
|
|
377
390
|
}
|
|
378
391
|
catch {
|
|
379
392
|
identity += `;${index + 1}:unreadable:${operand}`;
|
|
@@ -426,14 +439,21 @@ function hashExternalGoBuildEnvironment(hash, env) {
|
|
|
426
439
|
// GOROOT is usually stable but its selected source/tool payloads contribute to
|
|
427
440
|
// every plugin key. Retain only the final aggregate
|
|
428
441
|
// identity, guarded by a fresh metadata/topology manifest on every call. A
|
|
429
|
-
// changed or incomplete manifest falls through to
|
|
442
|
+
// changed or incomplete manifest falls through to the record store, then to a
|
|
443
|
+
// full content read.
|
|
444
|
+
//
|
|
445
|
+
// WARNING (#1186, #1722): this map lives only as long as the process. #1186
|
|
446
|
+
// stopped at it, so every CLI launch, worker and bundler restart still read the
|
|
447
|
+
// whole SDK (3,723 files, 135 MB for the bundled toolchain). The record store
|
|
448
|
+
// below is what carries the identity across processes; never drop it in favor
|
|
449
|
+
// of this memo alone.
|
|
430
450
|
const goRootIdentityCache = new Map();
|
|
431
|
-
function resolveGoRootCacheIdentity(goRoot, filesystem, witness) {
|
|
451
|
+
function resolveGoRootCacheIdentity(goRoot, filesystem, witness, identities) {
|
|
432
452
|
const resolved = resolveRealPath(goRoot);
|
|
433
453
|
if (!node_fs_1.default.existsSync(resolved)) {
|
|
434
454
|
return `missing:${goRoot}`;
|
|
435
455
|
}
|
|
436
|
-
const snapshot = collectGoRootIdentitySnapshot(resolved, witness);
|
|
456
|
+
const snapshot = collectGoRootIdentitySnapshot(resolved, witness, identities?.references);
|
|
437
457
|
if (!snapshot.complete)
|
|
438
458
|
PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.refuse(witness, resolved);
|
|
439
459
|
if (snapshot.complete) {
|
|
@@ -442,15 +462,30 @@ function resolveGoRootCacheIdentity(goRoot, filesystem, witness) {
|
|
|
442
462
|
return cached.identity;
|
|
443
463
|
}
|
|
444
464
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
465
|
+
// The first observation is the snapshot the witness just recorded; a second
|
|
466
|
+
// one, after the content read, brackets that read for publication.
|
|
467
|
+
let observed = 0;
|
|
468
|
+
const identity = PluginContentIdentities_1.PluginContentIdentities.digest(snapshot.complete ? identities : undefined, "goroot", resolved, (references) => {
|
|
469
|
+
const current = observed++ === 0
|
|
470
|
+
? snapshot
|
|
471
|
+
: collectGoRootIdentitySnapshot(resolved, undefined, references);
|
|
472
|
+
return current.complete
|
|
473
|
+
? { separable: current.separable, signature: current.signature }
|
|
474
|
+
: undefined;
|
|
475
|
+
}, () => {
|
|
476
|
+
const hash = node_crypto_1.default.createHash("sha256");
|
|
477
|
+
hash.update(JSON.stringify(snapshot.topology));
|
|
478
|
+
for (const file of snapshot.files) {
|
|
479
|
+
const relative = node_path_1.default
|
|
480
|
+
.relative(resolved, file)
|
|
481
|
+
.split(node_path_1.default.sep)
|
|
482
|
+
.join("/");
|
|
483
|
+
const contents = filesystem.readFile(file);
|
|
484
|
+
hash.update(JSON.stringify([relative, contents.length]));
|
|
485
|
+
hash.update(contents);
|
|
486
|
+
}
|
|
487
|
+
return `sha256:${hash.digest("hex")}`;
|
|
488
|
+
});
|
|
454
489
|
if (snapshot.complete) {
|
|
455
490
|
goRootIdentityCache.set(resolved, {
|
|
456
491
|
identity,
|
|
@@ -459,9 +494,9 @@ function resolveGoRootCacheIdentity(goRoot, filesystem, witness) {
|
|
|
459
494
|
}
|
|
460
495
|
return identity;
|
|
461
496
|
}
|
|
462
|
-
function collectGoRootIdentitySnapshot(root, witness) {
|
|
497
|
+
function collectGoRootIdentitySnapshot(root, witness, references) {
|
|
463
498
|
const out = [];
|
|
464
|
-
const state = { complete: true };
|
|
499
|
+
const state = { complete: true, separable: references !== undefined };
|
|
465
500
|
const topology = [];
|
|
466
501
|
walkGoRootIdentity(root, out, topology, state, witness);
|
|
467
502
|
out.sort();
|
|
@@ -476,6 +511,9 @@ function collectGoRootIdentitySnapshot(root, witness) {
|
|
|
476
511
|
state.complete = false;
|
|
477
512
|
continue;
|
|
478
513
|
}
|
|
514
|
+
if (references === undefined ||
|
|
515
|
+
!PluginContentIdentities_1.PluginContentIdentities.separable(references, stats))
|
|
516
|
+
state.separable = false;
|
|
479
517
|
signature.update([
|
|
480
518
|
relative,
|
|
481
519
|
stats.dev,
|
|
@@ -496,6 +534,7 @@ function collectGoRootIdentitySnapshot(root, witness) {
|
|
|
496
534
|
files: out,
|
|
497
535
|
topology,
|
|
498
536
|
signature: signature.digest("hex"),
|
|
537
|
+
separable: state.separable,
|
|
499
538
|
};
|
|
500
539
|
}
|
|
501
540
|
function walkGoRootIdentity(root, out, topology, state, witness) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashPluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/hashPluginBuildEnvironment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,iEAA8D;AAC9D,qDAAkD;AAClD,yDAAsD;AACtD,mFAAgF;AAEhF,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;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"version":3,"file":"hashPluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/hashPluginBuildEnvironment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,iEAA8D;AAC9D,qDAAkD;AAClD,yDAAsD;AACtD,mFAAgF;AAChF,uEAAoE;AAEpE,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,oCACE,IAAuC,EACvC,QAA4B,EAC5B,SAAiB,EACjB,GAAsB,EACtB,UAA2C,EAC3C,OAA8C,EAC9C,UAA0C;IAE1C,4EAA4E;IAC5E,yEAAyE;IACzE,IAAI,CAAC,MAAM,CACT,IAAI,CAAC,SAAS,CAAC,CAAC,oBAAoB,EAAE,+BAAc,CAAC,WAAW,CAAC,CAAC,CACnE,CAAC;IACF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,CACT,IAAI,CAAC,SAAS,CAAC;YACb,IAAI;YACJ,yBAAyB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,EACT,OAAO,EACP,UAAU,CACX;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IACD,sBAAsB,CACpB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,EACH,UAAU,EACV,OAAO,EACP,UAAU,CACX,CAAC;IACF,8BAA8B,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED,4EAA4E;AAC5E,2EAA2E;AAC3E,kEAAkE;AAClE,MAAM,iBAAiB,GAAsB;IAC3C,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;IACX,QAAQ;IACR,SAAS;IACT,cAAc;IACd,WAAW;IACX,oBAAoB;IACpB,OAAO;IACP,cAAc;IACd,aAAa;IACb,IAAI;IACJ,IA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AK,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;IACxB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,IAAI,KAAK;YAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/D,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PluginBuildEnvironmentWitness } from "./PluginBuildEnvironmentWitness";
|
|
2
|
+
import type { PluginContentIdentities } from "./PluginContentIdentities";
|
|
2
3
|
/**
|
|
3
4
|
* The digest of the environment a plugin build in `directory` is keyed on: the
|
|
4
5
|
* Go compiler the build resolves there, the Go build environment `go env`
|
|
@@ -12,12 +13,16 @@ import type { PluginBuildEnvironmentWitness } from "./PluginBuildEnvironmentWitn
|
|
|
12
13
|
* GOROOT metadata. Witnessing a newly selected environment file can repeat the
|
|
13
14
|
* probe to observe it before reading. Compiler identity reuses a
|
|
14
15
|
* metadata-and-context memo; a changed SDK manifest rehashes all contributing
|
|
15
|
-
* content rather than only edited files.
|
|
16
|
+
* content rather than only edited files. A supplied record store lets a new
|
|
17
|
+
* process take the SDK and executable digests from records instead of their
|
|
18
|
+
* bytes, while `go env` and `go version` still run.
|
|
16
19
|
*
|
|
17
20
|
* @param directory The directory a build runs `go` in.
|
|
18
21
|
* @param env The effective environment, `process.env` by default.
|
|
19
22
|
* @param witness Receives the paths the reading depends on and no variable
|
|
20
23
|
* carries (`hashPluginBuildEnvironment`).
|
|
24
|
+
* @param identities Record store that lets a new process prove the SDK and
|
|
25
|
+
* executables from metadata (#1722).
|
|
21
26
|
* @evidence contracts/common.md#principled-implementation The digest uses the same resolved compiler and environment serializer as the binary key, so reported toolchain state denotes the inputs actually used by the build.
|
|
22
27
|
* @evidence contracts/common.md#clear-and-simple-design Compiler selection, executable resolution and hashing each stay with their owning helper; this function only composes one environment reading.
|
|
23
28
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts The result comes from real Go/environment inputs, not a fixed compiler version or a caller-specific substitute.
|
|
@@ -25,7 +30,7 @@ import type { PluginBuildEnvironmentWitness } from "./PluginBuildEnvironmentWitn
|
|
|
25
30
|
* @evidence contracts/portability.md#os-neutral-implementation Executable identity is resolved before probing, and Node filesystem/process boundaries implement native spelling rather than assuming Windows or POSIX paths are interchangeable.
|
|
26
31
|
* @evidence contracts/performance.md#efficient-algorithms The wrapper resolves the compiler/tool under the supplied environment before delegating full environment hashing. Native resolution/probes, SDK metadata/name/path sorting and changed-manifest full content reads contribute cost; the final hash output is fixed-width but streamed identity/input text and full-file buffers are not. No independent duplicate source-directory digest scan is added here.
|
|
27
32
|
*
|
|
28
|
-
* @
|
|
33
|
+
* @evidence contracts/performance.md#reuse-equivalent-work This is the fresh-reading boundary required by builds: the Go probes run on every call. Content digests of the SDK and executables are shared across processes only through the supplied record store's separable-signature proof; processPluginBuildEnvironment owns reuse of the whole reading when a consumer permits it.
|
|
29
34
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Its digest and filesystem adapter are call-local; retained compiler/content memo ownership belongs to the hasher.
|
|
30
35
|
*/
|
|
31
|
-
export declare function pluginBuildEnvironment(directory: string, env?: NodeJS.ProcessEnv, witness?: PluginBuildEnvironmentWitness.Record): string;
|
|
36
|
+
export declare function pluginBuildEnvironment(directory: string, env?: NodeJS.ProcessEnv, witness?: PluginBuildEnvironmentWitness.Record, identities?: PluginContentIdentities.Store): string;
|
|
@@ -22,12 +22,16 @@ const resolveGoCompiler_1 = require("./resolveGoCompiler");
|
|
|
22
22
|
* GOROOT metadata. Witnessing a newly selected environment file can repeat the
|
|
23
23
|
* probe to observe it before reading. Compiler identity reuses a
|
|
24
24
|
* metadata-and-context memo; a changed SDK manifest rehashes all contributing
|
|
25
|
-
* content rather than only edited files.
|
|
25
|
+
* content rather than only edited files. A supplied record store lets a new
|
|
26
|
+
* process take the SDK and executable digests from records instead of their
|
|
27
|
+
* bytes, while `go env` and `go version` still run.
|
|
26
28
|
*
|
|
27
29
|
* @param directory The directory a build runs `go` in.
|
|
28
30
|
* @param env The effective environment, `process.env` by default.
|
|
29
31
|
* @param witness Receives the paths the reading depends on and no variable
|
|
30
32
|
* carries (`hashPluginBuildEnvironment`).
|
|
33
|
+
* @param identities Record store that lets a new process prove the SDK and
|
|
34
|
+
* executables from metadata (#1722).
|
|
31
35
|
* @evidence contracts/common.md#principled-implementation The digest uses the same resolved compiler and environment serializer as the binary key, so reported toolchain state denotes the inputs actually used by the build.
|
|
32
36
|
* @evidence contracts/common.md#clear-and-simple-design Compiler selection, executable resolution and hashing each stay with their owning helper; this function only composes one environment reading.
|
|
33
37
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts The result comes from real Go/environment inputs, not a fixed compiler version or a caller-specific substitute.
|
|
@@ -35,13 +39,13 @@ const resolveGoCompiler_1 = require("./resolveGoCompiler");
|
|
|
35
39
|
* @evidence contracts/portability.md#os-neutral-implementation Executable identity is resolved before probing, and Node filesystem/process boundaries implement native spelling rather than assuming Windows or POSIX paths are interchangeable.
|
|
36
40
|
* @evidence contracts/performance.md#efficient-algorithms The wrapper resolves the compiler/tool under the supplied environment before delegating full environment hashing. Native resolution/probes, SDK metadata/name/path sorting and changed-manifest full content reads contribute cost; the final hash output is fixed-width but streamed identity/input text and full-file buffers are not. No independent duplicate source-directory digest scan is added here.
|
|
37
41
|
*
|
|
38
|
-
* @
|
|
42
|
+
* @evidence contracts/performance.md#reuse-equivalent-work This is the fresh-reading boundary required by builds: the Go probes run on every call. Content digests of the SDK and executables are shared across processes only through the supplied record store's separable-signature proof; processPluginBuildEnvironment owns reuse of the whole reading when a consumer permits it.
|
|
39
43
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Its digest and filesystem adapter are call-local; retained compiler/content memo ownership belongs to the hasher.
|
|
40
44
|
*/
|
|
41
|
-
function pluginBuildEnvironment(directory, env = process.env, witness) {
|
|
45
|
+
function pluginBuildEnvironment(directory, env = process.env, witness, identities) {
|
|
42
46
|
const goBinary = GoToolResolution_1.GoToolResolution.resolveGoToolForBuild((0, resolveGoCompiler_1.resolveGoCompiler)(env).binary, env, directory, witness);
|
|
43
47
|
const hash = node_crypto_1.default.createHash("sha256");
|
|
44
|
-
(0, hashPluginBuildEnvironment_1.hashPluginBuildEnvironment)(hash, goBinary, directory, env, { readFile: (location) => node_fs_1.default.readFileSync(location) }, witness);
|
|
48
|
+
(0, hashPluginBuildEnvironment_1.hashPluginBuildEnvironment)(hash, goBinary, directory, env, { readFile: (location) => node_fs_1.default.readFileSync(location) }, witness, identities);
|
|
45
49
|
return hash.digest("hex");
|
|
46
50
|
}
|
|
47
51
|
//# sourceMappingURL=pluginBuildEnvironment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginBuildEnvironment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AAEzB,yDAAsD;
|
|
1
|
+
{"version":3,"file":"pluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginBuildEnvironment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AAEzB,yDAAsD;AAGtD,6EAA0E;AAC1E,2DAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,gCACE,SAAiB,EACjB,GAAG,GAAsB,OAAO,CAAC,GAAG,EACpC,OAA8C,EAC9C,UAA0C;IAE1C,MAAM,QAAQ,GAAG,mCAAgB,CAAC,qBAAqB,CACrD,IAAA,qCAAiB,EAAC,GAAG,CAAC,CAAC,MAAM,EAC7B,GAAG,EACH,SAAS,EACT,OAAO,CACR,CAAC;IACF,MAAM,IAAI,GAAG,qBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAA,uDAA0B,EACxB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,EACH,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,iBAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,EACrD,OAAO,EACP,UAAU,CACX,CAAC;IACF,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -2,18 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
4
4
|
const serializeCompilerError_1 = require("../../../internal/serializeCompilerError");
|
|
5
|
+
const PluginContentIdentities_1 = require("./PluginContentIdentities");
|
|
5
6
|
const pluginBuildEnvironment_1 = require("./pluginBuildEnvironment");
|
|
6
7
|
/**
|
|
7
8
|
* Observe one requested native toolchain environment on the exclusive worker.
|
|
8
9
|
* Explicit environment values reach every Go/toolchain reader; no caller
|
|
9
10
|
* process globals are written. Only actual readings and pre-read witnesses
|
|
10
|
-
* cross the worker boundary, and failures retain their real error details.
|
|
11
|
+
* cross the worker boundary, and failures retain their real error details. A
|
|
12
|
+
* request that names its project lets this isolate prove the SDK and the
|
|
13
|
+
* executables from the plugin cache's records instead of their bytes (#1722).
|
|
11
14
|
*/
|
|
12
15
|
node_worker_threads_1.parentPort?.on("message", (request) => {
|
|
13
16
|
try {
|
|
14
17
|
const witness = new Map();
|
|
18
|
+
const identities = request.projectRoot === undefined
|
|
19
|
+
? undefined
|
|
20
|
+
: PluginContentIdentities_1.PluginContentIdentities.open({
|
|
21
|
+
projectRoot: request.projectRoot,
|
|
22
|
+
env: request.env,
|
|
23
|
+
sources: [request.directory],
|
|
24
|
+
});
|
|
15
25
|
node_worker_threads_1.parentPort.postMessage({
|
|
16
|
-
environment: (0, pluginBuildEnvironment_1.pluginBuildEnvironment)(request.directory, request.env, witness),
|
|
26
|
+
environment: (0, pluginBuildEnvironment_1.pluginBuildEnvironment)(request.directory, request.env, witness, identities),
|
|
17
27
|
witness,
|
|
18
28
|
});
|
|
19
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginBuildEnvironmentWorker.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginBuildEnvironmentWorker.ts"],"names":[],"mappings":";;AAAA,6DAAiD;AAEjD,qFAAkF;AAElF,qEAAkE;AAElE
|
|
1
|
+
{"version":3,"file":"pluginBuildEnvironmentWorker.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginBuildEnvironmentWorker.ts"],"names":[],"mappings":";;AAAA,6DAAiD;AAEjD,qFAAkF;AAElF,uEAAoE;AACpE,qEAAkE;AAElE;;;;;;;GAOG;AACH,gCAAU,EAAE,EAAE,CACZ,SAAS,EACT,CAAC,OAIA,EAAE,EAAE;IACH,IAAI,CAAC;QACH,MAAM,OAAO,GAAyC,IAAI,GAAG,EAAE,CAAC;QAChE,MAAM,UAAU,GACd,OAAO,CAAC,WAAW,KAAK,SAAS;YAC/B,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,iDAAuB,CAAC,IAAI,CAAC;gBAC3B,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,OAAO,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;aAC7B,CAAC,CAAC;QACT,gCAAW,CAAC,WAAW,CAAC;YACtB,WAAW,EAAE,IAAA,+CAAsB,EACjC,OAAO,CAAC,SAAS,EACjB,OAAO,CAAC,GAAG,EACX,OAAO,EACP,UAAU,CACX;YACD,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,gCAAW,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,IAAA,+CAAsB,EAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrE,CAAC;AACH,CAAC,CACF,CAAC"}
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* @param projectRoot The project base used to resolve
|
|
18
18
|
* `typescript/package.json`.
|
|
19
19
|
* @evidence contracts/common.md#principled-implementation Package-version labels supply the same metadata tuple used by plugin keys; absent/unreadable metadata receives the documented unknown/default label rather than an executable identity certificate.
|
|
20
|
-
* @evidence contracts/common.md#clear-and-simple-design
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design The host label comes from its own owner (`ttscPackageVersion`), which a reader needing only that label calls without this function's project resolution; the project-version reader is separate because project resolution varies per call.
|
|
21
21
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Node package resolution determines the actual project dependency; no particular project or fixture version is embedded.
|
|
22
22
|
* @evidence contracts/common.md#meaningful-documentation Native prose explains persisted-output consumers, metadata fallbacks and the process-stable host premise without claiming that version labels establish executable or output equivalence.
|
|
23
23
|
* @evidence contracts/portability.md#os-neutral-implementation Node createRequire and path APIs locate package metadata using native module resolution without manual separator or case normalization.
|
|
24
24
|
* @evidence contracts/performance.md#efficient-algorithms Each call performs project package resolution and, when successful, reads/parses its manifest bytes; module search/path work and metadata size are not fixed by one logical manifest lookup. The host manifest is attempted only on the first invocation, including native path and JSON costs.
|
|
25
25
|
* @evidence contracts/performance.md#reuse-equivalent-work All callers share the host installation's process-stable version; the project compiler version is resolved afresh so different project roots do not share a false identity.
|
|
26
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
26
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The host-version owner retains one label for the process lifetime, whose text follows its manifest value rather than a fixed byte limit; the retained label count is independent of project count. Native module-resolution caches belong to Node, and synchronous file reads leave no persistent descriptor here.
|
|
27
27
|
*/
|
|
28
28
|
export declare function pluginBuildVersions(projectRoot: string): {
|
|
29
29
|
tsgo: string;
|
|
@@ -7,6 +7,7 @@ exports.pluginBuildVersions = pluginBuildVersions;
|
|
|
7
7
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
8
|
const node_module_1 = require("node:module");
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
const ttscPackageVersion_1 = require("./ttscPackageVersion");
|
|
10
11
|
/**
|
|
11
12
|
* Package-version labels used by plugin build keys (`computeCacheKey`) and
|
|
12
13
|
* persisted transform identities. These are metadata inputs, not a measurement
|
|
@@ -26,30 +27,16 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
26
27
|
* @param projectRoot The project base used to resolve
|
|
27
28
|
* `typescript/package.json`.
|
|
28
29
|
* @evidence contracts/common.md#principled-implementation Package-version labels supply the same metadata tuple used by plugin keys; absent/unreadable metadata receives the documented unknown/default label rather than an executable identity certificate.
|
|
29
|
-
* @evidence contracts/common.md#clear-and-simple-design
|
|
30
|
+
* @evidence contracts/common.md#clear-and-simple-design The host label comes from its own owner (`ttscPackageVersion`), which a reader needing only that label calls without this function's project resolution; the project-version reader is separate because project resolution varies per call.
|
|
30
31
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Node package resolution determines the actual project dependency; no particular project or fixture version is embedded.
|
|
31
32
|
* @evidence contracts/common.md#meaningful-documentation Native prose explains persisted-output consumers, metadata fallbacks and the process-stable host premise without claiming that version labels establish executable or output equivalence.
|
|
32
33
|
* @evidence contracts/portability.md#os-neutral-implementation Node createRequire and path APIs locate package metadata using native module resolution without manual separator or case normalization.
|
|
33
34
|
* @evidence contracts/performance.md#efficient-algorithms Each call performs project package resolution and, when successful, reads/parses its manifest bytes; module search/path work and metadata size are not fixed by one logical manifest lookup. The host manifest is attempted only on the first invocation, including native path and JSON costs.
|
|
34
35
|
* @evidence contracts/performance.md#reuse-equivalent-work All callers share the host installation's process-stable version; the project compiler version is resolved afresh so different project roots do not share a false identity.
|
|
35
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
36
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The host-version owner retains one label for the process lifetime, whose text follows its manifest value rather than a fixed byte limit; the retained label count is independent of project count. Native module-resolution caches belong to Node, and synchronous file reads leave no persistent descriptor here.
|
|
36
37
|
*/
|
|
37
38
|
function pluginBuildVersions(projectRoot) {
|
|
38
|
-
return { tsgo: readTsgoVersion(projectRoot), ttsc:
|
|
39
|
-
}
|
|
40
|
-
let cachedTtscVersion = null;
|
|
41
|
-
function readTtscVersion() {
|
|
42
|
-
if (cachedTtscVersion !== null)
|
|
43
|
-
return cachedTtscVersion;
|
|
44
|
-
try {
|
|
45
|
-
const file = node_path_1.default.resolve(__dirname, "..", "..", "..", "..", "package.json");
|
|
46
|
-
const pkg = JSON.parse(node_fs_1.default.readFileSync(file, "utf8"));
|
|
47
|
-
cachedTtscVersion = pkg.version ?? "0.0.0";
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
cachedTtscVersion = "0.0.0";
|
|
51
|
-
}
|
|
52
|
-
return cachedTtscVersion;
|
|
39
|
+
return { tsgo: readTsgoVersion(projectRoot), ttsc: (0, ttscPackageVersion_1.ttscPackageVersion)() };
|
|
53
40
|
}
|
|
54
41
|
function readTsgoVersion(projectRoot) {
|
|
55
42
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginBuildVersions.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginBuildVersions.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,6CAA4C;AAC5C,0DAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,6BAAoC,WAAmB;IAIrD,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"pluginBuildVersions.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginBuildVersions.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,6CAA4C;AAC5C,0DAA6B;AAE7B,6DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,6BAAoC,WAAmB;IAIrD,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAA,uCAAkB,GAAE,EAAE,CAAC;AAC5E,CAAC;AAED,SAAS,eAAe,CAAC,WAAmB;IAC1C,IAAI,CAAC;QACH,MAAM,cAAc,GAAG,IAAA,2BAAa,EAClC,mBAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CACvC,CAAC;QACF,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QAClE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAEtD,CAAC;QACF,OAAO,GAAG,CAAC,OAAO,IAAI,SAAS,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
* process's own environment the environment is read once per directory and set
|
|
20
20
|
* of variables (`processPluginBuildEnvironment`), and a proof that must not
|
|
21
21
|
* accept a stale one compares through `pluginSourceStateHolds`, which reads it
|
|
22
|
-
* again before it refutes a state.
|
|
22
|
+
* again before it refutes a state. A caller that names its project proves the
|
|
23
|
+
* sources and the SDK from that project's plugin cache records instead of
|
|
24
|
+
* reading them in every new process (#1725).
|
|
23
25
|
*
|
|
24
26
|
* @param directory The source directory.
|
|
25
27
|
* @param options.env An effective environment other than this process's, which
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
* caller already read it.
|
|
29
31
|
* @param options.environment The directory's `pluginBuildEnvironment`, when the
|
|
30
32
|
* caller already read it, as a plugin build's key does.
|
|
33
|
+
* @param options.projectRoot Project whose plugin cache root holds the records.
|
|
31
34
|
* @returns The state, as lowercase hex.
|
|
32
35
|
* @throws When a listed source file cannot be read, as the build itself would.
|
|
33
36
|
* @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.
|
|
@@ -36,12 +39,13 @@
|
|
|
36
39
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain module-root versus overlay environment meaning and the provenance required for supplied digests.
|
|
37
40
|
* @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.
|
|
38
41
|
* @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.
|
|
39
|
-
* @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.
|
|
42
|
+
* @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.
|
|
40
43
|
*
|
|
41
44
|
* @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.
|
|
42
45
|
*/
|
|
43
46
|
export declare function pluginSourceState(directory: string, options?: {
|
|
44
47
|
env?: NodeJS.ProcessEnv;
|
|
45
48
|
environment?: string;
|
|
49
|
+
projectRoot?: string;
|
|
46
50
|
sourceDigest?: string;
|
|
47
51
|
}): string;
|