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.
Files changed (155) hide show
  1. package/cmd/platform/main.go +2 -2
  2. package/internal/sourceprocess/contain_windows.go +10 -13
  3. package/internal/sourceprocess/started_windows.go +41 -0
  4. package/internal/sourceprocess/windows_started_publication_distinguishes_pending_from_refusal_test.go +76 -0
  5. package/internal/watchhelper/run.go +30 -20
  6. package/internal/watchhelper/run_other.go +4 -4
  7. package/internal/watchhelper/run_windows.go +471 -0
  8. package/internal/watchhelper/watchhelper.go +8 -2
  9. package/internal/watchhelper/windows_notifications_preserve_mutations_without_access_noise_test.go +506 -0
  10. package/lib/compiler/internal/build/BuildExecution.d.ts +4 -2
  11. package/lib/compiler/internal/build/BuildExecution.js +40 -12
  12. package/lib/compiler/internal/build/BuildExecution.js.map +1 -1
  13. package/lib/compiler/internal/startResidentTransform.js +5 -4
  14. package/lib/compiler/internal/startResidentTransform.js.map +1 -1
  15. package/lib/compiler/internal/transformProjectInMemory.js +9 -7
  16. package/lib/compiler/internal/transformProjectInMemory.js.map +1 -1
  17. package/lib/internal/javascriptRuntimeCapabilities.d.ts +13 -4
  18. package/lib/internal/javascriptRuntimeCapabilities.js +56 -6
  19. package/lib/internal/javascriptRuntimeCapabilities.js.map +1 -1
  20. package/lib/internal/nativeBinary.d.ts +3 -3
  21. package/lib/internal/nativeBinary.js +3 -3
  22. package/lib/internal/pluginSource.d.ts +1 -0
  23. package/lib/internal/pluginSource.js +1 -0
  24. package/lib/internal/pluginSource.js.map +1 -1
  25. package/lib/internal/resolveNodeBinary.d.ts +6 -1
  26. package/lib/internal/resolveNodeBinary.js +6 -2
  27. package/lib/internal/resolveNodeBinary.js.map +1 -1
  28. package/lib/internal/runtimeExecutableIdentity.d.ts +22 -13
  29. package/lib/internal/runtimeExecutableIdentity.js +192 -102
  30. package/lib/internal/runtimeExecutableIdentity.js.map +1 -1
  31. package/lib/launcher/internal/runtime/installRuntimeHooks.js +58 -4
  32. package/lib/launcher/internal/runtime/installRuntimeHooks.js.map +1 -1
  33. package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.d.ts +5 -1
  34. package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js +7 -2
  35. package/lib/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.js.map +1 -1
  36. package/lib/launcher/internal/ttscserver/runTtscserver.js +8 -1
  37. package/lib/launcher/internal/ttscserver/runTtscserver.js.map +1 -1
  38. package/lib/plugin/internal/CapabilityResolutionFormat.d.ts +21 -62
  39. package/lib/plugin/internal/CapabilityResolutionFormat.js +15 -106
  40. package/lib/plugin/internal/CapabilityResolutionFormat.js.map +1 -1
  41. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.d.ts +6 -0
  42. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js +4 -4
  43. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js.map +1 -1
  44. package/lib/plugin/internal/load/loadProjectPlugins.d.ts +24 -14
  45. package/lib/plugin/internal/load/loadProjectPlugins.js +141 -56
  46. package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
  47. package/lib/plugin/internal/readCapabilityResolution.d.ts +6 -0
  48. package/lib/plugin/internal/readCapabilityResolution.js +8 -5
  49. package/lib/plugin/internal/readCapabilityResolution.js.map +1 -1
  50. package/lib/plugin/internal/source/GoEnvironmentReading.d.ts +48 -0
  51. package/lib/plugin/internal/source/GoEnvironmentReading.js +156 -0
  52. package/lib/plugin/internal/source/GoEnvironmentReading.js.map +1 -0
  53. package/lib/plugin/internal/source/NativeSourcePackages.d.ts +51 -13
  54. package/lib/plugin/internal/source/NativeSourcePackages.js +182 -27
  55. package/lib/plugin/internal/source/NativeSourcePackages.js.map +1 -1
  56. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.d.ts +42 -3
  57. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js +68 -7
  58. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js.map +1 -1
  59. package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.d.ts +5 -3
  60. package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.js +14 -8
  61. package/lib/plugin/internal/source/PluginBuildEnvironmentWitness.js.map +1 -1
  62. package/lib/plugin/internal/source/PluginContentIdentities.d.ts +265 -0
  63. package/lib/plugin/internal/source/PluginContentIdentities.js +452 -0
  64. package/lib/plugin/internal/source/PluginContentIdentities.js.map +1 -0
  65. package/lib/plugin/internal/source/PluginLoadAnswers.d.ts +63 -0
  66. package/lib/plugin/internal/source/PluginLoadAnswers.js +128 -0
  67. package/lib/plugin/internal/source/PluginLoadAnswers.js.map +1 -0
  68. package/lib/plugin/internal/source/SourceBuildCacheLayout.d.ts +10 -0
  69. package/lib/plugin/internal/source/SourceBuildCacheLayout.js +12 -0
  70. package/lib/plugin/internal/source/SourceBuildCacheLayout.js.map +1 -1
  71. package/lib/plugin/internal/source/SourcePluginWorkspace.d.ts +53 -19
  72. package/lib/plugin/internal/source/SourcePluginWorkspace.js +111 -22
  73. package/lib/plugin/internal/source/SourcePluginWorkspace.js.map +1 -1
  74. package/lib/plugin/internal/source/buildSourcePlugin.d.ts +34 -18
  75. package/lib/plugin/internal/source/buildSourcePlugin.js +52 -24
  76. package/lib/plugin/internal/source/buildSourcePlugin.js.map +1 -1
  77. package/lib/plugin/internal/source/computeCacheKey.d.ts +25 -7
  78. package/lib/plugin/internal/source/computeCacheKey.js +85 -34
  79. package/lib/plugin/internal/source/computeCacheKey.js.map +1 -1
  80. package/lib/plugin/internal/source/hashPluginBuildEnvironment.d.ts +7 -3
  81. package/lib/plugin/internal/source/hashPluginBuildEnvironment.js +75 -102
  82. package/lib/plugin/internal/source/hashPluginBuildEnvironment.js.map +1 -1
  83. package/lib/plugin/internal/source/pluginBuildEnvironment.d.ts +8 -3
  84. package/lib/plugin/internal/source/pluginBuildEnvironment.js +8 -4
  85. package/lib/plugin/internal/source/pluginBuildEnvironment.js.map +1 -1
  86. package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js +12 -2
  87. package/lib/plugin/internal/source/pluginBuildEnvironmentWorker.js.map +1 -1
  88. package/lib/plugin/internal/source/pluginBuildVersions.d.ts +2 -2
  89. package/lib/plugin/internal/source/pluginBuildVersions.js +4 -17
  90. package/lib/plugin/internal/source/pluginBuildVersions.js.map +1 -1
  91. package/lib/plugin/internal/source/pluginModuleReplaceDirectories.d.ts +6 -5
  92. package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js +10 -17
  93. package/lib/plugin/internal/source/pluginModuleReplaceDirectories.js.map +1 -1
  94. package/lib/plugin/internal/source/pluginSourceState.d.ts +6 -2
  95. package/lib/plugin/internal/source/pluginSourceState.js +20 -8
  96. package/lib/plugin/internal/source/pluginSourceState.js.map +1 -1
  97. package/lib/plugin/internal/source/pluginSourceStateHolds.d.ts +7 -2
  98. package/lib/plugin/internal/source/pluginSourceStateHolds.js +12 -7
  99. package/lib/plugin/internal/source/pluginSourceStateHolds.js.map +1 -1
  100. package/lib/plugin/internal/source/processPluginBuildEnvironment.d.ts +7 -2
  101. package/lib/plugin/internal/source/processPluginBuildEnvironment.js +8 -3
  102. package/lib/plugin/internal/source/processPluginBuildEnvironment.js.map +1 -1
  103. package/lib/plugin/internal/source/provenPluginSourceDigest.d.ts +28 -0
  104. package/lib/plugin/internal/source/provenPluginSourceDigest.js +41 -0
  105. package/lib/plugin/internal/source/provenPluginSourceDigest.js.map +1 -0
  106. package/lib/plugin/internal/source/pruneCacheFileRoot.d.ts +3 -2
  107. package/lib/plugin/internal/source/pruneCacheFileRoot.js +3 -2
  108. package/lib/plugin/internal/source/pruneCacheFileRoot.js.map +1 -1
  109. package/lib/plugin/internal/source/ttscPackageVersion.d.ts +26 -0
  110. package/lib/plugin/internal/source/ttscPackageVersion.js +47 -0
  111. package/lib/plugin/internal/source/ttscPackageVersion.js.map +1 -0
  112. package/lib/plugin/internal/writeCapabilityResolution.d.ts +6 -0
  113. package/lib/plugin/internal/writeCapabilityResolution.js +11 -7
  114. package/lib/plugin/internal/writeCapabilityResolution.js.map +1 -1
  115. package/lib/plugin/resolveCapabilityPlugins.js +67 -15
  116. package/lib/plugin/resolveCapabilityPlugins.js.map +1 -1
  117. package/package.json +8 -8
  118. package/src/compiler/internal/build/BuildExecution.ts +46 -13
  119. package/src/compiler/internal/startResidentTransform.ts +12 -3
  120. package/src/compiler/internal/transformProjectInMemory.ts +10 -2
  121. package/src/internal/javascriptRuntimeCapabilities.ts +71 -5
  122. package/src/internal/nativeBinary.ts +3 -3
  123. package/src/internal/pluginSource.ts +1 -0
  124. package/src/internal/resolveNodeBinary.ts +12 -1
  125. package/src/internal/runtimeExecutableIdentity.ts +227 -141
  126. package/src/launcher/internal/runtime/installRuntimeHooks.ts +68 -3
  127. package/src/launcher/internal/ttscserver/captureLSPPluginSelectionInputs.ts +11 -2
  128. package/src/launcher/internal/ttscserver/runTtscserver.ts +18 -1
  129. package/src/plugin/internal/CapabilityResolutionFormat.ts +23 -107
  130. package/src/plugin/internal/load/PluginDescriptorEvaluationCache.ts +14 -4
  131. package/src/plugin/internal/load/loadProjectPlugins.ts +421 -211
  132. package/src/plugin/internal/readCapabilityResolution.ts +17 -6
  133. package/src/plugin/internal/source/GoEnvironmentReading.ts +178 -0
  134. package/src/plugin/internal/source/NativeSourcePackages.ts +365 -48
  135. package/src/plugin/internal/source/PluginBuildEnvironmentReadings.ts +83 -5
  136. package/src/plugin/internal/source/PluginBuildEnvironmentWitness.ts +18 -8
  137. package/src/plugin/internal/source/PluginContentIdentities.ts +563 -0
  138. package/src/plugin/internal/source/PluginLoadAnswers.ts +151 -0
  139. package/src/plugin/internal/source/SourceBuildCacheLayout.ts +14 -0
  140. package/src/plugin/internal/source/SourcePluginWorkspace.ts +148 -25
  141. package/src/plugin/internal/source/buildSourcePlugin.ts +104 -36
  142. package/src/plugin/internal/source/computeCacheKey.ts +129 -55
  143. package/src/plugin/internal/source/hashPluginBuildEnvironment.ts +152 -105
  144. package/src/plugin/internal/source/pluginBuildEnvironment.ts +9 -2
  145. package/src/plugin/internal/source/pluginBuildEnvironmentWorker.ts +18 -2
  146. package/src/plugin/internal/source/pluginBuildVersions.ts +5 -26
  147. package/src/plugin/internal/source/pluginModuleReplaceDirectories.ts +13 -25
  148. package/src/plugin/internal/source/pluginSourceState.ts +28 -12
  149. package/src/plugin/internal/source/pluginSourceStateHolds.ts +15 -8
  150. package/src/plugin/internal/source/processPluginBuildEnvironment.ts +8 -2
  151. package/src/plugin/internal/source/provenPluginSourceDigest.ts +45 -0
  152. package/src/plugin/internal/source/pruneCacheFileRoot.ts +3 -2
  153. package/src/plugin/internal/source/ttscPackageVersion.ts +45 -0
  154. package/src/plugin/internal/writeCapabilityResolution.ts +29 -8
  155. package/src/plugin/resolveCapabilityPlugins.ts +87 -13
