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
|
@@ -0,0 +1,128 @@
|
|
|
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.PluginLoadAnswers = void 0;
|
|
7
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
const E2ETrace_1 = require("../../../internal/E2ETrace");
|
|
11
|
+
const SourceBuildCacheLayout_1 = require("./SourceBuildCacheLayout");
|
|
12
|
+
const recordCacheFileUse_1 = require("./recordCacheFileUse");
|
|
13
|
+
/**
|
|
14
|
+
* Answers a plugin load computed from inputs it could identify by content, kept
|
|
15
|
+
* in the plugin cache root under that identity so a later process with equal
|
|
16
|
+
* inputs reads the answer instead of computing it again.
|
|
17
|
+
*
|
|
18
|
+
* WARNING (#1721, #1723): the key is the whole proof. A caller must fold into
|
|
19
|
+
* `identity` every input that can change the answer, as content identities
|
|
20
|
+
* (`PluginContentIdentities`) or the authoritative live probe results, never a
|
|
21
|
+
* path, a timestamp or a value it merely expects to be stable. An answer is
|
|
22
|
+
* written only after the computation succeeded on inputs the caller proved
|
|
23
|
+
* unchanged around it; a failed or unproved computation is never recorded,
|
|
24
|
+
* since a later process could not tell it from a current one.
|
|
25
|
+
*
|
|
26
|
+
* Entries are single files published by rename, aged out by the single-file
|
|
27
|
+
* collector and removed by `ttsc clean`. Their identity includes the format tag
|
|
28
|
+
* and the ttsc version, so another release never reads them.
|
|
29
|
+
*
|
|
30
|
+
* @evidence contracts/common.md#principled-implementation The content-addressed key carries every caller-declared input identity; reads accept only a matching format, version and kind, and writes are refused for unproved computations by the caller contract.
|
|
31
|
+
* @evidence contracts/common.md#clear-and-simple-design One owner stores and loads opaque answers; callers own key composition, validation of the answer shape and the decision to record.
|
|
32
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No answer is guessed; a missing, corrupt or foreign entry is a miss and the caller computes.
|
|
33
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs state the key contract that prevents stale answers, the recording rule and the storage lifetime.
|
|
34
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path joins and same-directory rename publication; keys are hashed text, independent of path dialect.
|
|
35
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms Members state their own costs.
|
|
36
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Members define reuse through the caller's identity.
|
|
37
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Members state retention; the namespace holds no state.
|
|
38
|
+
*/
|
|
39
|
+
var PluginLoadAnswers;
|
|
40
|
+
(function (PluginLoadAnswers) {
|
|
41
|
+
/**
|
|
42
|
+
* The answer recorded for `identity`, or `undefined` when none is.
|
|
43
|
+
*
|
|
44
|
+
* @param store The opened store, or `undefined` for no persistence.
|
|
45
|
+
* @param kind Answer family; families never share entries.
|
|
46
|
+
* @param identity Every input identity the answer depends on.
|
|
47
|
+
* @evidence contracts/common.md#principled-implementation An entry is returned only for the same format, version, kind and identity hash; the caller validates the value's shape.
|
|
48
|
+
* @evidence contracts/common.md#clear-and-simple-design One lookup returns an opaque value or undefined.
|
|
49
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unreadable or foreign entries are misses.
|
|
50
|
+
* @evidence contracts/common.md#meaningful-documentation Parameters describe the identity contract.
|
|
51
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path join and file read.
|
|
52
|
+
* @evidence contracts/performance.md#efficient-algorithms Hashes the serialized identity and reads one small file; a hit refreshes its use time.
|
|
53
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Processes share an answer only for an identical serialized identity under the same version.
|
|
54
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Nothing is retained in memory; the collector owns entry lifetime.
|
|
55
|
+
*/
|
|
56
|
+
function read(store, kind, identity) {
|
|
57
|
+
if (store === undefined)
|
|
58
|
+
return undefined;
|
|
59
|
+
const file = answerFile(store, kind, identity);
|
|
60
|
+
try {
|
|
61
|
+
const entry = JSON.parse(node_fs_1.default.readFileSync(file, "utf8"));
|
|
62
|
+
if (entry.format !== FORMAT ||
|
|
63
|
+
entry.version !== store.version ||
|
|
64
|
+
entry.kind !== kind ||
|
|
65
|
+
!Object.prototype.hasOwnProperty.call(entry, "value"))
|
|
66
|
+
return undefined;
|
|
67
|
+
(0, recordCacheFileUse_1.recordCacheFileUse)(file);
|
|
68
|
+
E2ETrace_1.E2ETrace.capabilityResolution("plugin-load-answer", {
|
|
69
|
+
kind,
|
|
70
|
+
outcome: "reused",
|
|
71
|
+
});
|
|
72
|
+
return entry.value;
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
PluginLoadAnswers.read = read;
|
|
79
|
+
/**
|
|
80
|
+
* Record `value` as the answer for `identity`. Failures are ignored: the
|
|
81
|
+
* answer just computed stands, and the next process computes it again.
|
|
82
|
+
*
|
|
83
|
+
* @param store The opened store, or `undefined` for no persistence.
|
|
84
|
+
* @param kind Answer family.
|
|
85
|
+
* @param identity Every input identity the answer depends on.
|
|
86
|
+
* @param value JSON-serializable answer the caller proved for `identity`.
|
|
87
|
+
* @evidence contracts/common.md#principled-implementation Publication happens only when the caller decided the computation was proven; the entry records the same identity framing that read checks.
|
|
88
|
+
* @evidence contracts/common.md#clear-and-simple-design One atomic publication through the shared metadata writer.
|
|
89
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A failed write never fails the load or fabricates an entry.
|
|
90
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose states failure behavior.
|
|
91
|
+
* @evidence contracts/portability.md#os-neutral-implementation Same-directory staging and rename through the shared writer.
|
|
92
|
+
* @evidence contracts/performance.md#efficient-algorithms Serializes the identity and value once and writes one small file.
|
|
93
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Publication creates the reusable entry; read owns reuse.
|
|
94
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources One file per identity, removed by the single-file collector or `ttsc clean`; staging cleanup belongs to the shared writer.
|
|
95
|
+
*/
|
|
96
|
+
function write(store, kind, identity, value) {
|
|
97
|
+
if (store === undefined)
|
|
98
|
+
return;
|
|
99
|
+
const file = answerFile(store, kind, identity);
|
|
100
|
+
try {
|
|
101
|
+
node_fs_1.default.mkdirSync(node_path_1.default.dirname(file), { recursive: true });
|
|
102
|
+
SourceBuildCacheLayout_1.SourceBuildCacheLayout.replaceCacheMetadataFile(file, JSON.stringify({
|
|
103
|
+
format: FORMAT,
|
|
104
|
+
version: store.version,
|
|
105
|
+
kind,
|
|
106
|
+
value,
|
|
107
|
+
}));
|
|
108
|
+
E2ETrace_1.E2ETrace.capabilityResolution("plugin-load-answer", {
|
|
109
|
+
kind,
|
|
110
|
+
outcome: "recorded",
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// The answer just computed stands; only its reuse is lost.
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
PluginLoadAnswers.write = write;
|
|
118
|
+
/** Entry format tag; move it when the entry shape changes. */
|
|
119
|
+
const FORMAT = "ttsc-plugin-load-answer-v1";
|
|
120
|
+
function answerFile(store, kind, identity) {
|
|
121
|
+
const key = node_crypto_1.default
|
|
122
|
+
.createHash("sha256")
|
|
123
|
+
.update(JSON.stringify([FORMAT, store.version, kind, identity]))
|
|
124
|
+
.digest("hex");
|
|
125
|
+
return node_path_1.default.join(store.root, SourceBuildCacheLayout_1.SourceBuildCacheLayout.ANSWER_CACHE_DIRNAME, `${key}.json`);
|
|
126
|
+
}
|
|
127
|
+
})(PluginLoadAnswers || (exports.PluginLoadAnswers = PluginLoadAnswers = {}));
|
|
128
|
+
//# sourceMappingURL=PluginLoadAnswers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginLoadAnswers.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/PluginLoadAnswers.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,yDAAsD;AAEtD,qEAAkE;AAClE,6DAA0D;AAE1D;;;;;;;;;;;;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I,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACtD,+CAAsB,CAAC,wBAAwB,CAC7C,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,IAAI;gBACJ,KAAK;aACW,CAAC,CACpB,CAAC;YACF,mBAAQ,CAAC,oBAAoB,CAAC,oBAAoB,EAAE;gBAClD,IAAI;gBACJ,OAAO,EAAE,UAAU;aACpB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,2DAA2D;QAC7D,CAAC;IACH,CAAC;IA1Be,kBAAA,KAAK,QA0BpB,CAAA;IAED,8DAA8D;IAC9D,MAAM,MAAM,GAAG,4BAA4B,CAAC;IAS5C,SAAS,UAAU,CACjB,KAAoC,EACpC,IAAY,EACZ,QAAiB;QAEjB,MAAM,GAAG,GAAG,qBAAM;aACf,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;aAC/D,MAAM,CAAC,KAAK,CAAC,CAAC;QACjB,OAAO,mBAAI,CAAC,IAAI,CACd,KAAK,CAAC,IAAI,EACV,+CAAsB,CAAC,oBAAoB,EAC3C,GAAG,GAAG,OAAO,CACd,CAAC;IACJ,CAAC;AACH,CAAC,EAnHgB,iBAAiB,aAAjB,iBAAiB,GAAjB,iBAAiB,QAmHjC"}
|
|
@@ -36,6 +36,16 @@ export declare namespace SourceBuildCacheLayout {
|
|
|
36
36
|
const DESCRIPTOR_CACHE_DIRNAME = "descriptors";
|
|
37
37
|
/** Directory of the capability-resolution answers inside the cache root. */
|
|
38
38
|
const CAPABILITY_CACHE_DIRNAME = "capabilities";
|
|
39
|
+
/**
|
|
40
|
+
* Directory of the content identities a plugin load proves from metadata
|
|
41
|
+
* (`PluginContentIdentities`) inside the cache root.
|
|
42
|
+
*/
|
|
43
|
+
const IDENTITY_CACHE_DIRNAME = "identities";
|
|
44
|
+
/**
|
|
45
|
+
* Directory of the plugin-load answers keyed by those identities, such as Go
|
|
46
|
+
* package selections and runtime capabilities (`PluginLoadAnswers`).
|
|
47
|
+
*/
|
|
48
|
+
const ANSWER_CACHE_DIRNAME = "answers";
|
|
39
49
|
/** Directory of the ttsx runtime inside the cache root. */
|
|
40
50
|
const RUNTIME_CACHE_DIRNAME = "ttsx";
|
|
41
51
|
/**
|
|
@@ -50,6 +50,16 @@ var SourceBuildCacheLayout;
|
|
|
50
50
|
SourceBuildCacheLayout.DESCRIPTOR_CACHE_DIRNAME = "descriptors";
|
|
51
51
|
/** Directory of the capability-resolution answers inside the cache root. */
|
|
52
52
|
SourceBuildCacheLayout.CAPABILITY_CACHE_DIRNAME = "capabilities";
|
|
53
|
+
/**
|
|
54
|
+
* Directory of the content identities a plugin load proves from metadata
|
|
55
|
+
* (`PluginContentIdentities`) inside the cache root.
|
|
56
|
+
*/
|
|
57
|
+
SourceBuildCacheLayout.IDENTITY_CACHE_DIRNAME = "identities";
|
|
58
|
+
/**
|
|
59
|
+
* Directory of the plugin-load answers keyed by those identities, such as Go
|
|
60
|
+
* package selections and runtime capabilities (`PluginLoadAnswers`).
|
|
61
|
+
*/
|
|
62
|
+
SourceBuildCacheLayout.ANSWER_CACHE_DIRNAME = "answers";
|
|
53
63
|
/** Directory of the ttsx runtime inside the cache root. */
|
|
54
64
|
SourceBuildCacheLayout.RUNTIME_CACHE_DIRNAME = "ttsx";
|
|
55
65
|
/**
|
|
@@ -66,6 +76,8 @@ var SourceBuildCacheLayout;
|
|
|
66
76
|
SourceBuildCacheLayout.CACHE_FILE_DIRNAMES = [
|
|
67
77
|
SourceBuildCacheLayout.DESCRIPTOR_CACHE_DIRNAME,
|
|
68
78
|
SourceBuildCacheLayout.CAPABILITY_CACHE_DIRNAME,
|
|
79
|
+
SourceBuildCacheLayout.IDENTITY_CACHE_DIRNAME,
|
|
80
|
+
SourceBuildCacheLayout.ANSWER_CACHE_DIRNAME,
|
|
69
81
|
SourceBuildCacheLayout.ORPHAN_CACHE_DIRNAME,
|
|
70
82
|
];
|
|
71
83
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceBuildCacheLayout.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/SourceBuildCacheLayout.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,iGAA8F;AAE9F,6DAA0D;AAC1D,mEAAgE;AAChE,iEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,IAAiB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"SourceBuildCacheLayout.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/SourceBuildCacheLayout.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,iGAA8F;AAE9F,6DAA0D;AAC1D,mEAAgE;AAChE,iEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,IAAiB,sBAAsB,CA0RtC;AA1RD,WAAiB,sBAAsB;IACrC,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAEzD,gEAAgE;IACnD,2CAAoB,GAAG,cAAc,CAAC;IAEnD,uEAAuE;IAC1D,yCAAkB,GAAG,MAAM,CAAC;IAEzC,0EAA0E;IAC7D,6CAAsB,GAAG,UAAU,CAAC;IAEjD,wEAAwE;IAC3D,2CAAoB,GAAG,YAAY,CAAC;IAEjD,4EAA4E;IAC/D,+CAAwB,GAAG,aAAa,CAAC;IAEtD,4EAA4E;IAC/D,+CAAwB,GAAG,cAAc,CAAC;IAEvD;;;OAGG;IACU,6CAAsB,GAAG,YAAY,CAAC;IAEnD;;;OAGG;IACU,2CAAoB,GAAG,SAAS,CAAC;IAE9C,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AI,CAAC;QACd,CAAC;IACH,CAAC;IAbe,uBAAA,aAAa,gBAa5B,CAAA;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,SAAgB,wBAAwB,CACtC,IAAY,EACZ,QAAgB;QAEhB,MAAM,SAAS,GAAG,mBAAI,CAAC,IAAI,CACzB,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAClB,IAAI,mBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,GAAG,IAAI,qBAAM;aAC7C,WAAW,CAAC,EAAE,CAAC;aACf,QAAQ,CAAC,KAAK,CAAC,MAAM,CACzB,CAAC;QACF,IAAI,CAAC;YACH,iBAAE,CAAC,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YACxE,yEAAyE;YACzE,wEAAwE;YACxE,iBAAE,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACjC,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC;gBACH,iBAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACxC,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACZ,CAAC;IACH,CAAC;IApBe,uBAAA,wBAAwB,2BAoBvC,CAAA;AACH,CAAC,EA1RgB,sBAAsB,aAAtB,sBAAsB,GAAtB,sBAAsB,QA0RtC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PluginContentIdentities } from "./PluginContentIdentities";
|
|
1
2
|
/**
|
|
2
3
|
* Share generated Go workspace policy between package selection and building.
|
|
3
4
|
*
|
|
@@ -113,16 +114,26 @@ export declare namespace SourcePluginWorkspace {
|
|
|
113
114
|
* Caller views share that native state and syntax, while each default
|
|
114
115
|
* diagnostic label remains with its current caller.
|
|
115
116
|
*
|
|
117
|
+
* An optional record store carries the Go environment-file discovery hint
|
|
118
|
+
* across processes, and the parse of identical bytes by the same Go command
|
|
119
|
+
* (#1729): every launch otherwise ran `go mod edit -json` on an unchanged
|
|
120
|
+
* `go.mod`. A recorded parse is keyed by the manifest bytes, the content
|
|
121
|
+
* identities of the launcher and of the `GOROOT/bin/go` the live `go env
|
|
122
|
+
* -json GOROOT` reports, the `GOENV` file's bytes, and every `GO*`/`CGO_*`
|
|
123
|
+
* variable the command receives. It is consulted and written only under the
|
|
124
|
+
* same qualified tool witness that admits in-load sharing, so the live
|
|
125
|
+
* witness query still runs on every load.
|
|
126
|
+
*
|
|
116
127
|
* @evidence contracts/common.md#principled-implementation Actual go mod edit JSON determines module/replacement identities; current bytes, selected/dispatched-tool metadata and Go's environment-file witness qualify reuse under the existing metadata-distinguishability premise. Environment values are copied at reader creation. Missing go.mod returns the existing empty module observation, and moving tool/manifest inputs cannot publish a parsed record.
|
|
117
128
|
* @evidence contracts/common.md#clear-and-simple-design One factory acquires load-owned native reader state by selected tool; a thin caller view forwards its diagnostic label without duplicating the byte-content map. Current reads and post-parse byte/tool comparisons qualify insertion.
|
|
118
129
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts No custom Go manifest parser or global context-insensitive memo is introduced.
|
|
119
130
|
* @evidence contracts/common.md#meaningful-documentation Native prose states this operation's authority and delegated boundaries; fields retain separate native comments.
|
|
120
131
|
* @evidence contracts/portability.md#os-neutral-implementation Native path resolution and temporary cwd avoid deep Windows working-directory limits; the selected tool handles manifest syntax.
|
|
121
132
|
* @evidence contracts/performance.md#efficient-algorithms Reader acquisition performs a selected-tool registry lookup; every nonmissing read qualifies tool/environment metadata and reads current manifest bytes. A cold or stale witness first observes the selected launcher; an unavailable or nonfile launcher skips optional environment acquisition and permits only the actual uncached parse attempt. An observed file lends its same pre-read stat to the witness before acquiring current Go values and GOENV evidence through the common reader, without a GOROOT walk. Only complete native GOENV/GOROOT locations qualify syntax sharing; a dispatched tool is witnessed before parsing. Unavailable native environment acquisition disables syntax sharing while preserving actual parse success or failure. Each distinct byte string that earns stable successful syntax in that tool epoch runs Go mod edit and complete JSON parsing once, then rechecks bytes/tool metadata before caching; copied manifests share that parse. Failed queries remain uncached and report the current caller's diagnostic label.
|
|
122
|
-
* @evidence contracts/performance.md#reuse-equivalent-work The caller may share this reader only within one load and the same pinned tool/effective environment; parsed syntax is
|
|
133
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The caller may share this reader only within one load and the same pinned tool/effective environment; parsed syntax is never native containment authority. Across loads only a parse recorded under the content identities of the bytes, both Go executables, the GOENV file and the Go variables is reused, and only under a qualified live tool witness. Caller views share native state while preserving failure attribution; diagnostic labels are not syntax cache inputs.
|
|
123
134
|
* @evidence contracts/performance.md#bound-retention-and-release-resources The map retains distinct manifest bytes and parsed syntax for its caller's load/build lifetime; process/output capture cleanup remains delegated.
|
|
124
135
|
*/
|
|
125
|
-
export function createGoModReader(goBinary: string, pluginName: string, env: NodeJS.ProcessEnv, readers?: Map<string, GoModReader
|
|
136
|
+
export function createGoModReader(goBinary: string, pluginName: string, env: NodeJS.ProcessEnv, readers?: Map<string, GoModReader>, identities?: PluginContentIdentities.Store): GoModReader;
|
|
126
137
|
/**
|
|
127
138
|
* Describe a failed Go launch without confusing missing cwd and missing tool.
|
|
128
139
|
*
|
|
@@ -4,13 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SourcePluginWorkspace = void 0;
|
|
7
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
7
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
9
|
const node_os_1 = __importDefault(require("node:os"));
|
|
9
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
11
|
const OwnedSynchronousProcess_1 = require("../../../internal/OwnedSynchronousProcess");
|
|
12
|
+
const runtimeExecutableIdentity_1 = require("../../../internal/runtimeExecutableIdentity");
|
|
11
13
|
const GoEnvironmentReading_1 = require("./GoEnvironmentReading");
|
|
12
14
|
const GoSourceInputs_1 = require("./GoSourceInputs");
|
|
13
15
|
const PluginBuildEnvironmentWitness_1 = require("./PluginBuildEnvironmentWitness");
|
|
16
|
+
const PluginContentIdentities_1 = require("./PluginContentIdentities");
|
|
17
|
+
const PluginLoadAnswers_1 = require("./PluginLoadAnswers");
|
|
14
18
|
const SourcePluginAdmission_1 = require("./SourcePluginAdmission");
|
|
15
19
|
const copiesPluginSourceEntry_1 = require("./copiesPluginSourceEntry");
|
|
16
20
|
const formatGoWorkPath_1 = require("./formatGoWorkPath");
|
|
@@ -145,16 +149,26 @@ var SourcePluginWorkspace;
|
|
|
145
149
|
* Caller views share that native state and syntax, while each default
|
|
146
150
|
* diagnostic label remains with its current caller.
|
|
147
151
|
*
|
|
152
|
+
* An optional record store carries the Go environment-file discovery hint
|
|
153
|
+
* across processes, and the parse of identical bytes by the same Go command
|
|
154
|
+
* (#1729): every launch otherwise ran `go mod edit -json` on an unchanged
|
|
155
|
+
* `go.mod`. A recorded parse is keyed by the manifest bytes, the content
|
|
156
|
+
* identities of the launcher and of the `GOROOT/bin/go` the live `go env
|
|
157
|
+
* -json GOROOT` reports, the `GOENV` file's bytes, and every `GO*`/`CGO_*`
|
|
158
|
+
* variable the command receives. It is consulted and written only under the
|
|
159
|
+
* same qualified tool witness that admits in-load sharing, so the live
|
|
160
|
+
* witness query still runs on every load.
|
|
161
|
+
*
|
|
148
162
|
* @evidence contracts/common.md#principled-implementation Actual go mod edit JSON determines module/replacement identities; current bytes, selected/dispatched-tool metadata and Go's environment-file witness qualify reuse under the existing metadata-distinguishability premise. Environment values are copied at reader creation. Missing go.mod returns the existing empty module observation, and moving tool/manifest inputs cannot publish a parsed record.
|
|
149
163
|
* @evidence contracts/common.md#clear-and-simple-design One factory acquires load-owned native reader state by selected tool; a thin caller view forwards its diagnostic label without duplicating the byte-content map. Current reads and post-parse byte/tool comparisons qualify insertion.
|
|
150
164
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts No custom Go manifest parser or global context-insensitive memo is introduced.
|
|
151
165
|
* @evidence contracts/common.md#meaningful-documentation Native prose states this operation's authority and delegated boundaries; fields retain separate native comments.
|
|
152
166
|
* @evidence contracts/portability.md#os-neutral-implementation Native path resolution and temporary cwd avoid deep Windows working-directory limits; the selected tool handles manifest syntax.
|
|
153
167
|
* @evidence contracts/performance.md#efficient-algorithms Reader acquisition performs a selected-tool registry lookup; every nonmissing read qualifies tool/environment metadata and reads current manifest bytes. A cold or stale witness first observes the selected launcher; an unavailable or nonfile launcher skips optional environment acquisition and permits only the actual uncached parse attempt. An observed file lends its same pre-read stat to the witness before acquiring current Go values and GOENV evidence through the common reader, without a GOROOT walk. Only complete native GOENV/GOROOT locations qualify syntax sharing; a dispatched tool is witnessed before parsing. Unavailable native environment acquisition disables syntax sharing while preserving actual parse success or failure. Each distinct byte string that earns stable successful syntax in that tool epoch runs Go mod edit and complete JSON parsing once, then rechecks bytes/tool metadata before caching; copied manifests share that parse. Failed queries remain uncached and report the current caller's diagnostic label.
|
|
154
|
-
* @evidence contracts/performance.md#reuse-equivalent-work The caller may share this reader only within one load and the same pinned tool/effective environment; parsed syntax is
|
|
168
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The caller may share this reader only within one load and the same pinned tool/effective environment; parsed syntax is never native containment authority. Across loads only a parse recorded under the content identities of the bytes, both Go executables, the GOENV file and the Go variables is reused, and only under a qualified live tool witness. Caller views share native state while preserving failure attribution; diagnostic labels are not syntax cache inputs.
|
|
155
169
|
* @evidence contracts/performance.md#bound-retention-and-release-resources The map retains distinct manifest bytes and parsed syntax for its caller's load/build lifetime; process/output capture cleanup remains delegated.
|
|
156
170
|
*/
|
|
157
|
-
function createGoModReader(goBinary, pluginName, env, readers) {
|
|
171
|
+
function createGoModReader(goBinary, pluginName, env, readers, identities) {
|
|
158
172
|
const existing = readers?.get(goBinary);
|
|
159
173
|
if (existing !== undefined)
|
|
160
174
|
return {
|
|
@@ -174,6 +188,9 @@ var SourcePluginWorkspace;
|
|
|
174
188
|
const cache = new Map();
|
|
175
189
|
const environment = { ...env };
|
|
176
190
|
let toolWitness;
|
|
191
|
+
// The tool part of a recorded parse's identity, formed with each qualified
|
|
192
|
+
// witness; undefined without a store or a provable tool.
|
|
193
|
+
let toolIdentity;
|
|
177
194
|
const reader = {
|
|
178
195
|
read(dir, diagnosticPlugin = pluginName) {
|
|
179
196
|
OwnedSynchronousProcess_1.OwnedSynchronousProcess.checkpoint();
|
|
@@ -207,7 +224,7 @@ var SourcePluginWorkspace;
|
|
|
207
224
|
// optional cache qualification is unavailable (#1712). The actual
|
|
208
225
|
// mod-edit attempt below still owns its current failure or success.
|
|
209
226
|
const observed = launcher?.isFile() === true
|
|
210
|
-
? GoEnvironmentReading_1.GoEnvironmentReading.read(goBinary, node_os_1.default.tmpdir(), environment, ["GOROOT"], witness)
|
|
227
|
+
? GoEnvironmentReading_1.GoEnvironmentReading.read(goBinary, node_os_1.default.tmpdir(), environment, ["GOROOT"], witness, identities)
|
|
211
228
|
: undefined;
|
|
212
229
|
if (typeof observed?.GOROOT === "string" &&
|
|
213
230
|
node_path_1.default.isAbsolute(observed.GOROOT))
|
|
@@ -220,6 +237,10 @@ var SourcePluginWorkspace;
|
|
|
220
237
|
complete && PluginBuildEnvironmentWitness_1.PluginBuildEnvironmentWitness.holds(witness)
|
|
221
238
|
? witness
|
|
222
239
|
: undefined;
|
|
240
|
+
toolIdentity =
|
|
241
|
+
toolWitness === undefined || identities === undefined
|
|
242
|
+
? undefined
|
|
243
|
+
: goModToolIdentity(goBinary, observed.GOROOT, observed.GOENV, environment, identities);
|
|
223
244
|
}
|
|
224
245
|
// UTF-8 decoding is lossy for malformed input. Only identical bytes
|
|
225
246
|
// can share Go syntax, even when Go serializes two inputs identically.
|
|
@@ -228,6 +249,22 @@ var SourcePluginWorkspace;
|
|
|
228
249
|
if (cached !== undefined) {
|
|
229
250
|
return cached;
|
|
230
251
|
}
|
|
252
|
+
// WARNING (#1729): a new process asks the record store before running
|
|
253
|
+
// Go on bytes this exact command already parsed. Never key this on a
|
|
254
|
+
// path or on the reader's metadata witness alone.
|
|
255
|
+
const answer = toolIdentity === undefined
|
|
256
|
+
? undefined
|
|
257
|
+
: [
|
|
258
|
+
toolIdentity,
|
|
259
|
+
node_crypto_1.default.createHash("sha256").update(bytes).digest("hex"),
|
|
260
|
+
];
|
|
261
|
+
const recalled = answer === undefined
|
|
262
|
+
? undefined
|
|
263
|
+
: recallGoModInfo(PluginLoadAnswers_1.PluginLoadAnswers.read(identities, GO_MOD_SYNTAX, answer));
|
|
264
|
+
if (recalled !== undefined) {
|
|
265
|
+
cache.set(byteKey, recalled);
|
|
266
|
+
return recalled;
|
|
267
|
+
}
|
|
231
268
|
const info = readGoModInfo(resolved, goBinary, diagnosticPlugin, environment);
|
|
232
269
|
if (!node_fs_1.default.readFileSync(manifest).equals(bytes))
|
|
233
270
|
throw new Error(`ttsc: go.mod changed while Go was reading ${manifest}`);
|
|
@@ -236,8 +273,14 @@ var SourcePluginWorkspace;
|
|
|
236
273
|
throw new Error(`ttsc: Go tool or environment changed while reading ${manifest}`);
|
|
237
274
|
// An unavailable environment observation can still execute a fresh Go
|
|
238
275
|
// parse, but it cannot authorize sharing that result on another call.
|
|
239
|
-
if (toolWitness !== undefined)
|
|
276
|
+
if (toolWitness !== undefined) {
|
|
240
277
|
cache.set(byteKey, info);
|
|
278
|
+
if (answer !== undefined)
|
|
279
|
+
PluginLoadAnswers_1.PluginLoadAnswers.write(identities, GO_MOD_SYNTAX, answer, {
|
|
280
|
+
modulePath: info.modulePath,
|
|
281
|
+
directives: info.directives,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
241
284
|
return info;
|
|
242
285
|
},
|
|
243
286
|
};
|
|
@@ -290,6 +333,99 @@ var SourcePluginWorkspace;
|
|
|
290
333
|
replacements: [],
|
|
291
334
|
};
|
|
292
335
|
}
|
|
336
|
+
/** Answer family of `go mod edit -json` parses (`PluginLoadAnswers`). */
|
|
337
|
+
const GO_MOD_SYNTAX = "go-mod-syntax";
|
|
338
|
+
/**
|
|
339
|
+
* Everything besides the manifest bytes that decides how `go mod edit -json`
|
|
340
|
+
* parses them, by content: the launcher, the `GOROOT/bin/go` the live query
|
|
341
|
+
* reported, the `GOENV` file that can select another toolchain, and the Go
|
|
342
|
+
* variables the command receives. `undefined` when an executable cannot be
|
|
343
|
+
* identified or the file cannot be read, so the parse runs.
|
|
344
|
+
*/
|
|
345
|
+
function goModToolIdentity(goBinary, goRoot, goEnv, env, identities) {
|
|
346
|
+
const dispatchedPath = node_path_1.default.join(goRoot, "bin", process.platform === "win32" ? "go.exe" : "go");
|
|
347
|
+
// Only an executable the store can prove from metadata may key the record:
|
|
348
|
+
// streaming both executables on a device without a reference would cost
|
|
349
|
+
// more than the parse it replaces.
|
|
350
|
+
if (!provableFromMetadata(goBinary, identities) ||
|
|
351
|
+
!provableFromMetadata(dispatchedPath, identities))
|
|
352
|
+
return undefined;
|
|
353
|
+
const launcher = (0, runtimeExecutableIdentity_1.runtimeExecutableIdentity)(goBinary, identities);
|
|
354
|
+
const dispatched = (0, runtimeExecutableIdentity_1.runtimeExecutableIdentity)(dispatchedPath, identities);
|
|
355
|
+
if (launcher === undefined || dispatched === undefined)
|
|
356
|
+
return undefined;
|
|
357
|
+
let goEnvFile;
|
|
358
|
+
if (goEnv === "off")
|
|
359
|
+
goEnvFile = "off";
|
|
360
|
+
else
|
|
361
|
+
try {
|
|
362
|
+
goEnvFile = node_crypto_1.default
|
|
363
|
+
.createHash("sha256")
|
|
364
|
+
.update(node_fs_1.default.readFileSync(goEnv))
|
|
365
|
+
.digest("hex");
|
|
366
|
+
}
|
|
367
|
+
catch (error) {
|
|
368
|
+
if (error.code !== "ENOENT")
|
|
369
|
+
return undefined;
|
|
370
|
+
goEnvFile = null;
|
|
371
|
+
}
|
|
372
|
+
return [
|
|
373
|
+
1,
|
|
374
|
+
launcher,
|
|
375
|
+
goRoot,
|
|
376
|
+
dispatched,
|
|
377
|
+
goEnv,
|
|
378
|
+
goEnvFile,
|
|
379
|
+
Object.entries(GoSourceInputs_1.GoSourceInputs.goBuildEnv(goBinary, undefined, env))
|
|
380
|
+
.filter((entry) => entry[1] !== undefined && /^(GO|CGO_)/i.test(entry[0]))
|
|
381
|
+
.sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)),
|
|
382
|
+
];
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Whether the file's stamp is separable from the store's reference on its
|
|
386
|
+
* device, the precondition for proving its bytes from a record.
|
|
387
|
+
*/
|
|
388
|
+
function provableFromMetadata(file, identities) {
|
|
389
|
+
try {
|
|
390
|
+
return PluginContentIdentities_1.PluginContentIdentities.separable(identities.references, node_fs_1.default.statSync(file, { bigint: true }));
|
|
391
|
+
}
|
|
392
|
+
catch {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* A recorded parse in the shape `readGoModInfo` returns, or `undefined` when
|
|
398
|
+
* the record does not have it.
|
|
399
|
+
*/
|
|
400
|
+
function recallGoModInfo(value) {
|
|
401
|
+
if (typeof value !== "object" || value === null)
|
|
402
|
+
return undefined;
|
|
403
|
+
const record = value;
|
|
404
|
+
if ((record.modulePath !== null && typeof record.modulePath !== "string") ||
|
|
405
|
+
!Array.isArray(record.directives) ||
|
|
406
|
+
!record.directives.every(isReplaceDirective))
|
|
407
|
+
return undefined;
|
|
408
|
+
const directives = record.directives;
|
|
409
|
+
return {
|
|
410
|
+
modulePath: record.modulePath,
|
|
411
|
+
directives,
|
|
412
|
+
replacements: directives
|
|
413
|
+
.map(jsonReplacementToGoModReplacement)
|
|
414
|
+
.filter((replacement) => replacement !== null),
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function isReplaceDirective(value) {
|
|
418
|
+
if (typeof value !== "object" || value === null)
|
|
419
|
+
return false;
|
|
420
|
+
const directive = value;
|
|
421
|
+
return [directive.Old, directive.New].every((side) => side === undefined ||
|
|
422
|
+
(typeof side === "object" &&
|
|
423
|
+
side !== null &&
|
|
424
|
+
["Path", "Version"].every((key) => {
|
|
425
|
+
const field = side[key];
|
|
426
|
+
return field === undefined || typeof field === "string";
|
|
427
|
+
})));
|
|
428
|
+
}
|
|
293
429
|
function jsonReplacementToGoModReplacement(replacement) {
|
|
294
430
|
const modulePath = replacement.Old?.Path;
|
|
295
431
|
if (modulePath === undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourcePluginWorkspace.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/SourcePluginWorkspace.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,sDAAyB;AACzB,0DAA6B;AAE7B,uFAAoF;AACpF,iEAA8D;AAC9D,qDAAkD;AAClD,mFAAgF;AAChF,mEAAgE;AAChE,uEAAoE;AACpE,yDAAsD;AACtD,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,IAAiB,qBAAqB,CA+gBrC;AA/gBD,WAAiB,qBAAqB;IACpC;;;;;;;;;;;OAWG;IACH,SAAgB,WAAW,CAAC,MAAc,EAAE,OAAe;QACzD,iDAAuB,CAAC,UAAU,EAAE,CAAC;QACrC,iBAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,iBAAE,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE;YACzB,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,iDAAuB,CAAC,UAAU,EAAE,CAAC;gBACrC,OAAO,IAAA,iDAAuB,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YAChD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAVe,sBAAA,WAAW,cAU1B,CAAA;IAED;;;;;;;;;;;;OAYG;IACH,SAAgB,WAAW,CACzB,UAAkB,EAClB,OAA0B,EAC1B,QAAgB,EAChB,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AAI,CAAC,KAAK,CAAC,WAAW,EAAE;gBAAE,SAAS;YACnC,IAAI,+BAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC9D,YAAY,CAAC,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AACtE,CAAC,EA/gBgB,qBAAqB,aAArB,qBAAqB,GAArB,qBAAqB,QA+gBrC"}
|
|
1
|
+
{"version":3,"file":"SourcePluginWorkspace.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/SourcePluginWorkspace.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,sDAAyB;AACzB,0DAA6B;AAE7B,uFAAoF;AACpF,2FAAwF;AACxF,iEAA8D;AAC9D,qDAAkD;AAClD,mFAAgF;AAChF,uEAAoE;AACpE,2DAAwD;AACxD,mEAAgE;AAChE,uEAAoE;AACpE,yDAAsD;AACtD,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,IAAiB,qBAAqB,CAyrBrC;AAzrBD,WAAiB,qBAAqB;IACpC;;;;;;;;;;;OAWG;IACH,SAAgB,WAAW,CAAC,MAAc,EAAE,OAAe;QACzD,iDAAuB,CAAC,UAAU,EAAE,CAAC;QACrC,iBAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,iBAAE,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE;YACzB,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,iDAAuB,CAAC,UAAU,EAAE,CAAC;gBACrC,OAAO,IAAA,iDAAuB,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YAChD,CAAC;SACF,CAAC,CAAC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@
|
|
|
1
1
|
import type { ITtscBuildContributor } from "./ITtscBuildContributor";
|
|
2
|
+
import { PluginBuildEnvironmentWitness } from "./PluginBuildEnvironmentWitness";
|
|
3
|
+
import { PluginContentIdentities } from "./PluginContentIdentities";
|
|
2
4
|
import type { SourceBuildFilesystemOperations } from "./SourceBuildFilesystemOperations";
|
|
3
5
|
import { SourcePluginWorkspace } from "./SourcePluginWorkspace";
|
|
4
6
|
/**
|
|
@@ -49,8 +51,8 @@ import { SourcePluginWorkspace } from "./SourcePluginWorkspace";
|
|
|
49
51
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts A changed witness is never overwritten or accepted. A fresh epoch takes a new toolchain reading and performs the actual build or qualified adoption; source, native and cleanup failures stay terminal. No selected SDK tool is warmed by a special command, and no foreign environment or memo is rebased. Shared Go objects retain their owner's toolID/actionID contract; same-version custom tool semantics beyond that contract are not newly guaranteed.
|
|
50
52
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain effective environment, recorded-input comparisons and their trust/observation limits, reader registration and managed versus explicit roots; option-map comments state their reading provenance with blank member separation.
|
|
51
53
|
* @evidence contracts/portability.md#os-neutral-implementation Node path/physical-cache/temp APIs preserve native identities; executable resolution and Windows command handling are isolated owners, and the binary filename explicitly follows its executable platform.
|
|
52
|
-
* @evidence contracts/performance.md#efficient-algorithms At most three epochs redo native toolchain observation, key construction, materialization and guarded admission;
|
|
53
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Existing binaries and concurrent builders share the version/platform/source/environment key with reader admission before return, assuming trustworthy cache producers and supplied digest maps. Fixed trimpath compilation removes disposable snapshot paths from Go object identities. Shared load readings and sequential source/toolchain comparisons reject observed changes; metadata reuse and unobserved concurrent mutation remain the underlying witnesses' limits.
|
|
54
|
+
* @evidence contracts/performance.md#efficient-algorithms At most three epochs redo native toolchain observation, key construction, materialization and guarded admission; the first can key on the load's witnessed same-directory reading instead of observing the toolchain again, and later ones always observe it. Each can run one Go build, preceded by one batched package metadata command when the loader requires ownership admission. The shared compiler reader can itself make three version observations, hence at most nine such cold observations for a persistently moving compiler and no build when its key witness fails. Full-file bytes, entries, path/sort text, contributors, external trees and witness populations drive work. Scoped cancellation is sampled between phases/entries/commands and does not bound native calls or delegated hashing. First source digest readings are reused across epochs, while each scratch is independently checked. Existing lock contention has its separate wait budget and native Go compiler work remains delegated.
|
|
55
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Existing binaries and concurrent builders share the version/platform/source/environment key with reader admission before return, assuming trustworthy cache producers and supplied digest maps. The key's content digests come from the record store when their separable metadata still matches, so a new process does not read unchanged sources, SDK or compiler bytes to find an existing binary (#1722). Fixed trimpath compilation removes disposable snapshot paths from Go object identities. Shared load readings and sequential source/toolchain comparisons reject observed changes; metadata reuse and unobserved concurrent mutation remain the underlying witnesses' limits.
|
|
54
56
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Scratch directories and build/cache leases have finally-based cleanup, including cancellation; cancelled work admits no new post-build prune pass. Scratch removal or lease cleanup can fail, and selected synchronous child settlement does not join arbitrary descendants. Repeated commands can repeat external tool effects; only ttsc-owned failed outputs are discarded, and Go-owned object entries retain their existing lifetime. Pending binary cleanup is best-effort. Reader tokens and their process map grow with distinct physical keys until process exit. Managed pruning attempts age/LRU reclamation while protecting live, unknown and selected entries, so it is not a hard disk bound; explicit roots remain caller-managed.
|
|
55
57
|
*/
|
|
56
58
|
export declare function buildSourcePlugin(opts: {
|
|
@@ -71,7 +73,18 @@ export declare function buildSourcePlugin(opts: {
|
|
|
71
73
|
* so the load reports its plugin sources' states from the same reading.
|
|
72
74
|
*/
|
|
73
75
|
environmentDigests?: Map<string, string>;
|
|
76
|
+
/**
|
|
77
|
+
* Witnesses of the readings in `environmentDigests` (`computeCacheKey`), so
|
|
78
|
+
* the first epoch keys on a reading package selection already took. A
|
|
79
|
+
* discarded epoch reads the toolchain again instead.
|
|
80
|
+
*/
|
|
81
|
+
environmentWitnesses?: Map<string, PluginBuildEnvironmentWitness.Record>;
|
|
74
82
|
filesystem?: Partial<SourceBuildFilesystemOperations>;
|
|
83
|
+
/**
|
|
84
|
+
* Record store the loader opened for this load, so its key reuses content
|
|
85
|
+
* identities across processes (#1722); a standalone build opens its own.
|
|
86
|
+
*/
|
|
87
|
+
identities?: PluginContentIdentities.Store;
|
|
75
88
|
label?: string;
|
|
76
89
|
overlayDirs?: readonly string[];
|
|
77
90
|
quiet?: boolean;
|