ttsc 0.31.0 → 0.31.2
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/cmd/platform/main.go +2 -2
- package/internal/sourceprocess/contain_windows.go +10 -13
- package/internal/sourceprocess/started_windows.go +41 -0
- package/internal/sourceprocess/windows_started_publication_distinguishes_pending_from_refusal_test.go +76 -0
- package/internal/watchhelper/run.go +30 -20
- package/internal/watchhelper/run_other.go +4 -4
- package/internal/watchhelper/run_windows.go +471 -0
- package/internal/watchhelper/watchhelper.go +8 -2
- package/internal/watchhelper/windows_notifications_preserve_mutations_without_access_noise_test.go +506 -0
- package/lib/compiler/internal/build/BuildExecution.d.ts +4 -2
- package/lib/compiler/internal/build/BuildExecution.js +40 -12
- package/lib/compiler/internal/build/BuildExecution.js.map +1 -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/nativeBinary.d.ts +3 -3
- package/lib/internal/nativeBinary.js +3 -3
- 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/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/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 +24 -14
- package/lib/plugin/internal/load/loadProjectPlugins.js +141 -56
- 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 +48 -0
- package/lib/plugin/internal/source/GoEnvironmentReading.js +156 -0
- package/lib/plugin/internal/source/GoEnvironmentReading.js.map +1 -0
- package/lib/plugin/internal/source/NativeSourcePackages.d.ts +51 -13
- package/lib/plugin/internal/source/NativeSourcePackages.js +182 -27
- package/lib/plugin/internal/source/NativeSourcePackages.js.map +1 -1
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.d.ts +42 -3
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js +68 -7
- package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js.map +1 -1
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.d.ts +5 -3
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.js +14 -8
- package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.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 +53 -19
- package/lib/plugin/internal/source/SourcePluginWorkspace.js +111 -22
- package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -1
- package/lib/plugin/internal/source/buildSourcePlugin.d.ts +34 -18
- package/lib/plugin/internal/source/buildSourcePlugin.js +52 -24
- package/lib/plugin/internal/source/buildSourcePlugin.js.map +1 -1
- package/lib/plugin/internal/source/computeCacheKey.d.ts +25 -7
- package/lib/plugin/internal/source/computeCacheKey.js +85 -34
- 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 +75 -102
- 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/pluginModuleReplaceDirectories.d.ts +6 -5
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js +10 -17
- package/lib/plugin/internal/source/pluginModuleReplaceDirectories.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/package.json +8 -8
- package/src/compiler/internal/build/BuildExecution.ts +46 -13
- 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/nativeBinary.ts +3 -3
- 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/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/plugin/internal/CapabilityResolutionFormat.ts +23 -107
- package/src/plugin/internal/load/PluginDescriptorEvaluationCache.ts +14 -4
- package/src/plugin/internal/load/loadProjectPlugins.ts +421 -211
- package/src/plugin/internal/readCapabilityResolution.ts +17 -6
- package/src/plugin/internal/source/GoEnvironmentReading.ts +178 -0
- package/src/plugin/internal/source/NativeSourcePackages.ts +365 -48
- package/src/plugin/internal/source/PluginBuildEnvironmentReadings.ts +83 -5
- package/src/plugin/internal/source/PluginBuildEnvironmentWitness.ts +18 -8
- 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 +148 -25
- package/src/plugin/internal/source/buildSourcePlugin.ts +104 -36
- package/src/plugin/internal/source/computeCacheKey.ts +129 -55
- package/src/plugin/internal/source/hashPluginBuildEnvironment.ts +152 -105
- 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/pluginModuleReplaceDirectories.ts +13 -25
- 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
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { PluginBuildEnvironmentWitness } from "./PluginBuildEnvironmentWitness";
|
|
2
|
+
import { PluginContentIdentities } from "./PluginContentIdentities";
|
|
1
3
|
import { SourcePluginWorkspace } from "./SourcePluginWorkspace";
|
|
2
4
|
/**
|
|
3
5
|
* Observe Go-selected packages under the native builder's workspace policy.
|
|
4
6
|
*
|
|
5
|
-
* Metadata does not compile dependencies or certify a later build. A cold
|
|
6
|
-
*
|
|
7
|
+
* Metadata does not compile dependencies or certify a later build. A cold build
|
|
8
|
+
* repeats ownership admission in its proven, materialized workspace.
|
|
7
9
|
*
|
|
8
10
|
* @evidence contracts/common.md#principled-implementation The selected Go tool, effective environment, shared workspace writer and actual copied package inputs determine package names and errors; Go remains the build-constraint and package-validity authority.
|
|
9
11
|
* @evidence contracts/common.md#clear-and-simple-design One namespace separates contextual observation, metadata framing and ownership admission; source-only contributions are observed inside their selected host module.
|
|
@@ -11,7 +13,7 @@ import { SourcePluginWorkspace } from "./SourcePluginWorkspace";
|
|
|
11
13
|
* @evidence contracts/common.md#meaningful-documentation Native prose distinguishes metadata selection from compilation and later materialized admission.
|
|
12
14
|
* @evidence contracts/portability.md#os-neutral-implementation Native path/fs operations and the shared Go tool selector preserve environment-name and path identity without blanket case folding; Go itself applies target platform and cgo selection.
|
|
13
15
|
* @evidence contracts/performance.md#efficient-algorithms One list command observes all distinct package entries in each prepared context. Context materialization traverses and copies admitted host/contributor files; workspace setup delegates manifest commands and list skips dependency loading. Framing and JSON parsing process complete output bytes, and retained results scale with selected packages/files.
|
|
14
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Entries are deduplicated within a contextual observation; callers group equivalent module contexts for one load.
|
|
16
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Entries are deduplicated within a contextual observation; callers group equivalent module contexts for one load. With a record store, a successful selection is answered across loads and processes under an identity built from the content of everything Go reads, so any source, overlay, contributor, manifest, Go variable or toolchain change observes Go again (#1721); erroneous selections are never recorded. Cold admission uses the already prepared real build workspace.
|
|
15
17
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Each metadata scratch has finally-based retirement-aware cleanup, and capture resources belong to spawnGoTool. Unknown native retirement retains scratch under the existing scope; results and complete output remain caller-owned with no independent byte ceiling.
|
|
16
18
|
*/
|
|
17
19
|
export declare namespace NativeSourcePackages {
|
|
@@ -41,6 +43,32 @@ export declare namespace NativeSourcePackages {
|
|
|
41
43
|
Err: string;
|
|
42
44
|
};
|
|
43
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* One load's readings, shared by its package selections and its builds:
|
|
48
|
+
* source directory digests and module build-environment digests, each by
|
|
49
|
+
* absolute directory. The builds fill and report the same maps, so a load
|
|
50
|
+
* reads each directory and each module's toolchain once.
|
|
51
|
+
*
|
|
52
|
+
* @evidence contracts/common.md#principled-implementation Both maps carry readings already taken in this load under its fixed effective environment; builds still take their own environment reading with a witness.
|
|
53
|
+
* @evidence contracts/common.md#clear-and-simple-design Two maps already owned by the loader travel together.
|
|
54
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The maps never outlive the load; cross-process reuse belongs to the record store.
|
|
55
|
+
* @evidence contracts/common.md#meaningful-documentation Members state their keys and values.
|
|
56
|
+
* @evidence contracts/portability.md#os-neutral-implementation Keys are native absolute paths.
|
|
57
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms A record type runs no algorithm.
|
|
58
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Selections and builds of one load share one reading per directory and module.
|
|
59
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The loader owns both maps for one load.
|
|
60
|
+
*/
|
|
61
|
+
interface SelectionReadings {
|
|
62
|
+
/** `pluginSourceDigest` of each directory this load read. */
|
|
63
|
+
sources?: Map<string, string>;
|
|
64
|
+
/** Build-environment digest of each module root this load read. */
|
|
65
|
+
environments?: Map<string, string>;
|
|
66
|
+
/**
|
|
67
|
+
* Witness of each reading in `environments`, so a build of the same
|
|
68
|
+
* directory keys on that reading instead of probing Go again.
|
|
69
|
+
*/
|
|
70
|
+
witnesses?: Map<string, PluginBuildEnvironmentWitness.Record>;
|
|
71
|
+
}
|
|
44
72
|
/**
|
|
45
73
|
* Observe entries together in a private module layout for their context.
|
|
46
74
|
*
|
|
@@ -50,7 +78,7 @@ export declare namespace NativeSourcePackages {
|
|
|
50
78
|
* @evidence contracts/common.md#meaningful-documentation Native prose states this operation's authority and delegated boundaries; fields retain separate native comments.
|
|
51
79
|
* @evidence contracts/portability.md#os-neutral-implementation Native copy/path and selected tool/environment owners preserve platform identity; contribution target containment is checked.
|
|
52
80
|
* @evidence contracts/performance.md#efficient-algorithms Copies admitted host/contributor bytes and enumerates entries; workspace setup reads manifests and one list command skips dependencies.
|
|
53
|
-
* @evidence contracts/performance.md#reuse-equivalent-work All entries share one prepared context; optional readers are scoped to one load and the same selected tool/effective environment.
|
|
81
|
+
* @evidence contracts/performance.md#reuse-equivalent-work All entries share one prepared context; optional readers are scoped to one load and the same selected tool/effective environment. A supplied record store answers an equal selection without copying or running Go, under the content identity of the module, contributors, overlays, proposal manifests, toolchain/environment digest, Go variables, entries and command; an answer is recorded only when the copies matched their keyed digests, no package reported an error and the overlays still held their digests after Go ran.
|
|
54
82
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Finally releases owned scratch through retirement authority; unknown native closure defers removal and capture cleanup remains delegated.
|
|
55
83
|
*/
|
|
56
84
|
function inspect(opts: {
|
|
@@ -64,6 +92,16 @@ export declare namespace NativeSourcePackages {
|
|
|
64
92
|
}[];
|
|
65
93
|
readers?: Map<string, SourcePluginWorkspace.GoModReader>;
|
|
66
94
|
proposal?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Record store under which an equal selection is answered without Go
|
|
97
|
+
* (#1721); without it every load runs the full observation.
|
|
98
|
+
*/
|
|
99
|
+
identities?: PluginContentIdentities.Store;
|
|
100
|
+
/**
|
|
101
|
+
* The load's source and environment readings, shared with its builds so one
|
|
102
|
+
* load reads each directory and each module's toolchain once.
|
|
103
|
+
*/
|
|
104
|
+
readings?: SelectionReadings;
|
|
67
105
|
}): Package[];
|
|
68
106
|
/**
|
|
69
107
|
* Group one load's standalone candidates by their actual owning module.
|
|
@@ -74,21 +112,21 @@ export declare namespace NativeSourcePackages {
|
|
|
74
112
|
* @evidence contracts/common.md#meaningful-documentation Native prose states this operation's authority and delegated boundaries; fields retain separate native comments.
|
|
75
113
|
* @evidence contracts/portability.md#os-neutral-implementation Native module roots retain their selected spelling, without blanket case folding.
|
|
76
114
|
* @evidence contracts/performance.md#efficient-algorithms One grouping pass plus contextual copies and metadata work for each distinct module; output storage scales with input population.
|
|
77
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries in a module share one list; overlay module observations share the load's selected-tool readers,
|
|
115
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries in a module share one list; overlay module observations share the load's selected-tool readers, and the load's readings and record store reach each contextual observation so equal selections are answered from their content identity.
|
|
78
116
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Grouping/maps/results live for this call/load; scratch and native captures remain with inspect/read.
|
|
79
117
|
*/
|
|
80
118
|
function ownPackages(inputs: readonly {
|
|
81
119
|
source: string;
|
|
82
120
|
label: string;
|
|
83
|
-
}[], env: NodeJS.ProcessEnv, readers?: Map<string, SourcePluginWorkspace.GoModReader
|
|
121
|
+
}[], env: NodeJS.ProcessEnv, readers?: Map<string, SourcePluginWorkspace.GoModReader>, identities?: PluginContentIdentities.Store, readings?: SelectionReadings): Package[];
|
|
84
122
|
/**
|
|
85
123
|
* Propose ownership with the candidate-selected tool before final admission.
|
|
86
124
|
*
|
|
87
|
-
* Nested transform sources retain their admitted source-module layout but
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
125
|
+
* Nested transform sources retain their admitted source-module layout but use
|
|
126
|
+
* unchanged generic host root manifests in scratch. Their outer module graph
|
|
127
|
+
* and toolchain are not source-only build authority. Module-root and check
|
|
128
|
+
* sources retain their actual owning module. Executable proposals must agree
|
|
129
|
+
* in the actual own module; linked proposals in each chosen actual host.
|
|
92
130
|
*
|
|
93
131
|
* @evidence contracts/common.md#principled-implementation Candidate tool selection occurs at the original owning module and effective environment; only prospective nested source-only manifests change in owned scratch before Go interprets the normal generated workspace.
|
|
94
132
|
* @evidence contracts/common.md#clear-and-simple-design One grouping pass shares each module/proposal context and returns whether actual own-module observation already occurred.
|
|
@@ -96,14 +134,14 @@ export declare namespace NativeSourcePackages {
|
|
|
96
134
|
* @evidence contracts/common.md#meaningful-documentation Native prose states deterministic proposal authority and mandatory final ownership confirmation.
|
|
97
135
|
* @evidence contracts/portability.md#os-neutral-implementation Native module/tool/environment owners preserve candidate-relative tool and source layout identity.
|
|
98
136
|
* @evidence contracts/performance.md#efficient-algorithms Groups inputs by module and actual/prospective mode, copies each admitted module once per context, and batches entries through Go metadata; retained work scales with source bytes and distinct contexts.
|
|
99
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries share one observation and per-load manifest readers;
|
|
137
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries share one observation and per-load manifest readers; a result crosses loads only through the record store's content identity, so a changed context observes Go again.
|
|
100
138
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Group records live for this call; scratch/process cleanup remains with inspect and no independent output byte cap is imposed.
|
|
101
139
|
*/
|
|
102
140
|
function propose(inputs: readonly {
|
|
103
141
|
source: string;
|
|
104
142
|
label: string;
|
|
105
143
|
ownModule?: boolean;
|
|
106
|
-
}[], env: NodeJS.ProcessEnv, readers?: Map<string, SourcePluginWorkspace.GoModReader
|
|
144
|
+
}[], env: NodeJS.ProcessEnv, readers?: Map<string, SourcePluginWorkspace.GoModReader>, identities?: PluginContentIdentities.Store, readings?: SelectionReadings): Array<{
|
|
107
145
|
observation: Package;
|
|
108
146
|
ownModule: boolean;
|
|
109
147
|
}>;
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.NativeSourcePackages = 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_path_1 = __importDefault(require("node:path"));
|
|
9
10
|
const SidecarEnvironment_1 = require("../../../compiler/internal/sharedHost/SidecarEnvironment");
|
|
@@ -12,17 +13,21 @@ const SourceNativeRetirement_1 = require("../../../internal/SourceNativeRetireme
|
|
|
12
13
|
const createCanonicalTempDirectory_1 = require("../../../internal/createCanonicalTempDirectory");
|
|
13
14
|
const GoSourceInputs_1 = require("./GoSourceInputs");
|
|
14
15
|
const GoToolResolution_1 = require("./GoToolResolution");
|
|
16
|
+
const PluginContentIdentities_1 = require("./PluginContentIdentities");
|
|
17
|
+
const PluginLoadAnswers_1 = require("./PluginLoadAnswers");
|
|
15
18
|
const SourcePluginAdmission_1 = require("./SourcePluginAdmission");
|
|
16
19
|
const SourcePluginWorkspace_1 = require("./SourcePluginWorkspace");
|
|
17
20
|
const ensureExecutableGoToolchain_1 = require("./ensureExecutableGoToolchain");
|
|
21
|
+
const hashPluginBuildEnvironment_1 = require("./hashPluginBuildEnvironment");
|
|
22
|
+
const pluginSourceDigest_1 = require("./pluginSourceDigest");
|
|
18
23
|
const resolveGoCompiler_1 = require("./resolveGoCompiler");
|
|
19
24
|
const resolvePluginGoModule_1 = require("./resolvePluginGoModule");
|
|
20
25
|
const spawnGoTool_1 = require("./spawnGoTool");
|
|
21
26
|
/**
|
|
22
27
|
* Observe Go-selected packages under the native builder's workspace policy.
|
|
23
28
|
*
|
|
24
|
-
* Metadata does not compile dependencies or certify a later build. A cold
|
|
25
|
-
*
|
|
29
|
+
* Metadata does not compile dependencies or certify a later build. A cold build
|
|
30
|
+
* repeats ownership admission in its proven, materialized workspace.
|
|
26
31
|
*
|
|
27
32
|
* @evidence contracts/common.md#principled-implementation The selected Go tool, effective environment, shared workspace writer and actual copied package inputs determine package names and errors; Go remains the build-constraint and package-validity authority.
|
|
28
33
|
* @evidence contracts/common.md#clear-and-simple-design One namespace separates contextual observation, metadata framing and ownership admission; source-only contributions are observed inside their selected host module.
|
|
@@ -30,7 +35,7 @@ const spawnGoTool_1 = require("./spawnGoTool");
|
|
|
30
35
|
* @evidence contracts/common.md#meaningful-documentation Native prose distinguishes metadata selection from compilation and later materialized admission.
|
|
31
36
|
* @evidence contracts/portability.md#os-neutral-implementation Native path/fs operations and the shared Go tool selector preserve environment-name and path identity without blanket case folding; Go itself applies target platform and cgo selection.
|
|
32
37
|
* @evidence contracts/performance.md#efficient-algorithms One list command observes all distinct package entries in each prepared context. Context materialization traverses and copies admitted host/contributor files; workspace setup delegates manifest commands and list skips dependency loading. Framing and JSON parsing process complete output bytes, and retained results scale with selected packages/files.
|
|
33
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Entries are deduplicated within a contextual observation; callers group equivalent module contexts for one load.
|
|
38
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Entries are deduplicated within a contextual observation; callers group equivalent module contexts for one load. With a record store, a successful selection is answered across loads and processes under an identity built from the content of everything Go reads, so any source, overlay, contributor, manifest, Go variable or toolchain change observes Go again (#1721); erroneous selections are never recorded. Cold admission uses the already prepared real build workspace.
|
|
34
39
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Each metadata scratch has finally-based retirement-aware cleanup, and capture resources belong to spawnGoTool. Unknown native retirement retains scratch under the existing scope; results and complete output remain caller-owned with no independent byte ceiling.
|
|
35
40
|
*/
|
|
36
41
|
var NativeSourcePackages;
|
|
@@ -44,7 +49,7 @@ var NativeSourcePackages;
|
|
|
44
49
|
* @evidence contracts/common.md#meaningful-documentation Native prose states this operation's authority and delegated boundaries; fields retain separate native comments.
|
|
45
50
|
* @evidence contracts/portability.md#os-neutral-implementation Native copy/path and selected tool/environment owners preserve platform identity; contribution target containment is checked.
|
|
46
51
|
* @evidence contracts/performance.md#efficient-algorithms Copies admitted host/contributor bytes and enumerates entries; workspace setup reads manifests and one list command skips dependencies.
|
|
47
|
-
* @evidence contracts/performance.md#reuse-equivalent-work All entries share one prepared context; optional readers are scoped to one load and the same selected tool/effective environment.
|
|
52
|
+
* @evidence contracts/performance.md#reuse-equivalent-work All entries share one prepared context; optional readers are scoped to one load and the same selected tool/effective environment. A supplied record store answers an equal selection without copying or running Go, under the content identity of the module, contributors, overlays, proposal manifests, toolchain/environment digest, Go variables, entries and command; an answer is recorded only when the copies matched their keyed digests, no package reported an error and the overlays still held their digests after Go ran.
|
|
48
53
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Finally releases owned scratch through retirement authority; unknown native closure defers removal and capture cleanup remains delegated.
|
|
49
54
|
*/
|
|
50
55
|
function inspect(opts) {
|
|
@@ -53,6 +58,18 @@ var NativeSourcePackages;
|
|
|
53
58
|
const compiler = (0, resolveGoCompiler_1.resolveGoCompiler)(env);
|
|
54
59
|
const goBinary = GoToolResolution_1.GoToolResolution.resolveGoToolForBuild(compiler.binary, env, moduleRoot);
|
|
55
60
|
(0, ensureExecutableGoToolchain_1.ensureExecutableGoToolchain)(goBinary, compiler.bundled);
|
|
61
|
+
// WARNING (#1721): never drop this lookup or narrow its identity. Without
|
|
62
|
+
// it every warm launch and every unplugin generation copied the module
|
|
63
|
+
// twice and ran `go list` twice (6 s+ on Windows) to rediscover an answer
|
|
64
|
+
// its unchanged inputs already determined.
|
|
65
|
+
const identity = opts.identities === undefined
|
|
66
|
+
? undefined
|
|
67
|
+
: selectionIdentity(opts, moduleRoot, goBinary, env, opts.identities);
|
|
68
|
+
if (identity !== undefined) {
|
|
69
|
+
const recalled = recallSelection(PluginLoadAnswers_1.PluginLoadAnswers.read(opts.identities, SELECTION_ANSWER, identity), moduleRoot, opts.packages.length);
|
|
70
|
+
if (recalled !== undefined)
|
|
71
|
+
return recalled;
|
|
72
|
+
}
|
|
56
73
|
const scratch = (0, createCanonicalTempDirectory_1.createCanonicalTempDirectory)("ttsc-package-selection-");
|
|
57
74
|
let taskFailure;
|
|
58
75
|
try {
|
|
@@ -61,6 +78,11 @@ var NativeSourcePackages;
|
|
|
61
78
|
retainedPaths: [scratch],
|
|
62
79
|
});
|
|
63
80
|
SourcePluginWorkspace_1.SourcePluginWorkspace.materialize(moduleRoot, scratch);
|
|
81
|
+
// An answer is recorded only for the copy its identity describes: a
|
|
82
|
+
// module edited between the identity reading and the copy observed
|
|
83
|
+
// other bytes than the key names.
|
|
84
|
+
let copiesKeyed = identity === undefined ||
|
|
85
|
+
(0, pluginSourceDigest_1.pluginSourceDigest)(scratch) === identity.module;
|
|
64
86
|
if (opts.proposal === true) {
|
|
65
87
|
// Only root manifests change. Relative Go inputs retain the source
|
|
66
88
|
// module layout, while its irrelevant graph/toolchain stays inactive.
|
|
@@ -80,25 +102,38 @@ var NativeSourcePackages;
|
|
|
80
102
|
const contributor = { source: input.source, name: input.name };
|
|
81
103
|
SourcePluginAdmission_1.SourcePluginAdmission.requireContributorPackage(opts.pluginName, contributor);
|
|
82
104
|
const target = node_path_1.default.resolve(scratch, input.entry);
|
|
83
|
-
if (node_path_1.default.relative(scratch, target).startsWith("..") ||
|
|
105
|
+
if (node_path_1.default.relative(scratch, target).startsWith("..") ||
|
|
106
|
+
target === scratch)
|
|
84
107
|
throw new Error("ttsc: invalid package selection target");
|
|
85
108
|
if (node_fs_1.default.existsSync(target))
|
|
86
109
|
throw new Error(`ttsc: package selection target already exists: ${target}`);
|
|
87
110
|
SourcePluginWorkspace_1.SourcePluginWorkspace.materialize(input.source, target);
|
|
111
|
+
if (identity !== undefined)
|
|
112
|
+
copiesKeyed &&=
|
|
113
|
+
(0, pluginSourceDigest_1.pluginSourceDigest)(target) ===
|
|
114
|
+
identity.entries.find((entry) => entry[0] === input.entry)?.[2];
|
|
88
115
|
}
|
|
89
|
-
|
|
90
|
-
if (reader === undefined) {
|
|
91
|
-
reader = SourcePluginWorkspace_1.SourcePluginWorkspace.createGoModReader(goBinary, opts.pluginName, env);
|
|
92
|
-
opts.readers?.set(goBinary, reader);
|
|
93
|
-
}
|
|
116
|
+
const reader = SourcePluginWorkspace_1.SourcePluginWorkspace.createGoModReader(goBinary, opts.pluginName, env, opts.readers, opts.identities);
|
|
94
117
|
SourcePluginWorkspace_1.SourcePluginWorkspace.writeGoWork(scratch, SourcePluginWorkspace_1.SourcePluginWorkspace.findTtscOverlayDirs(), goBinary, opts.pluginName, env, reader);
|
|
95
|
-
|
|
118
|
+
const observed = read({
|
|
96
119
|
cwd: scratch,
|
|
97
120
|
entries: opts.packages.map((input) => input.entry),
|
|
98
121
|
env: GoSourceInputs_1.GoSourceInputs.goBuildEnv(goBinary, undefined, env),
|
|
99
122
|
goBinary,
|
|
100
123
|
pluginName: opts.pluginName,
|
|
101
124
|
});
|
|
125
|
+
if (identity !== undefined &&
|
|
126
|
+
copiesKeyed &&
|
|
127
|
+
observed.every((input) => input.Error === undefined) &&
|
|
128
|
+
JSON.stringify(overlayDigests(opts.identities)) ===
|
|
129
|
+
JSON.stringify(identity.overlays))
|
|
130
|
+
PluginLoadAnswers_1.PluginLoadAnswers.write(opts.identities, SELECTION_ANSWER, identity, observed.map((input) => ({
|
|
131
|
+
...input,
|
|
132
|
+
Dir: input.Dir === undefined
|
|
133
|
+
? undefined
|
|
134
|
+
: node_path_1.default.relative(scratch, input.Dir),
|
|
135
|
+
})));
|
|
136
|
+
return observed;
|
|
102
137
|
}
|
|
103
138
|
catch (error) {
|
|
104
139
|
taskFailure = { error };
|
|
@@ -120,10 +155,10 @@ var NativeSourcePackages;
|
|
|
120
155
|
* @evidence contracts/common.md#meaningful-documentation Native prose states this operation's authority and delegated boundaries; fields retain separate native comments.
|
|
121
156
|
* @evidence contracts/portability.md#os-neutral-implementation Native module roots retain their selected spelling, without blanket case folding.
|
|
122
157
|
* @evidence contracts/performance.md#efficient-algorithms One grouping pass plus contextual copies and metadata work for each distinct module; output storage scales with input population.
|
|
123
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries in a module share one list; overlay module observations share the load's selected-tool readers,
|
|
158
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries in a module share one list; overlay module observations share the load's selected-tool readers, and the load's readings and record store reach each contextual observation so equal selections are answered from their content identity.
|
|
124
159
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Grouping/maps/results live for this call/load; scratch and native captures remain with inspect/read.
|
|
125
160
|
*/
|
|
126
|
-
function ownPackages(inputs, env, readers = new Map()) {
|
|
161
|
+
function ownPackages(inputs, env, readers = new Map(), identities, readings) {
|
|
127
162
|
const groups = new Map();
|
|
128
163
|
inputs.forEach((input, index) => {
|
|
129
164
|
const target = (0, resolvePluginGoModule_1.resolvePluginGoModule)(input.source, input.label);
|
|
@@ -139,9 +174,13 @@ var NativeSourcePackages;
|
|
|
139
174
|
pluginName: first.label,
|
|
140
175
|
env,
|
|
141
176
|
readers,
|
|
177
|
+
identities,
|
|
178
|
+
readings,
|
|
142
179
|
packages: group.map(({ entry }) => ({ entry })),
|
|
143
180
|
});
|
|
144
|
-
group.forEach(({ index }, offset) => {
|
|
181
|
+
group.forEach(({ index }, offset) => {
|
|
182
|
+
output[index] = observations[offset];
|
|
183
|
+
});
|
|
145
184
|
}
|
|
146
185
|
return output;
|
|
147
186
|
}
|
|
@@ -149,11 +188,11 @@ var NativeSourcePackages;
|
|
|
149
188
|
/**
|
|
150
189
|
* Propose ownership with the candidate-selected tool before final admission.
|
|
151
190
|
*
|
|
152
|
-
* Nested transform sources retain their admitted source-module layout but
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
191
|
+
* Nested transform sources retain their admitted source-module layout but use
|
|
192
|
+
* unchanged generic host root manifests in scratch. Their outer module graph
|
|
193
|
+
* and toolchain are not source-only build authority. Module-root and check
|
|
194
|
+
* sources retain their actual owning module. Executable proposals must agree
|
|
195
|
+
* in the actual own module; linked proposals in each chosen actual host.
|
|
157
196
|
*
|
|
158
197
|
* @evidence contracts/common.md#principled-implementation Candidate tool selection occurs at the original owning module and effective environment; only prospective nested source-only manifests change in owned scratch before Go interprets the normal generated workspace.
|
|
159
198
|
* @evidence contracts/common.md#clear-and-simple-design One grouping pass shares each module/proposal context and returns whether actual own-module observation already occurred.
|
|
@@ -161,10 +200,10 @@ var NativeSourcePackages;
|
|
|
161
200
|
* @evidence contracts/common.md#meaningful-documentation Native prose states deterministic proposal authority and mandatory final ownership confirmation.
|
|
162
201
|
* @evidence contracts/portability.md#os-neutral-implementation Native module/tool/environment owners preserve candidate-relative tool and source layout identity.
|
|
163
202
|
* @evidence contracts/performance.md#efficient-algorithms Groups inputs by module and actual/prospective mode, copies each admitted module once per context, and batches entries through Go metadata; retained work scales with source bytes and distinct contexts.
|
|
164
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries share one observation and per-load manifest readers;
|
|
203
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Equivalent entries share one observation and per-load manifest readers; a result crosses loads only through the record store's content identity, so a changed context observes Go again.
|
|
165
204
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Group records live for this call; scratch/process cleanup remains with inspect and no independent output byte cap is imposed.
|
|
166
205
|
*/
|
|
167
|
-
function propose(inputs, env, readers = new Map()) {
|
|
206
|
+
function propose(inputs, env, readers = new Map(), identities, readings) {
|
|
168
207
|
const groups = new Map();
|
|
169
208
|
inputs.forEach((input, index) => {
|
|
170
209
|
const target = (0, resolvePluginGoModule_1.resolvePluginGoModule)(input.source, input.label);
|
|
@@ -178,7 +217,12 @@ var NativeSourcePackages;
|
|
|
178
217
|
for (const group of groups.values()) {
|
|
179
218
|
const first = inputs[group[0].index];
|
|
180
219
|
const observations = inspect({
|
|
181
|
-
source: first.source,
|
|
220
|
+
source: first.source,
|
|
221
|
+
pluginName: first.label,
|
|
222
|
+
env,
|
|
223
|
+
readers,
|
|
224
|
+
identities,
|
|
225
|
+
readings,
|
|
182
226
|
proposal: !group[0].ownModule,
|
|
183
227
|
packages: group.map(({ entry }) => ({ entry })),
|
|
184
228
|
});
|
|
@@ -206,7 +250,14 @@ var NativeSourcePackages;
|
|
|
206
250
|
if (entries.length === 0)
|
|
207
251
|
return [];
|
|
208
252
|
OwnedSynchronousProcess_1.OwnedSynchronousProcess.checkpoint();
|
|
209
|
-
const result = (0, spawnGoTool_1.spawnGoTool)(opts.goBinary, [
|
|
253
|
+
const result = (0, spawnGoTool_1.spawnGoTool)(opts.goBinary, [
|
|
254
|
+
"list",
|
|
255
|
+
...GoSourceInputs_1.GoSourceInputs.BUILD_FLAGS,
|
|
256
|
+
"-find",
|
|
257
|
+
"-e",
|
|
258
|
+
"-json=Dir,Name,GoFiles,CgoFiles,Error",
|
|
259
|
+
...entries,
|
|
260
|
+
], { cwd: opts.cwd, encoding: "utf8", env: opts.env, windowsHide: true });
|
|
210
261
|
OwnedSynchronousProcess_1.OwnedSynchronousProcess.checkpoint();
|
|
211
262
|
if (result.error !== undefined)
|
|
212
263
|
throw new Error(SourcePluginWorkspace_1.SourcePluginWorkspace.goSpawnFailureMessage(`selecting Go packages for plugin "${opts.pluginName}"`, opts.pluginName, opts.goBinary, opts.cwd, result.error));
|
|
@@ -214,7 +265,8 @@ var NativeSourcePackages;
|
|
|
214
265
|
throw new Error(`ttsc: selecting Go packages for plugin "${opts.pluginName}" failed:\n${result.stderr || result.stdout}`);
|
|
215
266
|
const packages = parse(result.stdout);
|
|
216
267
|
const selected = new Map(packages.map((input) => [
|
|
217
|
-
input.Dir === undefined ? undefined : node_fs_1.default.realpathSync.native(input.Dir),
|
|
268
|
+
input.Dir === undefined ? undefined : node_fs_1.default.realpathSync.native(input.Dir),
|
|
269
|
+
input,
|
|
218
270
|
]));
|
|
219
271
|
return opts.entries.map((entry) => {
|
|
220
272
|
const dir = node_fs_1.default.realpathSync.native(node_path_1.default.resolve(opts.cwd, entry));
|
|
@@ -240,7 +292,8 @@ var NativeSourcePackages;
|
|
|
240
292
|
function kind(input, label, expected) {
|
|
241
293
|
if (input.Error !== undefined)
|
|
242
294
|
throw new Error(`ttsc: plugin "${label}" Go package selection failed: ${input.Error.Err}`);
|
|
243
|
-
if (input.Name === undefined ||
|
|
295
|
+
if (input.Name === undefined ||
|
|
296
|
+
(input.GoFiles?.length ?? 0) + (input.CgoFiles?.length ?? 0) === 0)
|
|
244
297
|
throw new Error(`ttsc: plugin "${label}" source has no Go-selected production files: ${input.Dir ?? "unknown package"}`);
|
|
245
298
|
const actual = input.Name === "main" ? "executable" : "linked";
|
|
246
299
|
if (expected !== undefined && actual !== expected)
|
|
@@ -297,8 +350,10 @@ var NativeSourcePackages;
|
|
|
297
350
|
if ((record.Dir !== undefined && typeof record.Dir !== "string") ||
|
|
298
351
|
(record.Name !== undefined && typeof record.Name !== "string") ||
|
|
299
352
|
[record.GoFiles, record.CgoFiles].some((files) => files !== undefined &&
|
|
300
|
-
(!Array.isArray(files) ||
|
|
301
|
-
|
|
353
|
+
(!Array.isArray(files) ||
|
|
354
|
+
files.some((file) => typeof file !== "string"))) ||
|
|
355
|
+
(record.Error !== undefined &&
|
|
356
|
+
(record.Error === null || typeof record.Error.Err !== "string")))
|
|
302
357
|
throw new Error("ttsc: invalid Go package metadata fields");
|
|
303
358
|
packages.push(record);
|
|
304
359
|
start = -1;
|
|
@@ -314,4 +369,104 @@ var NativeSourcePackages;
|
|
|
314
369
|
function genericHostSource() {
|
|
315
370
|
return node_path_1.default.resolve(__dirname, "../../../..", "cmd/utility-host");
|
|
316
371
|
}
|
|
372
|
+
/** Answer family of package selections (`PluginLoadAnswers`). */
|
|
373
|
+
const SELECTION_ANSWER = "go-package-selection";
|
|
374
|
+
/** Fields `read` asks Go for; part of the selection identity. */
|
|
375
|
+
const SELECTION_FIELDS = "-json=Dir,Name,GoFiles,CgoFiles,Error";
|
|
376
|
+
function selectionIdentity(opts, moduleRoot, goBinary, env, identities) {
|
|
377
|
+
try {
|
|
378
|
+
const readings = opts.readings ?? {};
|
|
379
|
+
const directory = (root) => {
|
|
380
|
+
const resolved = node_path_1.default.resolve(root);
|
|
381
|
+
let digest = readings.sources?.get(resolved);
|
|
382
|
+
if (digest === undefined) {
|
|
383
|
+
digest = PluginContentIdentities_1.PluginContentIdentities.sourceDirectory(identities, resolved);
|
|
384
|
+
readings.sources?.set(resolved, digest);
|
|
385
|
+
}
|
|
386
|
+
return digest;
|
|
387
|
+
};
|
|
388
|
+
const resolvedRoot = node_path_1.default.resolve(moduleRoot);
|
|
389
|
+
let environment = readings.environments?.get(resolvedRoot);
|
|
390
|
+
if (environment === undefined) {
|
|
391
|
+
const hash = node_crypto_1.default.createHash("sha256");
|
|
392
|
+
const witness = new Map();
|
|
393
|
+
(0, hashPluginBuildEnvironment_1.hashPluginBuildEnvironment)(hash, goBinary, moduleRoot, env, { readFile: (location) => node_fs_1.default.readFileSync(location) }, witness, identities);
|
|
394
|
+
environment = hash.digest("hex");
|
|
395
|
+
readings.environments?.set(resolvedRoot, environment);
|
|
396
|
+
readings.witnesses?.set(resolvedRoot, witness);
|
|
397
|
+
}
|
|
398
|
+
const host = opts.proposal === true
|
|
399
|
+
? (0, resolvePluginGoModule_1.resolvePluginGoModule)(genericHostSource(), opts.pluginName).moduleRoot
|
|
400
|
+
: undefined;
|
|
401
|
+
return {
|
|
402
|
+
format: 1,
|
|
403
|
+
command: [
|
|
404
|
+
"list",
|
|
405
|
+
...GoSourceInputs_1.GoSourceInputs.BUILD_FLAGS,
|
|
406
|
+
"-find",
|
|
407
|
+
"-e",
|
|
408
|
+
SELECTION_FIELDS,
|
|
409
|
+
],
|
|
410
|
+
mode: opts.proposal === true ? "proposal" : "actual",
|
|
411
|
+
module: directory(moduleRoot),
|
|
412
|
+
environment,
|
|
413
|
+
variables: Object.entries(GoSourceInputs_1.GoSourceInputs.goBuildEnv(goBinary, undefined, env))
|
|
414
|
+
.filter((entry) => entry[1] !== undefined && /^(GO|CGO_)/i.test(entry[0]))
|
|
415
|
+
.sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)),
|
|
416
|
+
manifests: host === undefined
|
|
417
|
+
? null
|
|
418
|
+
: ["go.mod", "go.sum"].map((name) => fileDigest(node_path_1.default.join(host, name))),
|
|
419
|
+
overlays: SourcePluginWorkspace_1.SourcePluginWorkspace.findTtscOverlayDirs().map(directory),
|
|
420
|
+
entries: opts.packages.map((input) => [
|
|
421
|
+
input.entry,
|
|
422
|
+
input.name ?? null,
|
|
423
|
+
input.source === undefined ? null : directory(input.source),
|
|
424
|
+
]),
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
catch {
|
|
428
|
+
// An identity that cannot be formed only costs the real observation.
|
|
429
|
+
return undefined;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
/** The digest of every overlay module, in the generated workspace's order. */
|
|
433
|
+
function overlayDigests(identities) {
|
|
434
|
+
return SourcePluginWorkspace_1.SourcePluginWorkspace.findTtscOverlayDirs().map((directory) => PluginContentIdentities_1.PluginContentIdentities.sourceDirectory(identities, directory));
|
|
435
|
+
}
|
|
436
|
+
/** A small manifest's content digest, or null when it does not exist. */
|
|
437
|
+
function fileDigest(file) {
|
|
438
|
+
try {
|
|
439
|
+
return node_crypto_1.default
|
|
440
|
+
.createHash("sha256")
|
|
441
|
+
.update(node_fs_1.default.readFileSync(file))
|
|
442
|
+
.digest("hex");
|
|
443
|
+
}
|
|
444
|
+
catch (error) {
|
|
445
|
+
if (error.code === "ENOENT")
|
|
446
|
+
return null;
|
|
447
|
+
throw error;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* A recorded selection rebased onto the module it now describes, or `undefined`
|
|
452
|
+
* when the record does not have the shape `read` produces.
|
|
453
|
+
*/
|
|
454
|
+
function recallSelection(value, moduleRoot, count) {
|
|
455
|
+
if (!Array.isArray(value) || value.length !== count)
|
|
456
|
+
return undefined;
|
|
457
|
+
try {
|
|
458
|
+
const packages = NativeSourcePackages.parse(value.map((input) => JSON.stringify(input)).join("\n"));
|
|
459
|
+
if (packages.length !== count)
|
|
460
|
+
return undefined;
|
|
461
|
+
return packages.map((input) => ({
|
|
462
|
+
...input,
|
|
463
|
+
Dir: input.Dir === undefined
|
|
464
|
+
? undefined
|
|
465
|
+
: node_path_1.default.resolve(moduleRoot, input.Dir),
|
|
466
|
+
}));
|
|
467
|
+
}
|
|
468
|
+
catch {
|
|
469
|
+
return undefined;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
317
472
|
//# sourceMappingURL=NativeSourcePackages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeSourcePackages.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/NativeSourcePackages.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,iGAA8F;AAC9F,uFAAoF;AACpF,qFAAkF;AAClF,iGAA8F;AAC9F,qDAAkD;AAClD,yDAAsD;AACtD,mEAAgE;AAChE,mEAAgE;AAChE,+EAA4E;AAC5E,2DAAwD;AACxD,mEAAgE;AAChE,+CAA4C;AAE5C;;;;;;;;;;;;;;GAcG;AACH,IAAiB,oBAAoB,CA2UpC;AA3UD,WAAiB,oBAAoB;IA8BnC;;;;;;;;;;;OAWG;IACH,SAAgB,OAAO,CAAC,IAOvB;QACC,MAAM,GAAG,GAAG,uCAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,6CAAqB,EAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,GAAG,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,mCAAgB,CAAC,qBAAqB,CACrD,QAAQ,CAAC,MA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BAAoB,GAApB,oBAAoB,QA2UpC;AAED,2EAA2E;AAC3E,SAAS,iBAAiB;IACxB,OAAO,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC;AACpE,CAAC"}
|
|
1
|
+
{"version":3,"file":"NativeSourcePackages.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/NativeSourcePackages.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,iGAA8F;AAC9F,uFAAoF;AACpF,qFAAkF;AAClF,iGAA8F;AAC9F,qDAAkD;AAClD,yDAAsD;AAEtD,uEAAoE;AACpE,2DAAwD;AACxD,mEAAgE;AAChE,mEAAgE;AAChE,+EAA4E;AAC5E,6EAA0E;AAC1E,6DAA0D;AAC1D,2DAAwD;AACxD,mEAAgE;AAChE,+CAA4C;AAE5C;;;;;;;;;;;;;;GAcG;AACH,IAAiB,oBAAoB,CAuepC;AAveD,WAAiB,oBAAoB;IA2DnC;;;;;;;;;;;OAWG;IACH,SAAgB,OAAO,CAAC,IAmBvB;QACC,MAAM,GAAG,GAAG,uCAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,6CAAqB,EAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,GAAG,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,mCAAgB,CAAC,qBAAqB,CACrD,QAAQ,CAAC,MAAM,EACf,GAAG,EACH,UAAU,CACX,CAAC;QACF,IAAA,yDAA2B,EAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxD,0EAA0E;QAC1E,uEAAuE;QACvE,0EAA0E;QAC1E,2CAA2C;QAC3C,MAAM,QAAQ,GACZ,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iBAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;aAC7B,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QACpE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CACtB,KAAc,EACd,UAAkB,EAClB,KAAa;IAEb,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK;QAAE,OAAO,SAAS,CAAC;IACtE,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CACzC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACvD,CAAC;QACF,IAAI,QAAQ,CAAC,MAAM,KAAK,KAAK;YAAE,OAAO,SAAS,CAAC;QAChD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC9B,GAAG,KAAK;YACR,GAAG,EACD,KAAK,CAAC,GAAG,KAAK,SAAS;gBACrB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,mBAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC;SAC1C,CAAC,CAAC,CAAC;IACN,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -54,20 +54,51 @@ export declare namespace PluginBuildEnvironmentReadings {
|
|
|
54
54
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The operation borrows a process-owned record and retains no request history.
|
|
55
55
|
*/
|
|
56
56
|
function cached(directory: string): string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Qualify a batch in one synchronous observation transaction. Shared SDK
|
|
59
|
+
* paths and the complete variable identity are read once, even when several
|
|
60
|
+
* plugin directories use them. Missing readings remain explicitly missing.
|
|
61
|
+
*
|
|
62
|
+
* WARNING (#1712): this map belongs only to the following synchronous proof.
|
|
63
|
+
* Never retain it across an await, delivery, build boundary or publication. A
|
|
64
|
+
* process-permanent positive witness would miss changed Go tools and GOENV
|
|
65
|
+
* files (#1516); independently checking it in every helper instead multiplies
|
|
66
|
+
* a thousands-file GOROOT scan by modules and proof layers.
|
|
67
|
+
*
|
|
68
|
+
* @evidence contracts/common.md#principled-implementation One current variable snapshot and native path observation are compared against each reading's own expected witness; conflicting expected states cannot both pass.
|
|
69
|
+
* @evidence contracts/common.md#clear-and-simple-design One batch operation owns shared validation without changing synchronous reads or native worker publication boundaries.
|
|
70
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Undefined is retained for absent or stale authority; no positive verdict survives this explicit observation transaction.
|
|
71
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs state scope, missing semantics and the performance/correctness regressions prevented by the lifetime restriction.
|
|
72
|
+
* @evidence contracts/portability.md#os-neutral-implementation Existing native witness keys preserve filesystem, link and ambient-variable distinctions; no platform case assumption is added.
|
|
73
|
+
* @evidence contracts/performance.md#efficient-algorithms Full variables are indexed once; each distinct witnessed path is queried once while each reading compares its own witness entries. Work is proportional to variable bytes, total witness entries and unique native dependencies rather than repeated native SDK scans.
|
|
74
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Only current native observations within this synchronous batch are shared; the returned digests do not authorize reuse after another asynchronous boundary.
|
|
75
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The native observation map is call-local and the digest map transfers to its immediate proof caller; no handle or historical registry is acquired.
|
|
76
|
+
*/
|
|
77
|
+
function cachedAll(directories: Iterable<string>): ReadonlyMap<string, string | undefined>;
|
|
57
78
|
/**
|
|
58
79
|
* Read synchronously for clients whose API owns synchronous native work.
|
|
59
80
|
* Explicit refresh preserves the original fresh-comparison semantics.
|
|
60
81
|
*
|
|
82
|
+
* WARNING (#1725): the map above ends with the process, and every consumer
|
|
83
|
+
* that proves a plugin-source state starts a new one: a bundler worker, a
|
|
84
|
+
* capability host, the language server. Without the project's record store
|
|
85
|
+
* each of them walked and hashed the whole GOROOT (1.7 s for the bundled
|
|
86
|
+
* toolchain) on its first proof. A caller that names its project lets a miss
|
|
87
|
+
* prove the SDK and executables from the plugin cache's records.
|
|
88
|
+
*
|
|
89
|
+
* @param directory Plugin source directory whose build environment is read.
|
|
90
|
+
* @param refresh Bypass a cached reading.
|
|
91
|
+
* @param projectRoot Project whose plugin cache root holds the records.
|
|
61
92
|
* @evidence contracts/common.md#principled-implementation The same native reader constructs a digest paired with its pre-read witness; optional cached reuse validates current variables/metadata. A fresh synchronous reading is published without a separate post-read qualification here and relies on the native reader's premises.
|
|
62
93
|
* @evidence contracts/common.md#clear-and-simple-design The synchronous boundary shares cached authority and delegates fresh observation to its owning reader.
|
|
63
94
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts A requested refresh actually probes the selected native toolchain.
|
|
64
95
|
* @evidence contracts/common.md#meaningful-documentation Native prose identifies the synchronous execution owner and explicit refresh meaning.
|
|
65
96
|
* @evidence contracts/portability.md#os-neutral-implementation Native Go selection and filesystem witnesses remain delegated to the shared reader.
|
|
66
97
|
* @evidence contracts/performance.md#efficient-algorithms Hits pay complete variable-text indexing and native witness queries. Misses/refresh merge environment values, perform actual toolchain/SDK/content work, then rebuild the full variable-text key for publication; native/path/file/name/value bytes contribute cost beyond invocation count.
|
|
67
|
-
* @evidence contracts/performance.md#reuse-equivalent-work Synchronous and asynchronous clients share the same qualified readings.
|
|
98
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Synchronous and asynchronous clients share the same qualified readings; a miss of a caller naming its project takes SDK and executable digests from the record store across processes.
|
|
68
99
|
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Retention belongs to the namespace; this call publishes one replacement record.
|
|
69
100
|
*/
|
|
70
|
-
function read(directory: string, refresh?: boolean): string;
|
|
101
|
+
function read(directory: string, refresh?: boolean, projectRoot?: string): string;
|
|
71
102
|
/**
|
|
72
103
|
* Prepare native authority off the host thread, sharing equivalent concurrent
|
|
73
104
|
* requests. A changed environment or witness during transfer refuses the
|
|
@@ -77,6 +108,14 @@ export declare namespace PluginBuildEnvironmentReadings {
|
|
|
77
108
|
* requests can create a worker after retirement. Refresh bypasses a cached
|
|
78
109
|
* reading but can still share an equivalent in-flight request.
|
|
79
110
|
*
|
|
111
|
+
* A caller that names its project lets the worker prove the SDK and
|
|
112
|
+
* executables from the plugin cache's records (#1722). The worker is its own
|
|
113
|
+
* isolate, so without them it reads the whole GOROOT once per process, which
|
|
114
|
+
* a bundler or runtime restarting on every edit pays every time.
|
|
115
|
+
*
|
|
116
|
+
* @param directory Plugin source directory whose build environment is read.
|
|
117
|
+
* @param refresh Bypass a cached reading.
|
|
118
|
+
* @param projectRoot Project whose plugin cache root holds the records.
|
|
80
119
|
* @evidence contracts/common.md#principled-implementation Worker results publish only under their exact current variable identity and still-current native pre-read witness; changed or unwitnessable transfer windows reject instead of publishing authority or retrying indefinitely.
|
|
81
120
|
* @evidence contracts/common.md#clear-and-simple-design Qualified hits return immediately; equivalent misses share one pending promise and exclusive queued worker request.
|
|
82
121
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Go/environment/SDK preparation occurs in the worker rather than blocking the async host or fabricating a digest from compiler output.
|
|
@@ -86,5 +125,5 @@ export declare namespace PluginBuildEnvironmentReadings {
|
|
|
86
125
|
* @evidence contracts/performance.md#reuse-equivalent-work Pending identity is directory plus complete variables; the warm worker shares native toolchain memos while published authority still requires fresh witness validation.
|
|
87
126
|
* @evidence contracts/performance.md#bound-retention-and-release-resources Pending identity entries are removed in finally at settlement and per-request worker listeners are removed by the terminal path. Idle worker remains unreferenced with lifetime retirement listeners; worker failure initiates termination without awaiting completion. Distinct queued contexts retain environment/witness/promise data without a population bound or timeout, and a stalled producer blocks later queued work.
|
|
88
127
|
*/
|
|
89
|
-
function prepare(directory: string, refresh?: boolean): Promise<string>;
|
|
128
|
+
function prepare(directory: string, refresh?: boolean, projectRoot?: string): Promise<string>;
|
|
90
129
|
}
|