@@ -1 +1 @@
1
- {"version":3,"file":"pluginSourceStateHolds.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginSourceStateHolds.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAC1D,2DAAwD;AACxD,mFAAgF;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,gCACE,SAAiB,EACjB,KAAa,EACb,OAAO,GAA8B,EAAE;IAEvC,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,IAAA,uCAAkB,EAAC,SAAS,CAAC,CAAC;IAC3E,IAAI,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IAC1E,IAAA,6DAA6B,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC/C,OAAO,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK,CAAC;AAClE,CAAC"}
1
+ {"version":3,"file":"pluginSourceStateHolds.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pluginSourceStateHolds.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,mFAAgF;AAChF,yEAAsE;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,gCACE,SAAiB,EACjB,KAAa,EACb,OAAO,GAAoD,EAAE;IAE7D,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,YAAY,GAChB,OAAO,CAAC,YAAY,IAAI,IAAA,mDAAwB,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAC3E,IAAI,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK;QACvE,OAAO,IAAI,CAAC;IACd,IAAA,6DAA6B,EAAC,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAC5D,OAAO,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK,CAAC;AAC/E,CAAC"}
@@ -19,15 +19,20 @@
19
19
  * possible metadata-restored change. The build itself never reads through here:
20
20
  * it keys each binary on a fresh read.
21
21
  *
22
+ * A caller that names its project lets a reading this process does not hold
23
+ * prove the SDK and executables from that project's plugin cache records
24
+ * (#1725) instead of reading the whole GOROOT in every new process.
25
+ *
22
26
  * @param directory The directory a build runs `go` in.
23
27
  * @param refresh Whether to read the environment again rather than reuse it.
28
+ * @param projectRoot Project whose plugin cache root holds the records.
24
29
  * @evidence contracts/common.md#principled-implementation Variable serialization is sorted and length-delimited; reuse additionally requires unchanged pre-read metadata for every external dependency, including all contributing GOROOT directories and files, under the witness's documented metadata-distinguishability premise.
25
30
  * @evidence contracts/common.md#clear-and-simple-design One process-local map owns environment memoization; fresh construction and witness validation remain separate operations shared with build verification.
26
31
  * @evidence contracts/common.md#prohibited-implementation-shortcuts Refresh performs the real environment read rather than assuming that a stable compiler path or quiet source tree implies a stable toolchain.
27
32
  * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain why environment probing is retained, its variable/path invalidation, and why builds still read fresh; descriptive prose and tags are separated.
28
33
  * @evidence contracts/portability.md#os-neutral-implementation Native environment and filesystem identity are delegated to the shared platform-aware probe and metadata witness rather than inferred from an OS name.
29
34
  * @evidence contracts/performance.md#efficient-algorithms The delegated owner serializes/hashes variable names/values after text-sensitive sorting and validates witnessed native paths. A qualified hit avoids cold tool/content preparation but not native lookup/path/link/text costs. Misses/refresh delegate actual Go/toolchain/SDK readings; V/P counts alone do not bound all bytes or native work.
30
- * @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced.
35
+ * @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced. A miss naming a project proves the SDK and executables from that project's record store across processes.
31
36
  * @evidence contracts/performance.md#bound-retention-and-release-resources PluginBuildEnvironmentReadings owns the process-shared map and asynchronous worker/request lifetimes, not this forwarding call. Existing keys are replaced, but distinct directory/variable combinations retain historical witnesses without an eviction bound; consumers and the owner govern that retention.
32
37
  */
33
- export declare function processPluginBuildEnvironment(directory: string, refresh?: boolean): string;
38
+ export declare function processPluginBuildEnvironment(directory: string, refresh?: boolean, projectRoot?: string): string;
@@ -23,18 +23,23 @@ const PluginBuildEnvironmentReadings_1 = require("./PluginBuildEnvironmentReadin
23
23
  * possible metadata-restored change. The build itself never reads through here:
24
24
  * it keys each binary on a fresh read.
25
25
  *
26
+ * A caller that names its project lets a reading this process does not hold
27
+ * prove the SDK and executables from that project's plugin cache records
28
+ * (#1725) instead of reading the whole GOROOT in every new process.
29
+ *
26
30
  * @param directory The directory a build runs `go` in.
27
31
  * @param refresh Whether to read the environment again rather than reuse it.
32
+ * @param projectRoot Project whose plugin cache root holds the records.
28
33
  * @evidence contracts/common.md#principled-implementation Variable serialization is sorted and length-delimited; reuse additionally requires unchanged pre-read metadata for every external dependency, including all contributing GOROOT directories and files, under the witness's documented metadata-distinguishability premise.
29
34
  * @evidence contracts/common.md#clear-and-simple-design One process-local map owns environment memoization; fresh construction and witness validation remain separate operations shared with build verification.
30
35
  * @evidence contracts/common.md#prohibited-implementation-shortcuts Refresh performs the real environment read rather than assuming that a stable compiler path or quiet source tree implies a stable toolchain.
31
36
  * @evidence contracts/common.md#meaningful-documentation Native paragraphs explain why environment probing is retained, its variable/path invalidation, and why builds still read fresh; descriptive prose and tags are separated.
32
37
  * @evidence contracts/portability.md#os-neutral-implementation Native environment and filesystem identity are delegated to the shared platform-aware probe and metadata witness rather than inferred from an OS name.
33
38
  * @evidence contracts/performance.md#efficient-algorithms The delegated owner serializes/hashes variable names/values after text-sensitive sorting and validates witnessed native paths. A qualified hit avoids cold tool/content preparation but not native lookup/path/link/text costs. Misses/refresh delegate actual Go/toolchain/SDK readings; V/P counts alone do not bound all bytes or native work.
34
- * @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced.
39
+ * @evidence contracts/performance.md#reuse-equivalent-work Directory and all effective variables identify a candidate reading; the complete external-path witness must hold, otherwise the environment is read and its record replaced. A miss naming a project proves the SDK and executables from that project's record store across processes.
35
40
  * @evidence contracts/performance.md#bound-retention-and-release-resources PluginBuildEnvironmentReadings owns the process-shared map and asynchronous worker/request lifetimes, not this forwarding call. Existing keys are replaced, but distinct directory/variable combinations retain historical witnesses without an eviction bound; consumers and the owner govern that retention.
36
41
  */
37
- function processPluginBuildEnvironment(directory, refresh = false) {
38
- return PluginBuildEnvironmentReadings_1.PluginBuildEnvironmentReadings.read(directory, refresh);
42
+ function processPluginBuildEnvironment(directory, refresh = false, projectRoot) {
43
+ return PluginBuildEnvironmentReadings_1.PluginBuildEnvironmentReadings.read(directory, refresh, projectRoot);
39
44
  }
40
45
  //# sourceMappingURL=processPluginBuildEnvironment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"processPluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/processPluginBuildEnvironment.ts"],"names":[],"mappings":";;;AAAA,qFAAkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,uCACE,SAAiB,EACjB,OAAO,GAAG,KAAK;IAEf,OAAO,+DAA8B,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACjE,CAAC"}
1
+ {"version":3,"file":"processPluginBuildEnvironment.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/processPluginBuildEnvironment.ts"],"names":[],"mappings":";;;AAAA,qFAAkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,uCACE,SAAiB,EACjB,OAAO,GAAG,KAAK,EACf,WAAoB;IAEpB,OAAO,+DAA8B,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The `pluginSourceDigest` of a plugin source directory, proven from the
3
+ * records of `projectRoot`'s plugin cache when the caller names its project.
4
+ *
5
+ * WARNING (#1725): a consumer that proves a reported plugin-source state in a
6
+ * new process, such as a bundler worker, a capability host or the language
7
+ * server, read every source byte again because its own memo starts empty. The
8
+ * load that reported the state already recorded this digest
9
+ * (`PluginContentIdentities`), so a process that names the same project reuses
10
+ * it while the files' metadata still holds. Without a project, or when no store
11
+ * can be opened, the bytes are read as before.
12
+ *
13
+ * @param directory The source directory.
14
+ * @param projectRoot Project whose plugin cache root holds the records.
15
+ * @param env Environment selecting that cache root; this process's by default.
16
+ * @returns The digest, as lowercase hex.
17
+ * @throws When a listed source file cannot be read, as `pluginSourceDigest`
18
+ * does.
19
+ * @evidence contracts/common.md#principled-implementation The record store applies its separable-signature rule to exactly the files the digest reads; every unproved premise falls back to the content reader.
20
+ * @evidence contracts/common.md#clear-and-simple-design Store opening and the population proof stay with PluginContentIdentities; this entry only names the project for consumers outside the loader.
21
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No path, timestamp or process memo stands for content; the store refuses a root inside the source.
22
+ * @evidence contracts/common.md#meaningful-documentation The paragraphs state the regression, the reuse premise and the fallback.
23
+ * @evidence contracts/portability.md#os-neutral-implementation Cache-root selection and device-keyed references are delegated to the shared owners.
24
+ * @evidence contracts/performance.md#efficient-algorithms A proven digest stats the selected files; an unproven one also reads their bytes once. Opening the store writes two reference probes.
25
+ * @evidence contracts/performance.md#reuse-equivalent-work The digest the load recorded is reused across processes under the same project's store.
26
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The store lives for this call; records belong to the cache root's single-file pruning.
27
+ */
28
+ export declare function provenPluginSourceDigest(directory: string, projectRoot?: string, env?: NodeJS.ProcessEnv): string;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.provenPluginSourceDigest = provenPluginSourceDigest;
4
+ const PluginContentIdentities_1 = require("./PluginContentIdentities");
5
+ /**
6
+ * The `pluginSourceDigest` of a plugin source directory, proven from the
7
+ * records of `projectRoot`'s plugin cache when the caller names its project.
8
+ *
9
+ * WARNING (#1725): a consumer that proves a reported plugin-source state in a
10
+ * new process, such as a bundler worker, a capability host or the language
11
+ * server, read every source byte again because its own memo starts empty. The
12
+ * load that reported the state already recorded this digest
13
+ * (`PluginContentIdentities`), so a process that names the same project reuses
14
+ * it while the files' metadata still holds. Without a project, or when no store
15
+ * can be opened, the bytes are read as before.
16
+ *
17
+ * @param directory The source directory.
18
+ * @param projectRoot Project whose plugin cache root holds the records.
19
+ * @param env Environment selecting that cache root; this process's by default.
20
+ * @returns The digest, as lowercase hex.
21
+ * @throws When a listed source file cannot be read, as `pluginSourceDigest`
22
+ * does.
23
+ * @evidence contracts/common.md#principled-implementation The record store applies its separable-signature rule to exactly the files the digest reads; every unproved premise falls back to the content reader.
24
+ * @evidence contracts/common.md#clear-and-simple-design Store opening and the population proof stay with PluginContentIdentities; this entry only names the project for consumers outside the loader.
25
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts No path, timestamp or process memo stands for content; the store refuses a root inside the source.
26
+ * @evidence contracts/common.md#meaningful-documentation The paragraphs state the regression, the reuse premise and the fallback.
27
+ * @evidence contracts/portability.md#os-neutral-implementation Cache-root selection and device-keyed references are delegated to the shared owners.
28
+ * @evidence contracts/performance.md#efficient-algorithms A proven digest stats the selected files; an unproven one also reads their bytes once. Opening the store writes two reference probes.
29
+ * @evidence contracts/performance.md#reuse-equivalent-work The digest the load recorded is reused across processes under the same project's store.
30
+ * @evidence contracts/performance.md#bound-retention-and-release-resources The store lives for this call; records belong to the cache root's single-file pruning.
31
+ */
32
+ function provenPluginSourceDigest(directory, projectRoot, env = process.env) {
33
+ return PluginContentIdentities_1.PluginContentIdentities.sourceDirectory(projectRoot === undefined
34
+ ? undefined
35
+ : PluginContentIdentities_1.PluginContentIdentities.open({
36
+ projectRoot,
37
+ env,
38
+ sources: [directory],
39
+ }), directory);
40
+ }
41
+ //# sourceMappingURL=provenPluginSourceDigest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provenPluginSourceDigest.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/provenPluginSourceDigest.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,kCACE,SAAiB,EACjB,WAAoB,EACpB,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,OAAO,iDAAuB,CAAC,eAAe,CAC5C,WAAW,KAAK,SAAS;QACvB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,iDAAuB,CAAC,IAAI,CAAC;YAC3B,WAAW;YACX,GAAG;YACH,OAAO,EAAE,CAAC,SAAS,CAAC;SACrB,CAAC,EACN,SAAS,CACV,CAAC;AACJ,CAAC"}
@@ -2,8 +2,9 @@ import type { IPluginCachePruneOptions } from "./IPluginCachePruneOptions";
2
2
  /**
3
3
  * Opportunistically bound a part of the cache root whose entries are single
4
4
  * files: the descriptor evaluations under `descriptors/`, the capability
5
- * answers under `capabilities/`, and the lowered orphan sources under
6
- * `ttsx-orphan/`.
5
+ * answers under `capabilities/`, the plugin content identities under
6
+ * `identities/`, the plugin-load answers under `answers/`, and the lowered
7
+ * orphan sources under `ttsx-orphan/`.
7
8
  *
8
9
  * The policy is the plugin cache's (`CachePrunePolicy`). An entry's last use is
9
10
  * its modification time: a write sets it, and every hit records a use by
@@ -11,8 +11,9 @@ const SourceBuildCacheLayout_1 = require("./SourceBuildCacheLayout");
11
11
  /**
12
12
  * Opportunistically bound a part of the cache root whose entries are single
13
13
  * files: the descriptor evaluations under `descriptors/`, the capability
14
- * answers under `capabilities/`, and the lowered orphan sources under
15
- * `ttsx-orphan/`.
14
+ * answers under `capabilities/`, the plugin content identities under
15
+ * `identities/`, the plugin-load answers under `answers/`, and the lowered
16
+ * orphan sources under `ttsx-orphan/`.
16
17
  *
17
18
  * The policy is the plugin cache's (`CachePrunePolicy`). An entry's last use is
18
19
  * its modification time: a write sets it, and every hit records a use by
@@ -1 +1 @@
1
- {"version":3,"file":"pruneCacheFileRoot.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/pruneCacheFileRoot.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,yDAAsD;AAEtD,qEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,4BACE,IAAY,EACZ,OAAO,GAAuD,EAAE;IAEhE,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,iBAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,cAAc,EAAE;YAAE,OAAO;QAC3D,IAAI,GAAG,+CAAsB,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,mBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,mCAAgB,CAAC,cAAc,CAAC,CAAC;QAChE,MAA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
2
+ * The version of this ttsc package, read from its own manifest once per
3
+ * process, or `"0.0.0"` when the manifest cannot be read or names none.
4
+ *
5
+ * WARNING (#1726): a reader that only needs ttsc's own version must take it
6
+ * here, never from `pluginBuildVersions`, which also resolves the project's
7
+ * `typescript` package. A plugin descriptor evaluator opens a record store
8
+ * while its module resolution recorder runs, and on a runtime whose
9
+ * `require.resolve` consults resolve hooks every such lookup became an input of
10
+ * the descriptor: absent `typescript` candidates below the cache root's
11
+ * ancestors, whose proofs the system temporary directory's metadata then
12
+ * withdrew. Reading a file here resolves no module.
13
+ *
14
+ * The host installation is assumed stable for the process lifetime; changing
15
+ * its manifest does not refresh the label.
16
+ *
17
+ * @evidence contracts/common.md#principled-implementation The label is this package's manifest version, the same value plugin keys and record identities have always named; an unreadable manifest yields the documented default instead of a guess.
18
+ * @evidence contracts/common.md#clear-and-simple-design One reader owns the host label; `pluginBuildVersions` composes it with the project's compiler version.
19
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The manifest beside the compiled module is read directly; no module resolution or fixture version stands in for it.
20
+ * @evidence contracts/common.md#meaningful-documentation The paragraphs state the value, the regression that motivates a resolution-free reader and the process-stable premise.
21
+ * @evidence contracts/portability.md#os-neutral-implementation The manifest path is joined with Node path APIs relative to this module, without separator or case assumptions.
22
+ * @evidence contracts/performance.md#efficient-algorithms The first call reads and parses one small manifest; later calls return the retained label.
23
+ * @evidence contracts/performance.md#reuse-equivalent-work Every caller in the process shares one reading of an installation assumed stable for that process.
24
+ * @evidence contracts/performance.md#bound-retention-and-release-resources One label string is retained for the process lifetime; the synchronous read leaves no descriptor open.
25
+ */
26
+ export declare function ttscPackageVersion(): string;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ttscPackageVersion = ttscPackageVersion;
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ /**
10
+ * The version of this ttsc package, read from its own manifest once per
11
+ * process, or `"0.0.0"` when the manifest cannot be read or names none.
12
+ *
13
+ * WARNING (#1726): a reader that only needs ttsc's own version must take it
14
+ * here, never from `pluginBuildVersions`, which also resolves the project's
15
+ * `typescript` package. A plugin descriptor evaluator opens a record store
16
+ * while its module resolution recorder runs, and on a runtime whose
17
+ * `require.resolve` consults resolve hooks every such lookup became an input of
18
+ * the descriptor: absent `typescript` candidates below the cache root's
19
+ * ancestors, whose proofs the system temporary directory's metadata then
20
+ * withdrew. Reading a file here resolves no module.
21
+ *
22
+ * The host installation is assumed stable for the process lifetime; changing
23
+ * its manifest does not refresh the label.
24
+ *
25
+ * @evidence contracts/common.md#principled-implementation The label is this package's manifest version, the same value plugin keys and record identities have always named; an unreadable manifest yields the documented default instead of a guess.
26
+ * @evidence contracts/common.md#clear-and-simple-design One reader owns the host label; `pluginBuildVersions` composes it with the project's compiler version.
27
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The manifest beside the compiled module is read directly; no module resolution or fixture version stands in for it.
28
+ * @evidence contracts/common.md#meaningful-documentation The paragraphs state the value, the regression that motivates a resolution-free reader and the process-stable premise.
29
+ * @evidence contracts/portability.md#os-neutral-implementation The manifest path is joined with Node path APIs relative to this module, without separator or case assumptions.
30
+ * @evidence contracts/performance.md#efficient-algorithms The first call reads and parses one small manifest; later calls return the retained label.
31
+ * @evidence contracts/performance.md#reuse-equivalent-work Every caller in the process shares one reading of an installation assumed stable for that process.
32
+ * @evidence contracts/performance.md#bound-retention-and-release-resources One label string is retained for the process lifetime; the synchronous read leaves no descriptor open.
33
+ */
34
+ function ttscPackageVersion() {
35
+ if (version !== undefined)
36
+ return version;
37
+ try {
38
+ const manifest = JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.resolve(__dirname, "..", "..", "..", "..", "package.json"), "utf8"));
39
+ version = manifest.version ?? "0.0.0";
40
+ }
41
+ catch {
42
+ version = "0.0.0";
43
+ }
44
+ return version;
45
+ }
46
+ let version;
47
+ //# sourceMappingURL=ttscPackageVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ttscPackageVersion.js","sourceRoot":"","sources":["../../../../src/plugin/internal/source/ttscPackageVersion.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IACE,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAC1C,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CACzB,iBAAE,CAAC,YAAY,CACb,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAC/D,MAAM,CACP,CACsB,CAAC;QAC1B,OAAO,GAAG,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,OAAO,CAAC;IACpB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,IAAI,OAA2B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { ITtscCapabilityResolutionEntry } from "./ITtscCapabilityResolutionEntry";
2
2
  import type { ITtscCapabilityResolutionPlugin } from "./ITtscCapabilityResolutionPlugin";
3
+ import { PluginContentIdentities } from "./source/PluginContentIdentities";
3
4
  /**
4
5
  * Record the answer and the state it was true for.
5
6
  *
@@ -53,6 +54,11 @@ export declare function writeCapabilityResolution(options: {
53
54
  env?: NodeJS.ProcessEnv;
54
55
  /** Pre-load authority key; a moved evaluation authority refuses the write. */
55
56
  expectedAuthority?: string;
57
+ /**
58
+ * Record store of the project's plugin cache, which proves the runtime and
59
+ * the plugin sources and SDK from metadata instead of their bytes (#1725).
60
+ */
61
+ identities?: PluginContentIdentities.Store;
56
62
  }, answer: {
57
63
  /**
58
64
  * The evaluation-time content hash or unavailable null state reported by
@@ -10,8 +10,8 @@ const node_path_1 = __importDefault(require("node:path"));
10
10
  const SidecarEnvironment_1 = require("../../compiler/internal/sharedHost/SidecarEnvironment");
11
11
  const E2ETrace_1 = require("../../internal/E2ETrace");
12
12
  const CapabilityResolutionFormat_1 = require("./CapabilityResolutionFormat");
13
+ const PluginContentIdentities_1 = require("./source/PluginContentIdentities");
13
14
  const SourceBuildCacheLayout_1 = require("./source/SourceBuildCacheLayout");
14
- const pluginSourceDigest_1 = require("./source/pluginSourceDigest");
15
15
  const pluginSourceFilesSignature_1 = require("./source/pluginSourceFilesSignature");
16
16
  const pluginSourceState_1 = require("./source/pluginSourceState");
17
17
  /**
@@ -116,7 +116,7 @@ function writeCapabilityResolution(options, answer) {
116
116
  return null;
117
117
  }
118
118
  }
119
- const evidence = CapabilityResolutionFormat_1.CapabilityResolutionFormat.sourceEvidence(CapabilityResolutionFormat_1.CapabilityResolutionFormat.clockReference(file));
119
+ const evidence = PluginContentIdentities_1.PluginContentIdentities.sourceEvidence(PluginContentIdentities_1.PluginContentIdentities.mintReference(node_path_1.default.dirname(file)));
120
120
  const entry = {
121
121
  hostInputHashes,
122
122
  hostInputRealpaths,
@@ -124,7 +124,7 @@ function writeCapabilityResolution(options, answer) {
124
124
  manifest: answer.manifest,
125
125
  pluginSources: Object.fromEntries(Object.entries(answer.pluginSources).map(([directory, state]) => [
126
126
  directory,
127
- recordPluginSource(directory, state, evidence),
127
+ recordPluginSource(directory, state, evidence, node_path_1.default.resolve(options.cwd), options.identities),
128
128
  ])),
129
129
  plugins: answer.plugins.map((plugin) => ({
130
130
  binary: plugin.binary,
@@ -173,18 +173,22 @@ function writeCapabilityResolution(options, answer) {
173
173
  * when both signatures agree, every stamp was separable from a reference minted
174
174
  * before the read, and the digest gives the very state the load reported, so
175
175
  * the entry never vouches for sources the binary was not built from. Anything
176
- * else records the state alone, which a read proves in full.
176
+ * else records the state alone, which a read proves in full. The digest comes
177
+ * from the project's record store when its metadata still holds there, which
178
+ * places it inside the same two signatures, so a new process does not read
179
+ * every source byte again (#1725).
177
180
  */
178
- function recordPluginSource(directory, state, evidence) {
181
+ function recordPluginSource(directory, state, evidence, projectRoot, identities) {
179
182
  try {
180
183
  const before = (0, pluginSourceFilesSignature_1.pluginSourceFilesSignature)(directory, evidence);
181
- const digest = (0, pluginSourceDigest_1.pluginSourceDigest)(directory);
184
+ const digest = PluginContentIdentities_1.PluginContentIdentities.sourceDirectory(identities, directory);
182
185
  const after = (0, pluginSourceFilesSignature_1.pluginSourceFilesSignature)(directory, evidence);
183
186
  if (before !== undefined &&
184
187
  after !== undefined &&
185
188
  before.signature === after.signature &&
186
189
  after.separable &&
187
- (0, pluginSourceState_1.pluginSourceState)(directory, { sourceDigest: digest }) === state) {
190
+ (0, pluginSourceState_1.pluginSourceState)(directory, { projectRoot, sourceDigest: digest }) ===
191
+ state) {
188
192
  return { digest, signature: after.signature, state };
189
193
  }
190
194
  }
@@ -1 +1 @@
1
- {"version":3,"file":"writeCapabilityResolution.js","sourceRoot":"","sources":["../../../src/plugin/internal/writeCapabilityResolution.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,8FAA2F;AAC3F,sDAAmD;AACnD,6EAA0E;AAI1E,4EAAyE;AACzE,oEAAiE;AACjE,oFAAiF;AACjF,kEAA+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,mCACE,OAeC,EACD,MA8BC;IAED,IAAI,IAAI,GAAG,uDAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9D,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,mBAAQ,CAAC,oBAAoB,CAAC,eAAe,EAAE;YAC7C,MAAM,EAAE,+BAA+B;SACxC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IACE,OAAO,CAAC,iBAAiB,KAAK,SAAS;QACvC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E,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,kBAAkB,CACzB,SAAiB,EACjB,KAAa,EACb,QAAsE;IAEtE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,uDAA0B,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,IAAA,uCAAkB,EAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,KAAK,GAAG,IAAA,uDAA0B,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9D,IACE,MAAM,KAAK,SAAS;YACpB,KAAK,KAAK,SAAS;YACnB,MAAM,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS;YACpC,KAAK,CAAC,SAAS;YACf,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,EAChE,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;QACvD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,wEAAwE;IAC1E,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"writeCapabilityResolution.js","sourceRoot":"","sources":["../../../src/plugin/internal/writeCapabilityResolution.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAE7B,8FAA2F;AAC3F,sDAAmD;AACnD,6EAA0E;AAI1E,8EAA2E;AAC3E,4EAAyE;AACzE,oFAAiF;AACjF,kEAA+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,mCACE,OAqBC,EACD,MA8BC;IAED,IAAI,IAAI,GAAG,uDAA0B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9D,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,mBAAQ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AC,eAAe,EAAE;YAC7C,IAAI;YACJ,MAAM,EAAE,uBAAuB;SAChC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YACH,iBAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACtC,CAAC;QAAC,MAAM,CAAC;YACP,gEAAgE;QAClE,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAS,kBAAkB,CACzB,SAAiB,EACjB,KAAa,EACb,QAAmE,EACnE,WAAmB,EACnB,UAAqD;IAErD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,uDAA0B,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,iDAAuB,CAAC,eAAe,CACpD,UAAU,EACV,SAAS,CACV,CAAC;QACF,MAAM,KAAK,GAAG,IAAA,uDAA0B,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9D,IACE,MAAM,KAAK,SAAS;YACpB,KAAK,KAAK,SAAS;YACnB,MAAM,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS;YACpC,KAAK,CAAC,SAAS;YACf,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;gBACjE,KAAK,EACP,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;QACvD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,wEAAwE;IAC1E,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AACnB,CAAC"}
@@ -16,6 +16,7 @@ const CapabilityPluginResult_1 = require("./internal/CapabilityPluginResult");
16
16
  const CapabilityResolutionFormat_1 = require("./internal/CapabilityResolutionFormat");
17
17
  const loadProjectPlugins_1 = require("./internal/load/loadProjectPlugins");
18
18
  const readCapabilityResolution_1 = require("./internal/readCapabilityResolution");
19
+ const PluginContentIdentities_1 = require("./internal/source/PluginContentIdentities");
19
20
  const writeCapabilityResolution_1 = require("./internal/writeCapabilityResolution");
20
21
  /**
21
22
  * The built sidecars of a project's configured plugins that declare one
@@ -88,12 +89,26 @@ function resolveCapabilityPluginResolution(options) {
88
89
  // the same cwd. NUL cannot occur in a filename, so this discovery key cannot
89
90
  // collide with an explicitly supplied path.
90
91
  const tsconfig = options.tsconfig ?? `${String.fromCharCode(0)}discovered`;
91
- const runtimeProved = capabilityRuntimeAuthorityComplete(cwd);
92
+ // WARNING (#1725): every lookup proved the runtime by streaming it, and a hit
93
+ // proved the plugin sources and the whole GOROOT by their bytes, in each
94
+ // process. One store of the project's plugin cache serves every proof of
95
+ // this resolution, opened only once the runtime may be cached at all.
96
+ const identities = capabilityRecordStore(cwd);
97
+ const runtimeProved = capabilityRuntimeAuthorityComplete(cwd, identities);
92
98
  const authority = runtimeProved
93
- ? CapabilityResolutionFormat_1.CapabilityResolutionFormat.resolutionFile({ cwd, tsconfig })
99
+ ? CapabilityResolutionFormat_1.CapabilityResolutionFormat.resolutionFile({
100
+ cwd,
101
+ tsconfig,
102
+ identities: identities(),
103
+ })
94
104
  : null;
95
105
  const cached = runtimeProved
96
- ? (0, readCapabilityResolution_1.readCapabilityResolution)({ cwd, tsconfig, version })
106
+ ? (0, readCapabilityResolution_1.readCapabilityResolution)({
107
+ cwd,
108
+ tsconfig,
109
+ version,
110
+ identities: identities(),
111
+ })
97
112
  : null;
98
113
  E2ETrace_1.E2ETrace.capabilityResolution("lookup", {
99
114
  cwd,
@@ -104,7 +119,7 @@ function resolveCapabilityPluginResolution(options) {
104
119
  cacheHit: cached !== null,
105
120
  });
106
121
  if (cached !== null)
107
- return resolved(cached, options.capability, cwd, tsconfig, authority);
122
+ return resolved(cached, options.capability, cwd, tsconfig, authority, identities);
108
123
  const binary = (0, resolveBinary_1.resolveBinary)();
109
124
  if (binary === null || binary === undefined)
110
125
  return CapabilityPluginResult_1.CapabilityPluginResult.unavailable();
@@ -153,11 +168,20 @@ function resolveCapabilityPluginResolution(options) {
153
168
  const recorded = runtimeProved &&
154
169
  authority !== null &&
155
170
  (authorityUnchanged =
156
- CapabilityResolutionFormat_1.CapabilityResolutionFormat.resolutionFile({ cwd, tsconfig }) ===
157
- authority) &&
171
+ CapabilityResolutionFormat_1.CapabilityResolutionFormat.resolutionFile({
172
+ cwd,
173
+ tsconfig,
174
+ identities: identities(),
175
+ }) === authority) &&
158
176
  loaded.descriptorReadsDeclared &&
159
177
  loaded.discoveryInputsComplete
160
- ? (0, writeCapabilityResolution_1.writeCapabilityResolution)({ cwd, tsconfig, version, expectedAuthority: authority }, answer)
178
+ ? (0, writeCapabilityResolution_1.writeCapabilityResolution)({
179
+ cwd,
180
+ tsconfig,
181
+ version,
182
+ expectedAuthority: authority,
183
+ identities: identities(),
184
+ }, answer)
161
185
  : null;
162
186
  E2ETrace_1.E2ETrace.capabilityResolution("answer", {
163
187
  cwd,
@@ -184,9 +208,29 @@ function resolveCapabilityPluginResolution(options) {
184
208
  plugins: CapabilityPluginResult_1.CapabilityPluginResult.select(answer, options.capability),
185
209
  status: "resolved",
186
210
  }
187
- : resolved(recorded, options.capability, cwd, tsconfig, authority);
211
+ : resolved(recorded, options.capability, cwd, tsconfig, authority, identities);
188
212
  });
189
213
  }
214
+ /**
215
+ * The record store of `cwd`'s plugin cache, opened on first use and kept for
216
+ * the resolution and its later freshness queries, or `undefined` when none can
217
+ * be opened. A kept store's references only grow older, which can make fewer
218
+ * stamps separable but never more.
219
+ */
220
+ function capabilityRecordStore(cwd) {
221
+ let opened = false;
222
+ let store;
223
+ return () => {
224
+ if (!opened) {
225
+ opened = true;
226
+ store = PluginContentIdentities_1.PluginContentIdentities.open({
227
+ projectRoot: cwd,
228
+ env: process.env,
229
+ });
230
+ }
231
+ return store;
232
+ };
233
+ }
190
234
  /**
191
235
  * Whether the keyed executable is the actual sole descriptor runtime.
192
236
  *
@@ -198,7 +242,7 @@ function resolveCapabilityPluginResolution(options) {
198
242
  * operation's existing decision and preserves short-circuited comparisons as
199
243
  * unobserved, without repeating native queries.
200
244
  */
201
- function capabilityRuntimeAuthorityComplete(cwd) {
245
+ function capabilityRuntimeAuthorityComplete(cwd, identities) {
202
246
  if (SidecarEnvironment_1.SidecarEnvironment.read(process.env, "NODE_OPTIONS")?.trim()) {
203
247
  E2ETrace_1.E2ETrace.capabilityResolution("runtime-authority", {
204
248
  cwd,
@@ -219,7 +263,7 @@ function capabilityRuntimeAuthorityComplete(cwd) {
219
263
  return false;
220
264
  }
221
265
  try {
222
- const capabilities = (0, javascriptRuntimeCapabilities_1.javascriptRuntimeCapabilities)(runtime, process.env, cwd);
266
+ const capabilities = (0, javascriptRuntimeCapabilities_1.javascriptRuntimeCapabilities)(runtime, process.env, cwd, identities());
223
267
  let executableMatches;
224
268
  const proved = !capabilities.bun &&
225
269
  capabilities.registerHooks &&
@@ -249,17 +293,25 @@ function capabilityRuntimeAuthorityComplete(cwd) {
249
293
  }
250
294
  }
251
295
  /** A complete accepted cache generation and its owning validity query. */
252
- function resolved(entry, capability, cwd, tsconfig, authority) {
296
+ function resolved(entry, capability, cwd, tsconfig, authority, identities) {
253
297
  const proof = JSON.stringify(entry);
254
298
  return {
255
299
  isCurrent: () => {
256
300
  try {
257
301
  if (authority === null ||
258
- !capabilityRuntimeAuthorityComplete(cwd) ||
259
- CapabilityResolutionFormat_1.CapabilityResolutionFormat.resolutionFile({ cwd, tsconfig }) !==
260
- authority)
302
+ !capabilityRuntimeAuthorityComplete(cwd, identities) ||
303
+ CapabilityResolutionFormat_1.CapabilityResolutionFormat.resolutionFile({
304
+ cwd,
305
+ tsconfig,
306
+ identities: identities(),
307
+ }) !== authority)
261
308
  return false;
262
- const current = (0, readCapabilityResolution_1.readCapabilityResolution)({ cwd, tsconfig, version });
309
+ const current = (0, readCapabilityResolution_1.readCapabilityResolution)({
310
+ cwd,
311
+ tsconfig,
312
+ version,
313
+ identities: identities(),
314
+ });
263
315
  return current !== null && JSON.stringify(current) === proof;
264
316
  }
265
317
  catch {
@@ -1 +1 @@
1
- {"version":3,"file":"resolveCapabilityPlugins.js","sourceRoot":"","sources":["../../src/plugin/resolveCapabilityPlugins.ts"],"names":[],"mappings":";;;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,gHAA6G;AAC7G,sEAAmE;AACnE,2FAAwF;AACxF,mDAAgD;AAChD,6FAA0F;AAK1F,8EAA2E;AAC3E,sFAAmF;AAEnF,2EAAwE;AACxE,kFAA+E;AAC/E,oFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,kCAAyC,OAIxC;IACC,OAAO,CAAC,GAAG,iCAAiC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,2CAAkD,OASjD;IACC,MAAM,GAAG,GAAG,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACvD,2EAA2E;IAC3E,6EAA6E;IAC7E,4CAA4C;IAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC;IAC3E,MAAM,aAAa,GAAG,kCAAkC,CAAC,GAAG,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,aAAa;QAC7B,CAAC,CAAC,uDAA0B,CAAC,cAAc,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;QAC9D,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,MAAM,GAAG,aAAa;QAC1B,CAAC,CAAC,IAAA,mDAAwB,EAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;QACtD,CAAC,CAAC,IAAI,CAAC;IACT,mBAAQ,CA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ACR,OAAO;oBACP,UAAU,EAAE,UAAU,EAAE;iBACzB,CAAC,CAAC;gBACH,OAAO,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,KAAK,CAAC;YAC/D,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,OAAO,EAAE,+CAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC;QACzD,MAAM,EAAE,UAAU;KACnB,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE;IAC5B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CACzB,iBAAE,CAAC,YAAY,CACb,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EACnD,MAAM,CACP,CACuB,CAAC;QAC3B,OAAO,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttsc",
3
- "version": "0.31.0",
3
+ "version": "0.31.2",
4
4
  "description": "General-purpose TypeScript-Go compiler, runtime, plugin host, and LSP host.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -61,13 +61,13 @@
61
61
  },
62
62
  "optionalDependencies": {
63
63
  "fsevents": "^2.3.3",
64
- "@ttsc/linux-arm": "0.31.0",
65
- "@ttsc/linux-arm64": "0.31.0",
66
- "@ttsc/darwin-x64": "0.31.0",
67
- "@ttsc/darwin-arm64": "0.31.0",
68
- "@ttsc/win32-x64": "0.31.0",
69
- "@ttsc/win32-arm64": "0.31.0",
70
- "@ttsc/linux-x64": "0.31.0"
64
+ "@ttsc/linux-x64": "0.31.2",
65
+ "@ttsc/darwin-x64": "0.31.2",
66
+ "@ttsc/linux-arm64": "0.31.2",
67
+ "@ttsc/win32-x64": "0.31.2",
68
+ "@ttsc/win32-arm64": "0.31.2",
69
+ "@ttsc/darwin-arm64": "0.31.2",
70
+ "@ttsc/linux-arm": "0.31.2"
71
71
  },
72
72
  "sideEffects": [
73
73
  "./lib/register.js",