@ttsc/unplugin 0.31.5 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/bridge/TtscProjectRecord.d.cts +8 -0
- package/lib/core/bridge/TtscProjectRecord.d.mts +8 -0
- package/lib/core/bridge/TtscProjectRecord.d.ts +8 -0
- package/lib/core/bridge/readProjectRecordFile.js +5 -1
- package/lib/core/bridge/readProjectRecordFile.js.map +1 -1
- package/lib/core/bridge/readProjectRecordFile.mjs +5 -1
- package/lib/core/bridge/readProjectRecordFile.mjs.map +1 -1
- package/lib/core/observer/WatchScope.d.cts +3 -3
- package/lib/core/observer/WatchScope.d.mts +3 -3
- package/lib/core/observer/WatchScope.d.ts +3 -3
- package/lib/core/observer/createInputObserver.d.cts +7 -8
- package/lib/core/observer/createInputObserver.d.mts +7 -8
- package/lib/core/observer/createInputObserver.d.ts +7 -8
- package/lib/core/observer/createInputObserver.js +7 -8
- package/lib/core/observer/createInputObserver.js.map +1 -1
- package/lib/core/observer/createInputObserver.mjs +7 -8
- package/lib/core/observer/createInputObserver.mjs.map +1 -1
- package/lib/core/options/ResolvedTtscUnpluginOptions.d.cts +2 -0
- package/lib/core/options/ResolvedTtscUnpluginOptions.d.mts +2 -0
- package/lib/core/options/ResolvedTtscUnpluginOptions.d.ts +2 -0
- package/lib/core/options/TtscUnpluginOptions.d.cts +12 -2
- package/lib/core/options/TtscUnpluginOptions.d.mts +12 -2
- package/lib/core/options/TtscUnpluginOptions.d.ts +12 -2
- package/lib/core/options/resolveOptions.d.cts +4 -3
- package/lib/core/options/resolveOptions.d.mts +4 -3
- package/lib/core/options/resolveOptions.d.ts +4 -3
- package/lib/core/options/resolveOptions.js +5 -3
- package/lib/core/options/resolveOptions.js.map +1 -1
- package/lib/core/options/resolveOptions.mjs +5 -3
- package/lib/core/options/resolveOptions.mjs.map +1 -1
- package/lib/core/transform/TtscPrecompilation.d.cts +52 -0
- package/lib/core/transform/TtscPrecompilation.d.mts +52 -0
- package/lib/core/transform/TtscPrecompilation.d.ts +52 -0
- package/lib/core/transform/TtscPrecompilation.js +101 -0
- package/lib/core/transform/TtscPrecompilation.js.map +1 -0
- package/lib/core/transform/TtscPrecompilation.mjs +101 -0
- package/lib/core/transform/TtscPrecompilation.mjs.map +1 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.cts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.mts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.ts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.js +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.js.map +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs.map +1 -1
- package/lib/core/transform/cache/withdrawTtscTransformGenerations.js +2 -0
- package/lib/core/transform/cache/withdrawTtscTransformGenerations.js.map +1 -1
- package/lib/core/transform/cache/withdrawTtscTransformGenerations.mjs +2 -0
- package/lib/core/transform/cache/withdrawTtscTransformGenerations.mjs.map +1 -1
- package/lib/core/transform/envelope/generationCaseSensitivity.d.cts +32 -0
- package/lib/core/transform/envelope/generationCaseSensitivity.d.mts +32 -0
- package/lib/core/transform/envelope/generationCaseSensitivity.d.ts +32 -0
- package/lib/core/transform/envelope/generationCaseSensitivity.js +39 -0
- package/lib/core/transform/envelope/generationCaseSensitivity.js.map +1 -0
- package/lib/core/transform/envelope/generationCaseSensitivity.mjs +37 -0
- package/lib/core/transform/envelope/generationCaseSensitivity.mjs.map +1 -0
- package/lib/core/transform/envelope/selectExternalInputPaths.js +2 -1
- package/lib/core/transform/envelope/selectExternalInputPaths.js.map +1 -1
- package/lib/core/transform/envelope/selectExternalInputPaths.mjs +2 -1
- package/lib/core/transform/envelope/selectExternalInputPaths.mjs.map +1 -1
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.js +2 -1
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.js.map +1 -1
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.mjs +2 -1
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.mjs.map +1 -1
- package/lib/core/transform/filesystem/createHostPathIdentityContext.d.cts +9 -1
- package/lib/core/transform/filesystem/createHostPathIdentityContext.d.mts +9 -1
- package/lib/core/transform/filesystem/createHostPathIdentityContext.d.ts +9 -1
- package/lib/core/transform/filesystem/createHostPathIdentityContext.js +10 -2
- package/lib/core/transform/filesystem/createHostPathIdentityContext.js.map +1 -1
- package/lib/core/transform/filesystem/createHostPathIdentityContext.mjs +10 -2
- package/lib/core/transform/filesystem/createHostPathIdentityContext.mjs.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.d.cts +2 -0
- package/lib/core/transform/generation/captureTransformGeneration.d.mts +2 -0
- package/lib/core/transform/generation/captureTransformGeneration.d.ts +2 -0
- package/lib/core/transform/generation/captureTransformGeneration.js +17 -4
- package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs +17 -4
- package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
- package/lib/core/transform/generation/selectPersistentHostInputs.js +2 -1
- package/lib/core/transform/generation/selectPersistentHostInputs.js.map +1 -1
- package/lib/core/transform/generation/selectPersistentHostInputs.mjs +2 -1
- package/lib/core/transform/generation/selectPersistentHostInputs.mjs.map +1 -1
- package/lib/core/transform/generation/transformProject.d.cts +2 -0
- package/lib/core/transform/generation/transformProject.d.mts +2 -0
- package/lib/core/transform/generation/transformProject.d.ts +2 -0
- package/lib/core/transform/generation/transformProject.js.map +1 -1
- package/lib/core/transform/generation/transformProject.mjs.map +1 -1
- package/lib/core/transform/inputs/nativeInputPredicateState.js.map +1 -1
- package/lib/core/transform/inputs/nativeInputPredicateState.mjs.map +1 -1
- package/lib/core/transform/tracker/createHostInputMutationTracker.d.cts +7 -1
- package/lib/core/transform/tracker/createHostInputMutationTracker.d.mts +7 -1
- package/lib/core/transform/tracker/createHostInputMutationTracker.d.ts +7 -1
- package/lib/core/transform/tracker/createHostInputMutationTracker.js +8 -2
- package/lib/core/transform/tracker/createHostInputMutationTracker.js.map +1 -1
- package/lib/core/transform/tracker/createHostInputMutationTracker.mjs +8 -2
- package/lib/core/transform/tracker/createHostInputMutationTracker.mjs.map +1 -1
- package/lib/core/transform/tracker/createProjectMutationTracker.d.cts +6 -4
- package/lib/core/transform/tracker/createProjectMutationTracker.d.mts +6 -4
- package/lib/core/transform/tracker/createProjectMutationTracker.d.ts +6 -4
- package/lib/core/transform/tracker/createProjectMutationTracker.js +29 -6
- package/lib/core/transform/tracker/createProjectMutationTracker.js.map +1 -1
- package/lib/core/transform/tracker/createProjectMutationTracker.mjs +29 -6
- package/lib/core/transform/tracker/createProjectMutationTracker.mjs.map +1 -1
- package/lib/core/transform/transformTtsc.d.cts +8 -24
- package/lib/core/transform/transformTtsc.d.mts +8 -24
- package/lib/core/transform/transformTtsc.d.ts +8 -24
- package/lib/core/transform/transformTtsc.js +56 -32
- package/lib/core/transform/transformTtsc.js.map +1 -1
- package/lib/core/transform/transformTtsc.mjs +56 -32
- package/lib/core/transform/transformTtsc.mjs.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.d.cts +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.d.mts +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.d.ts +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js +12 -4
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +12 -4
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.d.cts +9 -2
- package/lib/core/transform/validation/matchesCachedSource.d.mts +9 -2
- package/lib/core/transform/validation/matchesCachedSource.d.ts +9 -2
- package/lib/core/transform/validation/matchesCachedSource.js +11 -3
- package/lib/core/transform/validation/matchesCachedSource.js.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.mjs +11 -3
- package/lib/core/transform/validation/matchesCachedSource.mjs.map +1 -1
- package/lib/core/transform/watch/TtscTransformHooks.d.cts +9 -0
- package/lib/core/transform/watch/TtscTransformHooks.d.mts +9 -0
- package/lib/core/transform/watch/TtscTransformHooks.d.ts +9 -0
- package/lib/core/transform/watch/TtscWatchInputBaseline.d.cts +2 -1
- package/lib/core/transform/watch/TtscWatchInputBaseline.d.mts +2 -1
- package/lib/core/transform/watch/TtscWatchInputBaseline.d.ts +2 -1
- package/lib/core/transform/watch/isWatchInputKeyBaseline.js.map +1 -1
- package/lib/core/transform/watch/isWatchInputKeyBaseline.mjs.map +1 -1
- package/lib/core/transform/watch/notifyProjectRecord.d.cts +3 -4
- package/lib/core/transform/watch/notifyProjectRecord.d.mts +3 -4
- package/lib/core/transform/watch/notifyProjectRecord.d.ts +3 -4
- package/lib/core/transform/watch/notifyProjectRecord.js +5 -4
- package/lib/core/transform/watch/notifyProjectRecord.js.map +1 -1
- package/lib/core/transform/watch/notifyProjectRecord.mjs +5 -4
- package/lib/core/transform/watch/notifyProjectRecord.mjs.map +1 -1
- package/lib/core/transform/watch/recordedDependencyWitnesses.d.cts +30 -0
- package/lib/core/transform/watch/recordedDependencyWitnesses.d.mts +30 -0
- package/lib/core/transform/watch/recordedDependencyWitnesses.d.ts +30 -0
- package/lib/core/transform/watch/recordedDependencyWitnesses.js +51 -0
- package/lib/core/transform/watch/recordedDependencyWitnesses.js.map +1 -0
- package/lib/core/transform/watch/recordedDependencyWitnesses.mjs +49 -0
- package/lib/core/transform/watch/recordedDependencyWitnesses.mjs.map +1 -0
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.d.cts +1 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.d.mts +1 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.d.ts +1 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.js +1 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.js.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.mjs +1 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.mjs.map +1 -1
- package/lib/core/tsconfig/TsconfigReadTransaction.d.cts +11 -8
- package/lib/core/tsconfig/TsconfigReadTransaction.d.mts +11 -8
- package/lib/core/tsconfig/TsconfigReadTransaction.d.ts +11 -8
- package/lib/core/tsconfig/TsconfigReadTransaction.js +11 -8
- package/lib/core/tsconfig/TsconfigReadTransaction.js.map +1 -1
- package/lib/core/tsconfig/TsconfigReadTransaction.mjs +11 -8
- package/lib/core/tsconfig/TsconfigReadTransaction.mjs.map +1 -1
- package/lib/core/tsconfig/findDeclaredCompilerOption.d.cts +3 -2
- package/lib/core/tsconfig/findDeclaredCompilerOption.d.mts +3 -2
- package/lib/core/tsconfig/findDeclaredCompilerOption.d.ts +3 -2
- package/lib/core/tsconfig/findDeclaredCompilerOption.js +3 -2
- package/lib/core/tsconfig/findDeclaredCompilerOption.js.map +1 -1
- package/lib/core/tsconfig/findDeclaredCompilerOption.mjs +3 -2
- package/lib/core/tsconfig/findDeclaredCompilerOption.mjs.map +1 -1
- package/lib/core/tsconfig/findDeclaredFileSpecs.d.cts +3 -2
- package/lib/core/tsconfig/findDeclaredFileSpecs.d.mts +3 -2
- package/lib/core/tsconfig/findDeclaredFileSpecs.d.ts +3 -2
- package/lib/core/tsconfig/findDeclaredFileSpecs.js +3 -2
- package/lib/core/tsconfig/findDeclaredFileSpecs.js.map +1 -1
- package/lib/core/tsconfig/findDeclaredFileSpecs.mjs +3 -2
- package/lib/core/tsconfig/findDeclaredFileSpecs.mjs.map +1 -1
- package/lib/core/tsconfig/findDeclaredPaths.d.cts +3 -3
- package/lib/core/tsconfig/findDeclaredPaths.d.mts +3 -3
- package/lib/core/tsconfig/findDeclaredPaths.d.ts +3 -3
- package/lib/core/tsconfig/findDeclaredPaths.js +2 -2
- package/lib/core/tsconfig/findDeclaredPaths.mjs +2 -2
- package/lib/core/tsconfig/findDeclaredValue.d.cts +2 -1
- package/lib/core/tsconfig/findDeclaredValue.d.mts +2 -1
- package/lib/core/tsconfig/findDeclaredValue.d.ts +2 -1
- package/lib/core/tsconfig/findDeclaredValue.js +2 -1
- package/lib/core/tsconfig/findDeclaredValue.js.map +1 -1
- package/lib/core/tsconfig/findDeclaredValue.mjs +2 -1
- package/lib/core/tsconfig/findDeclaredValue.mjs.map +1 -1
- package/lib/core/tsconfig/readEffectiveTsconfigTemplateCompilerOptions.js +1 -1
- package/lib/core/tsconfig/readEffectiveTsconfigTemplateCompilerOptions.mjs +1 -1
- package/lib/core/tsconfig/readEffectiveTsconfigTemplateFileSpecs.d.cts +2 -2
- package/lib/core/tsconfig/readEffectiveTsconfigTemplateFileSpecs.d.mts +2 -2
- package/lib/core/tsconfig/readEffectiveTsconfigTemplateFileSpecs.d.ts +2 -2
- package/lib/core/tsconfig/readEffectiveTsconfigTemplateFileSpecs.js +2 -2
- package/lib/core/tsconfig/readEffectiveTsconfigTemplateFileSpecs.mjs +2 -2
- package/lib/core/tsconfig/readProjectMembershipPolicy.d.cts +3 -3
- package/lib/core/tsconfig/readProjectMembershipPolicy.d.mts +3 -3
- package/lib/core/tsconfig/readProjectMembershipPolicy.d.ts +3 -3
- package/lib/core/tsconfig/readProjectMembershipPolicy.js +4 -4
- package/lib/core/tsconfig/readProjectMembershipPolicy.mjs +4 -4
- package/lib/core/unplugin.js +14 -0
- package/lib/core/unplugin.js.map +1 -1
- package/lib/core/unplugin.mjs +14 -0
- package/lib/core/unplugin.mjs.map +1 -1
- package/lib/core/vite/installViteDependencyScanPlugins.d.cts +46 -0
- package/lib/core/vite/installViteDependencyScanPlugins.d.mts +46 -0
- package/lib/core/vite/installViteDependencyScanPlugins.d.ts +46 -0
- package/lib/core/vite/installViteDependencyScanPlugins.js +186 -0
- package/lib/core/vite/installViteDependencyScanPlugins.js.map +1 -0
- package/lib/core/vite/installViteDependencyScanPlugins.mjs +184 -0
- package/lib/core/vite/installViteDependencyScanPlugins.mjs.map +1 -0
- package/package.json +5 -4
- package/src/core/bridge/TtscProjectRecord.ts +9 -0
- package/src/core/bridge/readProjectRecordFile.ts +5 -1
- package/src/core/observer/WatchScope.ts +3 -3
- package/src/core/observer/createInputObserver.ts +7 -8
- package/src/core/options/ResolvedTtscUnpluginOptions.ts +3 -0
- package/src/core/options/TtscUnpluginOptions.ts +13 -2
- package/src/core/options/resolveOptions.ts +6 -3
- package/src/core/transform/TtscPrecompilation.ts +103 -0
- package/src/core/transform/cache/selectCachedGenerationAction.ts +3 -0
- package/src/core/transform/cache/withdrawTtscTransformGenerations.ts +2 -0
- package/src/core/transform/envelope/generationCaseSensitivity.ts +46 -0
- package/src/core/transform/envelope/selectExternalInputPaths.ts +5 -1
- package/src/core/transform/envelope/selectNotifiableAbsentInputs.ts +5 -1
- package/src/core/transform/filesystem/createHostPathIdentityContext.ts +9 -1
- package/src/core/transform/generation/captureTransformGeneration.ts +22 -2
- package/src/core/transform/generation/selectPersistentHostInputs.ts +5 -1
- package/src/core/transform/generation/transformProject.ts +3 -0
- package/src/core/transform/inputs/nativeInputPredicateState.ts +1 -3
- package/src/core/transform/tracker/createHostInputMutationTracker.ts +10 -1
- package/src/core/transform/tracker/createProjectMutationTracker.ts +34 -6
- package/src/core/transform/transformTtsc.ts +86 -37
- package/src/core/transform/validation/captureUniversalHostInputValidation.ts +12 -4
- package/src/core/transform/validation/matchesCachedSource.ts +9 -2
- package/src/core/transform/watch/TtscTransformHooks.ts +10 -0
- package/src/core/transform/watch/TtscWatchInputBaseline.ts +2 -1
- package/src/core/transform/watch/isWatchInputKeyBaseline.ts +4 -2
- package/src/core/transform/watch/notifyProjectRecord.ts +5 -4
- package/src/core/transform/watch/recordedDependencyWitnesses.ts +50 -0
- package/src/core/transform/watch/watchInputEvidenceMatchesBaseline.ts +1 -2
- package/src/core/tsconfig/TsconfigReadTransaction.ts +11 -8
- package/src/core/tsconfig/findDeclaredCompilerOption.ts +3 -2
- package/src/core/tsconfig/findDeclaredFileSpecs.ts +3 -2
- package/src/core/tsconfig/findDeclaredPaths.ts +3 -3
- package/src/core/tsconfig/findDeclaredValue.ts +2 -1
- package/src/core/tsconfig/readEffectiveTsconfigTemplateCompilerOptions.ts +1 -1
- package/src/core/tsconfig/readEffectiveTsconfigTemplateFileSpecs.ts +2 -2
- package/src/core/tsconfig/readProjectMembershipPolicy.ts +4 -4
- package/src/core/unplugin.ts +32 -0
- package/src/core/vite/installViteDependencyScanPlugins.ts +219 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ResolvedTtscUnpluginOptions } from "../options/ResolvedTtscUnpluginOptions";
|
|
2
|
+
import type { TtscTransformCache } from "./cache/TtscTransformCache";
|
|
3
|
+
/**
|
|
4
|
+
* Schedule explicitly selected source entries before the host reaches their
|
|
5
|
+
* imports. Compilation and proof stay with the ordinary transform core.
|
|
6
|
+
*
|
|
7
|
+
* A host often discovers its next workspace project only after the preceding
|
|
8
|
+
* project's transform finishes (#1764). Starting known entries together avoids
|
|
9
|
+
* that dependency on host traversal order. Walking unrelated projects would
|
|
10
|
+
* execute plugins the user never selected, so this owner uses only the supplied
|
|
11
|
+
* entries. Preparation leaves module delivery and host registration to the
|
|
12
|
+
* actual request.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/common.md#principled-implementation Explicit entries authorize scheduling; the supplied core capture retains project selection, configuration identity and all generation proofs. The context contains the current working directory, options, aliases and delivery epoch, not new cache authority.
|
|
15
|
+
* @evidence contracts/common.md#clear-and-simple-design One scheduler owns per-cache startup deduplication and reset; the transform core owns compiled generations and their disposal.
|
|
16
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No directory-wide discovery, plugin substitution or skipped proof is introduced; preparation never impersonates a host module delivery.
|
|
17
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose explains host traversal order, explicit effectful selection and separation from delivery; members state context lifetime and failure ownership.
|
|
18
|
+
* @evidence contracts/portability.md#os-neutral-implementation Entries resolve through native path semantics from the current cwd and read through the cache's filesystem boundary; source eligibility uses the adapter's existing shared predicate.
|
|
19
|
+
* @evidence contracts/performance.md#efficient-algorithms Each new context serializes cwd, options and aliases, then resolves and deduplicates E entries and reads their source bytes once. Capture starts without waiting for other entries; native capture and proof retain their own costs. Repeated requests serialize the context but do not reread the entries.
|
|
20
|
+
* @evidence contracts/performance.md#reuse-equivalent-work One latest context per cache and epoch starts each entry once; ordinary project keys deduplicate entries in the same project. Context equality controls scheduling only, and retained results still need normal admission.
|
|
21
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A WeakMap retains one context string per live cache. Startup rejection handlers consume each detached promise; running captures and native resources remain cache-owned and withdrawal disposes their fulfilled generations. No cancellation deadline or entry-count cap is added.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace TtscPrecompilation {
|
|
24
|
+
/**
|
|
25
|
+
* Start every eligible explicit entry without waiting for its siblings.
|
|
26
|
+
* Failed speculative preparation is reported when its module is requested, so
|
|
27
|
+
* an unrelated delivered project's load can proceed.
|
|
28
|
+
*
|
|
29
|
+
* @evidence contracts/common.md#principled-implementation The context is installed before captures start, so recursive and concurrent deliveries cannot restart the same batch; only supported source entries reach normal core capture.
|
|
30
|
+
* @evidence contracts/common.md#clear-and-simple-design One synchronous loop separates startup ownership from asynchronous capture settlement.
|
|
31
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Failed entry reads are not fabricated as empty source, and rejected captures do not become successful output. Actual delivery remains the error boundary.
|
|
32
|
+
* @evidence contracts/common.md#meaningful-documentation Prose states parallel startup and deferred error reporting; callback and context ownership remain explicit.
|
|
33
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native absolute entry paths are passed as exact paths to capture and source reads use the same cache-owned filesystem as generation validation.
|
|
34
|
+
* @evidence contracts/performance.md#efficient-algorithms Context serialization precedes one E-entry deduplicating loop and actual source-byte reads; captures overlap their asynchronous work rather than being awaited sequentially.
|
|
35
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Identical latest cwd, options, aliases and epoch skip scheduling; project Promise identity and normal input proof decide compile reuse, independently of this scheduling record.
|
|
36
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Context state follows its weak cache key. Every started capture receives a rejection handler immediately; its own core/cache owners release native resources, including withdrawal during capture.
|
|
37
|
+
*/
|
|
38
|
+
function start(cache: TtscTransformCache, options: ResolvedTtscUnpluginOptions, aliasPaths: Record<string, string[]> | undefined, capture: (file: string, source: string) => Promise<unknown>): void;
|
|
39
|
+
/**
|
|
40
|
+
* End startup ownership when the cache withdraws its generations.
|
|
41
|
+
*
|
|
42
|
+
* @evidence contracts/common.md#principled-implementation Withdrawal removes scheduling state with generation ownership so a later lifecycle can prepare the same entries again.
|
|
43
|
+
* @evidence contracts/common.md#clear-and-simple-design One weak-key deletion shares the cache's existing reset boundary.
|
|
44
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Clearing scheduling permission does not admit or cancel any compiled result.
|
|
45
|
+
* @evidence contracts/common.md#meaningful-documentation The headline identifies the same generation withdrawal boundary used by callers.
|
|
46
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation WeakMap deletion performs no native operation.
|
|
47
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms One identity deletion chooses no traversal or processing strategy.
|
|
48
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This operation withdraws the previous scheduling record rather than reusing work.
|
|
49
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Deletion releases the single scheduling record; native resources remain owned by generation withdrawal.
|
|
50
|
+
*/
|
|
51
|
+
function clear(cache: TtscTransformCache): void;
|
|
52
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var path = require('node:path');
|
|
4
|
+
var isTransformTarget = require('../isTransformTarget.js');
|
|
5
|
+
var transformCacheEpoch = require('./cache/transformCacheEpoch.js');
|
|
6
|
+
var transformFilesystem = require('./cache/transformFilesystem.js');
|
|
7
|
+
var pluginsAreDisabled = require('./utils/pluginsAreDisabled.js');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Schedule explicitly selected source entries before the host reaches their
|
|
11
|
+
* imports. Compilation and proof stay with the ordinary transform core.
|
|
12
|
+
*
|
|
13
|
+
* A host often discovers its next workspace project only after the preceding
|
|
14
|
+
* project's transform finishes (#1764). Starting known entries together avoids
|
|
15
|
+
* that dependency on host traversal order. Walking unrelated projects would
|
|
16
|
+
* execute plugins the user never selected, so this owner uses only the supplied
|
|
17
|
+
* entries. Preparation leaves module delivery and host registration to the
|
|
18
|
+
* actual request.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/common.md#principled-implementation Explicit entries authorize scheduling; the supplied core capture retains project selection, configuration identity and all generation proofs. The context contains the current working directory, options, aliases and delivery epoch, not new cache authority.
|
|
21
|
+
* @evidence contracts/common.md#clear-and-simple-design One scheduler owns per-cache startup deduplication and reset; the transform core owns compiled generations and their disposal.
|
|
22
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No directory-wide discovery, plugin substitution or skipped proof is introduced; preparation never impersonates a host module delivery.
|
|
23
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose explains host traversal order, explicit effectful selection and separation from delivery; members state context lifetime and failure ownership.
|
|
24
|
+
* @evidence contracts/portability.md#os-neutral-implementation Entries resolve through native path semantics from the current cwd and read through the cache's filesystem boundary; source eligibility uses the adapter's existing shared predicate.
|
|
25
|
+
* @evidence contracts/performance.md#efficient-algorithms Each new context serializes cwd, options and aliases, then resolves and deduplicates E entries and reads their source bytes once. Capture starts without waiting for other entries; native capture and proof retain their own costs. Repeated requests serialize the context but do not reread the entries.
|
|
26
|
+
* @evidence contracts/performance.md#reuse-equivalent-work One latest context per cache and epoch starts each entry once; ordinary project keys deduplicate entries in the same project. Context equality controls scheduling only, and retained results still need normal admission.
|
|
27
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A WeakMap retains one context string per live cache. Startup rejection handlers consume each detached promise; running captures and native resources remain cache-owned and withdrawal disposes their fulfilled generations. No cancellation deadline or entry-count cap is added.
|
|
28
|
+
*/
|
|
29
|
+
exports.TtscPrecompilation = void 0;
|
|
30
|
+
(function (TtscPrecompilation) {
|
|
31
|
+
const contexts = new WeakMap();
|
|
32
|
+
/**
|
|
33
|
+
* Start every eligible explicit entry without waiting for its siblings.
|
|
34
|
+
* Failed speculative preparation is reported when its module is requested, so
|
|
35
|
+
* an unrelated delivered project's load can proceed.
|
|
36
|
+
*
|
|
37
|
+
* @evidence contracts/common.md#principled-implementation The context is installed before captures start, so recursive and concurrent deliveries cannot restart the same batch; only supported source entries reach normal core capture.
|
|
38
|
+
* @evidence contracts/common.md#clear-and-simple-design One synchronous loop separates startup ownership from asynchronous capture settlement.
|
|
39
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Failed entry reads are not fabricated as empty source, and rejected captures do not become successful output. Actual delivery remains the error boundary.
|
|
40
|
+
* @evidence contracts/common.md#meaningful-documentation Prose states parallel startup and deferred error reporting; callback and context ownership remain explicit.
|
|
41
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native absolute entry paths are passed as exact paths to capture and source reads use the same cache-owned filesystem as generation validation.
|
|
42
|
+
* @evidence contracts/performance.md#efficient-algorithms Context serialization precedes one E-entry deduplicating loop and actual source-byte reads; captures overlap their asynchronous work rather than being awaited sequentially.
|
|
43
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Identical latest cwd, options, aliases and epoch skip scheduling; project Promise identity and normal input proof decide compile reuse, independently of this scheduling record.
|
|
44
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Context state follows its weak cache key. Every started capture receives a rejection handler immediately; its own core/cache owners release native resources, including withdrawal during capture.
|
|
45
|
+
*/
|
|
46
|
+
function start(cache, options, aliasPaths, capture) {
|
|
47
|
+
if (options.precompile?.length === 0 ||
|
|
48
|
+
options.precompile === undefined ||
|
|
49
|
+
pluginsAreDisabled.pluginsAreDisabled(options.plugins))
|
|
50
|
+
return;
|
|
51
|
+
// Entry, project and projectRoot paths all use cwd. The same relative
|
|
52
|
+
// options under another directory select different work, even if the
|
|
53
|
+
// host retains its cache; capture coordinates must belong to this call.
|
|
54
|
+
const cwd = process.cwd();
|
|
55
|
+
const context = JSON.stringify([
|
|
56
|
+
cwd,
|
|
57
|
+
options,
|
|
58
|
+
aliasPaths,
|
|
59
|
+
transformCacheEpoch.transformCacheEpoch(cache),
|
|
60
|
+
]);
|
|
61
|
+
if (contexts.get(cache) === context)
|
|
62
|
+
return;
|
|
63
|
+
contexts.set(cache, context);
|
|
64
|
+
const entries = new Set();
|
|
65
|
+
const filesystem = transformFilesystem.transformFilesystem(cache);
|
|
66
|
+
for (const entry of options.precompile) {
|
|
67
|
+
if (!isTransformTarget.isTransformTarget(entry))
|
|
68
|
+
continue;
|
|
69
|
+
const file = path.resolve(cwd, entry);
|
|
70
|
+
if (entries.has(file))
|
|
71
|
+
continue;
|
|
72
|
+
entries.add(file);
|
|
73
|
+
try {
|
|
74
|
+
const source = filesystem.readFile(file).toString("utf8");
|
|
75
|
+
void capture(file, source).catch(() => undefined);
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
// A missing entry must not poison another project's load. Its actual
|
|
79
|
+
// host delivery still owns the native read error and recovery.
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
TtscPrecompilation.start = start;
|
|
84
|
+
/**
|
|
85
|
+
* End startup ownership when the cache withdraws its generations.
|
|
86
|
+
*
|
|
87
|
+
* @evidence contracts/common.md#principled-implementation Withdrawal removes scheduling state with generation ownership so a later lifecycle can prepare the same entries again.
|
|
88
|
+
* @evidence contracts/common.md#clear-and-simple-design One weak-key deletion shares the cache's existing reset boundary.
|
|
89
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Clearing scheduling permission does not admit or cancel any compiled result.
|
|
90
|
+
* @evidence contracts/common.md#meaningful-documentation The headline identifies the same generation withdrawal boundary used by callers.
|
|
91
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation WeakMap deletion performs no native operation.
|
|
92
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms One identity deletion chooses no traversal or processing strategy.
|
|
93
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This operation withdraws the previous scheduling record rather than reusing work.
|
|
94
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Deletion releases the single scheduling record; native resources remain owned by generation withdrawal.
|
|
95
|
+
*/
|
|
96
|
+
function clear(cache) {
|
|
97
|
+
contexts.delete(cache);
|
|
98
|
+
}
|
|
99
|
+
TtscPrecompilation.clear = clear;
|
|
100
|
+
})(exports.TtscPrecompilation || (exports.TtscPrecompilation = {}));
|
|
101
|
+
//# sourceMappingURL=TtscPrecompilation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TtscPrecompilation.js","sources":["../../../src/core/transform/TtscPrecompilation.ts"],"sourcesContent":[null],"names":["TtscPrecompilation","pluginsAreDisabled","transformCacheEpoch","transformFilesystem","isTransformTarget"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;;;;;;;AAmBG;AACcA;AAAjB,CAAA,UAAiB,kBAAkB,EAAA;AACjC,IAAA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAA8B;AAE1D;;;;;;;;;;;;;AAaG;IACH,SAAgB,KAAK,CACnB,KAAyB,EACzB,OAAoC,EACpC,UAAgD,EAChD,OAA2D,EAAA;AAE3D,QAAA,IACE,OAAO,CAAC,UAAU,EAAE,MAAM,KAAK,CAAC;YAChC,OAAO,CAAC,UAAU,KAAK,SAAS;AAChC,YAAAC,qCAAkB,CAAC,OAAO,CAAC,OAAO,CAAC;YAEnC;;;;AAIF,QAAA,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;AACzB,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7B,GAAG;YACH,OAAO;YACP,UAAU;YACVC,uCAAmB,CAAC,KAAK,CAAC;AAC3B,SAAA,CAAC;AACF,QAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,OAAO;YAAE;AACrC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC;AAC5B,QAAA,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU;AACjC,QAAA,MAAM,UAAU,GAAGC,uCAAmB,CAAC,KAAK,CAAC;AAC7C,QAAA,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE;AACtC,YAAA,IAAI,CAACC,mCAAiB,CAAC,KAAK,CAAC;gBAAE;YAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC;AACrC,YAAA,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE;AACvB,YAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;AACjB,YAAA,IAAI;AACF,gBAAA,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;AACzD,gBAAA,KAAK,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC;YACnD;AAAE,YAAA,MAAM;;;YAGR;QACF;IACF;AAvCgB,IAAA,kBAAA,CAAA,KAAK,QAuCpB;AAED;;;;;;;;;;;AAWG;IACH,SAAgB,KAAK,CAAC,KAAyB,EAAA;AAC7C,QAAA,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;IACxB;AAFgB,IAAA,kBAAA,CAAA,KAAK,QAEpB;AACH,CAAC,EAzEgBJ,0BAAkB,KAAlBA,0BAAkB,GAAA,EAAA,CAAA,CAAA;;"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { isTransformTarget } from '../isTransformTarget.mjs';
|
|
3
|
+
import { transformCacheEpoch } from './cache/transformCacheEpoch.mjs';
|
|
4
|
+
import { transformFilesystem } from './cache/transformFilesystem.mjs';
|
|
5
|
+
import { pluginsAreDisabled } from './utils/pluginsAreDisabled.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Schedule explicitly selected source entries before the host reaches their
|
|
9
|
+
* imports. Compilation and proof stay with the ordinary transform core.
|
|
10
|
+
*
|
|
11
|
+
* A host often discovers its next workspace project only after the preceding
|
|
12
|
+
* project's transform finishes (#1764). Starting known entries together avoids
|
|
13
|
+
* that dependency on host traversal order. Walking unrelated projects would
|
|
14
|
+
* execute plugins the user never selected, so this owner uses only the supplied
|
|
15
|
+
* entries. Preparation leaves module delivery and host registration to the
|
|
16
|
+
* actual request.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation Explicit entries authorize scheduling; the supplied core capture retains project selection, configuration identity and all generation proofs. The context contains the current working directory, options, aliases and delivery epoch, not new cache authority.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design One scheduler owns per-cache startup deduplication and reset; the transform core owns compiled generations and their disposal.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No directory-wide discovery, plugin substitution or skipped proof is introduced; preparation never impersonates a host module delivery.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose explains host traversal order, explicit effectful selection and separation from delivery; members state context lifetime and failure ownership.
|
|
22
|
+
* @evidence contracts/portability.md#os-neutral-implementation Entries resolve through native path semantics from the current cwd and read through the cache's filesystem boundary; source eligibility uses the adapter's existing shared predicate.
|
|
23
|
+
* @evidence contracts/performance.md#efficient-algorithms Each new context serializes cwd, options and aliases, then resolves and deduplicates E entries and reads their source bytes once. Capture starts without waiting for other entries; native capture and proof retain their own costs. Repeated requests serialize the context but do not reread the entries.
|
|
24
|
+
* @evidence contracts/performance.md#reuse-equivalent-work One latest context per cache and epoch starts each entry once; ordinary project keys deduplicate entries in the same project. Context equality controls scheduling only, and retained results still need normal admission.
|
|
25
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources A WeakMap retains one context string per live cache. Startup rejection handlers consume each detached promise; running captures and native resources remain cache-owned and withdrawal disposes their fulfilled generations. No cancellation deadline or entry-count cap is added.
|
|
26
|
+
*/
|
|
27
|
+
var TtscPrecompilation;
|
|
28
|
+
(function (TtscPrecompilation) {
|
|
29
|
+
const contexts = new WeakMap();
|
|
30
|
+
/**
|
|
31
|
+
* Start every eligible explicit entry without waiting for its siblings.
|
|
32
|
+
* Failed speculative preparation is reported when its module is requested, so
|
|
33
|
+
* an unrelated delivered project's load can proceed.
|
|
34
|
+
*
|
|
35
|
+
* @evidence contracts/common.md#principled-implementation The context is installed before captures start, so recursive and concurrent deliveries cannot restart the same batch; only supported source entries reach normal core capture.
|
|
36
|
+
* @evidence contracts/common.md#clear-and-simple-design One synchronous loop separates startup ownership from asynchronous capture settlement.
|
|
37
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Failed entry reads are not fabricated as empty source, and rejected captures do not become successful output. Actual delivery remains the error boundary.
|
|
38
|
+
* @evidence contracts/common.md#meaningful-documentation Prose states parallel startup and deferred error reporting; callback and context ownership remain explicit.
|
|
39
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native absolute entry paths are passed as exact paths to capture and source reads use the same cache-owned filesystem as generation validation.
|
|
40
|
+
* @evidence contracts/performance.md#efficient-algorithms Context serialization precedes one E-entry deduplicating loop and actual source-byte reads; captures overlap their asynchronous work rather than being awaited sequentially.
|
|
41
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Identical latest cwd, options, aliases and epoch skip scheduling; project Promise identity and normal input proof decide compile reuse, independently of this scheduling record.
|
|
42
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Context state follows its weak cache key. Every started capture receives a rejection handler immediately; its own core/cache owners release native resources, including withdrawal during capture.
|
|
43
|
+
*/
|
|
44
|
+
function start(cache, options, aliasPaths, capture) {
|
|
45
|
+
if (options.precompile?.length === 0 ||
|
|
46
|
+
options.precompile === undefined ||
|
|
47
|
+
pluginsAreDisabled(options.plugins))
|
|
48
|
+
return;
|
|
49
|
+
// Entry, project and projectRoot paths all use cwd. The same relative
|
|
50
|
+
// options under another directory select different work, even if the
|
|
51
|
+
// host retains its cache; capture coordinates must belong to this call.
|
|
52
|
+
const cwd = process.cwd();
|
|
53
|
+
const context = JSON.stringify([
|
|
54
|
+
cwd,
|
|
55
|
+
options,
|
|
56
|
+
aliasPaths,
|
|
57
|
+
transformCacheEpoch(cache),
|
|
58
|
+
]);
|
|
59
|
+
if (contexts.get(cache) === context)
|
|
60
|
+
return;
|
|
61
|
+
contexts.set(cache, context);
|
|
62
|
+
const entries = new Set();
|
|
63
|
+
const filesystem = transformFilesystem(cache);
|
|
64
|
+
for (const entry of options.precompile) {
|
|
65
|
+
if (!isTransformTarget(entry))
|
|
66
|
+
continue;
|
|
67
|
+
const file = path.resolve(cwd, entry);
|
|
68
|
+
if (entries.has(file))
|
|
69
|
+
continue;
|
|
70
|
+
entries.add(file);
|
|
71
|
+
try {
|
|
72
|
+
const source = filesystem.readFile(file).toString("utf8");
|
|
73
|
+
void capture(file, source).catch(() => undefined);
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// A missing entry must not poison another project's load. Its actual
|
|
77
|
+
// host delivery still owns the native read error and recovery.
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
TtscPrecompilation.start = start;
|
|
82
|
+
/**
|
|
83
|
+
* End startup ownership when the cache withdraws its generations.
|
|
84
|
+
*
|
|
85
|
+
* @evidence contracts/common.md#principled-implementation Withdrawal removes scheduling state with generation ownership so a later lifecycle can prepare the same entries again.
|
|
86
|
+
* @evidence contracts/common.md#clear-and-simple-design One weak-key deletion shares the cache's existing reset boundary.
|
|
87
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Clearing scheduling permission does not admit or cancel any compiled result.
|
|
88
|
+
* @evidence contracts/common.md#meaningful-documentation The headline identifies the same generation withdrawal boundary used by callers.
|
|
89
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation WeakMap deletion performs no native operation.
|
|
90
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms One identity deletion chooses no traversal or processing strategy.
|
|
91
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This operation withdraws the previous scheduling record rather than reusing work.
|
|
92
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Deletion releases the single scheduling record; native resources remain owned by generation withdrawal.
|
|
93
|
+
*/
|
|
94
|
+
function clear(cache) {
|
|
95
|
+
contexts.delete(cache);
|
|
96
|
+
}
|
|
97
|
+
TtscPrecompilation.clear = clear;
|
|
98
|
+
})(TtscPrecompilation || (TtscPrecompilation = {}));
|
|
99
|
+
|
|
100
|
+
export { TtscPrecompilation };
|
|
101
|
+
//# sourceMappingURL=TtscPrecompilation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TtscPrecompilation.mjs","sources":["../../../src/core/transform/TtscPrecompilation.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AASA;;;;;;;;;;;;;;;;;;;AAmBG;AACG,IAAW;AAAjB,CAAA,UAAiB,kBAAkB,EAAA;AACjC,IAAA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAA8B;AAE1D;;;;;;;;;;;;;AAaG;IACH,SAAgB,KAAK,CACnB,KAAyB,EACzB,OAAoC,EACpC,UAAgD,EAChD,OAA2D,EAAA;AAE3D,QAAA,IACE,OAAO,CAAC,UAAU,EAAE,MAAM,KAAK,CAAC;YAChC,OAAO,CAAC,UAAU,KAAK,SAAS;AAChC,YAAA,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC;YAEnC;;;;AAIF,QAAA,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;AACzB,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7B,GAAG;YACH,OAAO;YACP,UAAU;YACV,mBAAmB,CAAC,KAAK,CAAC;AAC3B,SAAA,CAAC;AACF,QAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,OAAO;YAAE;AACrC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC;AAC5B,QAAA,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU;AACjC,QAAA,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC;AAC7C,QAAA,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE;AACtC,YAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;gBAAE;YAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC;AACrC,YAAA,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE;AACvB,YAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;AACjB,YAAA,IAAI;AACF,gBAAA,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;AACzD,gBAAA,KAAK,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC;YACnD;AAAE,YAAA,MAAM;;;YAGR;QACF;IACF;AAvCgB,IAAA,kBAAA,CAAA,KAAK,QAuCpB;AAED;;;;;;;;;;;AAWG;IACH,SAAgB,KAAK,CAAC,KAAyB,EAAA;AAC7C,QAAA,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;IACxB;AAFgB,IAAA,kBAAA,CAAA,KAAK,QAEpB;AACH,CAAC,EAzEgB,kBAAkB,KAAlB,kBAAkB,GAAA,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -38,5 +38,7 @@ export declare function selectCachedGenerationAction(props: {
|
|
|
38
38
|
generation: Promise<TtscCachedProjectTransform>;
|
|
39
39
|
key: string;
|
|
40
40
|
source: string;
|
|
41
|
+
/** False only for speculative source reads before an actual module delivery. */
|
|
42
|
+
reportDivergence?: boolean;
|
|
41
43
|
proof?: TtscGenerationProof.Transaction;
|
|
42
44
|
}): "serve" | "retry" | "capture";
|
|
@@ -38,5 +38,7 @@ export declare function selectCachedGenerationAction(props: {
|
|
|
38
38
|
generation: Promise<TtscCachedProjectTransform>;
|
|
39
39
|
key: string;
|
|
40
40
|
source: string;
|
|
41
|
+
/** False only for speculative source reads before an actual module delivery. */
|
|
42
|
+
reportDivergence?: boolean;
|
|
41
43
|
proof?: TtscGenerationProof.Transaction;
|
|
42
44
|
}): "serve" | "retry" | "capture";
|
|
@@ -38,5 +38,7 @@ export declare function selectCachedGenerationAction(props: {
|
|
|
38
38
|
generation: Promise<TtscCachedProjectTransform>;
|
|
39
39
|
key: string;
|
|
40
40
|
source: string;
|
|
41
|
+
/** False only for speculative source reads before an actual module delivery. */
|
|
42
|
+
reportDivergence?: boolean;
|
|
41
43
|
proof?: TtscGenerationProof.Transaction;
|
|
42
44
|
}): "serve" | "retry" | "capture";
|
|
@@ -40,7 +40,7 @@ function selectCachedGenerationAction(props) {
|
|
|
40
40
|
projectRoot: props.cached.projectRoot,
|
|
41
41
|
result: props.cached.result,
|
|
42
42
|
}) &&
|
|
43
|
-
matchesCachedSource.matchesCachedSource(props.cached, props.file, props.source, props.epoch, props.proof)) {
|
|
43
|
+
matchesCachedSource.matchesCachedSource(props.cached, props.file, props.source, props.epoch, props.proof, props.reportDivergence)) {
|
|
44
44
|
return "serve";
|
|
45
45
|
}
|
|
46
46
|
evictGeneration.evictGeneration(props.cache, props.key, props.generation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectCachedGenerationAction.js","sources":["../../../../src/core/transform/cache/selectCachedGenerationAction.ts"],"sourcesContent":[null],"names":["isVolatileFile","envelopeDerivation","matchesCachedSource","evictGeneration"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,SAAU,4BAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"selectCachedGenerationAction.js","sources":["../../../../src/core/transform/cache/selectCachedGenerationAction.ts"],"sourcesContent":[null],"names":["isVolatileFile","envelopeDerivation","matchesCachedSource","evictGeneration"],"mappings":";;;;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,SAAU,4BAA4B,CAAC,KAW5C,EAAA;IACC,IACE,CAACA,6BAAc,CAACC,qCAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QAChD,IAAI,EAAE,KAAK,CAAC,IAAI;AAChB,QAAA,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;AACrC,QAAA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;KAC5B,CAAC;QACFC,uCAAmB,CACjB,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,gBAAgB,CACvB,EACD;AACA,QAAA,OAAO,OAAO;IAChB;AACA,IAAAC,+BAAe,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC;IACzD,OAAO,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS,GAAG,OAAO,GAAG,SAAS;AACxE;;;;"}
|
|
@@ -38,7 +38,7 @@ function selectCachedGenerationAction(props) {
|
|
|
38
38
|
projectRoot: props.cached.projectRoot,
|
|
39
39
|
result: props.cached.result,
|
|
40
40
|
}) &&
|
|
41
|
-
matchesCachedSource(props.cached, props.file, props.source, props.epoch, props.proof)) {
|
|
41
|
+
matchesCachedSource(props.cached, props.file, props.source, props.epoch, props.proof, props.reportDivergence)) {
|
|
42
42
|
return "serve";
|
|
43
43
|
}
|
|
44
44
|
evictGeneration(props.cache, props.key, props.generation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectCachedGenerationAction.mjs","sources":["../../../../src/core/transform/cache/selectCachedGenerationAction.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,SAAU,4BAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"selectCachedGenerationAction.mjs","sources":["../../../../src/core/transform/cache/selectCachedGenerationAction.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACG,SAAU,4BAA4B,CAAC,KAW5C,EAAA;IACC,IACE,CAAC,cAAc,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QAChD,IAAI,EAAE,KAAK,CAAC,IAAI;AAChB,QAAA,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;AACrC,QAAA,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;KAC5B,CAAC;QACF,mBAAmB,CACjB,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,gBAAgB,CACvB,EACD;AACA,QAAA,OAAO,OAAO;IAChB;AACA,IAAA,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC;IACzD,OAAO,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS,GAAG,OAAO,GAAG,SAAS;AACxE;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var TtscPrecompilation = require('../TtscPrecompilation.js');
|
|
3
4
|
var disposeCachedTransform = require('./disposeCachedTransform.js');
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -35,6 +36,7 @@ function withdrawTtscTransformGenerations(
|
|
|
35
36
|
/** Cache whose generations are withdrawn while its delivery pass survives. */
|
|
36
37
|
cache) {
|
|
37
38
|
const generations = [...cache.values()];
|
|
39
|
+
TtscPrecompilation.TtscPrecompilation.clear(cache);
|
|
38
40
|
cache.clear();
|
|
39
41
|
for (const generation of generations) {
|
|
40
42
|
void generation.then(disposeCachedTransform.disposeCachedTransform, () => undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawTtscTransformGenerations.js","sources":["../../../../src/core/transform/cache/withdrawTtscTransformGenerations.ts"],"sourcesContent":[null],"names":["disposeCachedTransform"],"mappings":"
|
|
1
|
+
{"version":3,"file":"withdrawTtscTransformGenerations.js","sources":["../../../../src/core/transform/cache/withdrawTtscTransformGenerations.ts"],"sourcesContent":[null],"names":["TtscPrecompilation","disposeCachedTransform"],"mappings":";;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;SACa,gCAAgC;AAC9C;AACA,KAAyB,EAAA;IAEzB,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;AACvC,IAAAA,qCAAkB,CAAC,KAAK,CAAC,KAAK,CAAC;IAC/B,KAAK,CAAC,KAAK,EAAE;AACb,IAAA,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QACpC,KAAK,UAAU,CAAC,IAAI,CAACC,6CAAsB,EAAE,MAAM,SAAS,CAAC;IAC/D;AACF;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TtscPrecompilation } from '../TtscPrecompilation.mjs';
|
|
1
2
|
import { disposeCachedTransform } from './disposeCachedTransform.mjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -33,6 +34,7 @@ function withdrawTtscTransformGenerations(
|
|
|
33
34
|
/** Cache whose generations are withdrawn while its delivery pass survives. */
|
|
34
35
|
cache) {
|
|
35
36
|
const generations = [...cache.values()];
|
|
37
|
+
TtscPrecompilation.clear(cache);
|
|
36
38
|
cache.clear();
|
|
37
39
|
for (const generation of generations) {
|
|
38
40
|
void generation.then(disposeCachedTransform, () => undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawTtscTransformGenerations.mjs","sources":["../../../../src/core/transform/cache/withdrawTtscTransformGenerations.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withdrawTtscTransformGenerations.mjs","sources":["../../../../src/core/transform/cache/withdrawTtscTransformGenerations.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;SACa,gCAAgC;AAC9C;AACA,KAAyB,EAAA;IAEzB,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;AACvC,IAAA,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC;IAC/B,KAAK,CAAC,KAAK,EAAE;AACb,IAAA,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;QACpC,KAAK,UAAU,CAAC,IAAI,CAAC,sBAAsB,EAAE,MAAM,SAAS,CAAC;IAC/D;AACF;;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
|
+
import type { TtscTransformFilesystemOperations } from "../filesystem/TtscTransformFilesystemOperations.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* The directory case answers of one generation's identity context
|
|
5
|
+
* (`envelopeDerivation`), for another identity context built while that
|
|
6
|
+
* generation is captured over the same filesystem view.
|
|
7
|
+
*
|
|
8
|
+
* Capturing a generation builds several identity contexts: the input selections
|
|
9
|
+
* and the trackers' baselines. Each asked every directory's case policy again,
|
|
10
|
+
* which on Windows costs an `fsutil` process for a directory whose names cannot
|
|
11
|
+
* settle it (samchon/ttsc#1742). They now ask the generation's own context,
|
|
12
|
+
* which memoizes each directory once for the generation. A view other than the
|
|
13
|
+
* one registered for the result observes for itself, and a tracker's re-check
|
|
14
|
+
* after an event still builds a context of its own.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation Sharing is admitted only for the filesystem view registered for the result, the view the generation context observes; any other view keeps its own observations.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One selector returns the generation's case operation, or the view's own for another view, and callers pass it to the existing context factory.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No answer is cached beyond the generation context that observed it, and a tracker's event re-check is not routed through it.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain the repeated probes, the view condition and the re-check exception.
|
|
20
|
+
* @evidence contracts/portability.md#os-neutral-implementation The generation context observes case policy through the registered view's own probes; no platform assumption is introduced.
|
|
21
|
+
* @evidence contracts/performance.md#efficient-algorithms One registry lookup and one derivation lookup; the returned operation delegates to the generation context's memo.
|
|
22
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Every context capturing one generation shares the generation's answer for each directory.
|
|
23
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The answers belong to the generation context, which the generation already owns; this selector retains nothing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function generationCaseSensitivity(props: {
|
|
26
|
+
/** The view the caller's context observes through. */
|
|
27
|
+
filesystem: TtscTransformFilesystemOperations;
|
|
28
|
+
/** Native project directory of the generation. */
|
|
29
|
+
projectRoot: string;
|
|
30
|
+
/** The generation's compiler result. */
|
|
31
|
+
result: ITtscCompilerTransformation;
|
|
32
|
+
}): TtscTransformFilesystemOperations["caseSensitive"];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
|
+
import type { TtscTransformFilesystemOperations } from "../filesystem/TtscTransformFilesystemOperations.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* The directory case answers of one generation's identity context
|
|
5
|
+
* (`envelopeDerivation`), for another identity context built while that
|
|
6
|
+
* generation is captured over the same filesystem view.
|
|
7
|
+
*
|
|
8
|
+
* Capturing a generation builds several identity contexts: the input selections
|
|
9
|
+
* and the trackers' baselines. Each asked every directory's case policy again,
|
|
10
|
+
* which on Windows costs an `fsutil` process for a directory whose names cannot
|
|
11
|
+
* settle it (samchon/ttsc#1742). They now ask the generation's own context,
|
|
12
|
+
* which memoizes each directory once for the generation. A view other than the
|
|
13
|
+
* one registered for the result observes for itself, and a tracker's re-check
|
|
14
|
+
* after an event still builds a context of its own.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation Sharing is admitted only for the filesystem view registered for the result, the view the generation context observes; any other view keeps its own observations.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One selector returns the generation's case operation, or the view's own for another view, and callers pass it to the existing context factory.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No answer is cached beyond the generation context that observed it, and a tracker's event re-check is not routed through it.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain the repeated probes, the view condition and the re-check exception.
|
|
20
|
+
* @evidence contracts/portability.md#os-neutral-implementation The generation context observes case policy through the registered view's own probes; no platform assumption is introduced.
|
|
21
|
+
* @evidence contracts/performance.md#efficient-algorithms One registry lookup and one derivation lookup; the returned operation delegates to the generation context's memo.
|
|
22
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Every context capturing one generation shares the generation's answer for each directory.
|
|
23
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The answers belong to the generation context, which the generation already owns; this selector retains nothing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function generationCaseSensitivity(props: {
|
|
26
|
+
/** The view the caller's context observes through. */
|
|
27
|
+
filesystem: TtscTransformFilesystemOperations;
|
|
28
|
+
/** Native project directory of the generation. */
|
|
29
|
+
projectRoot: string;
|
|
30
|
+
/** The generation's compiler result. */
|
|
31
|
+
result: ITtscCompilerTransformation;
|
|
32
|
+
}): TtscTransformFilesystemOperations["caseSensitive"];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ITtscCompilerTransformation } from "ttsc";
|
|
2
|
+
import type { TtscTransformFilesystemOperations } from "../filesystem/TtscTransformFilesystemOperations";
|
|
3
|
+
/**
|
|
4
|
+
* The directory case answers of one generation's identity context
|
|
5
|
+
* (`envelopeDerivation`), for another identity context built while that
|
|
6
|
+
* generation is captured over the same filesystem view.
|
|
7
|
+
*
|
|
8
|
+
* Capturing a generation builds several identity contexts: the input selections
|
|
9
|
+
* and the trackers' baselines. Each asked every directory's case policy again,
|
|
10
|
+
* which on Windows costs an `fsutil` process for a directory whose names cannot
|
|
11
|
+
* settle it (samchon/ttsc#1742). They now ask the generation's own context,
|
|
12
|
+
* which memoizes each directory once for the generation. A view other than the
|
|
13
|
+
* one registered for the result observes for itself, and a tracker's re-check
|
|
14
|
+
* after an event still builds a context of its own.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation Sharing is admitted only for the filesystem view registered for the result, the view the generation context observes; any other view keeps its own observations.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One selector returns the generation's case operation, or the view's own for another view, and callers pass it to the existing context factory.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No answer is cached beyond the generation context that observed it, and a tracker's event re-check is not routed through it.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain the repeated probes, the view condition and the re-check exception.
|
|
20
|
+
* @evidence contracts/portability.md#os-neutral-implementation The generation context observes case policy through the registered view's own probes; no platform assumption is introduced.
|
|
21
|
+
* @evidence contracts/performance.md#efficient-algorithms One registry lookup and one derivation lookup; the returned operation delegates to the generation context's memo.
|
|
22
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Every context capturing one generation shares the generation's answer for each directory.
|
|
23
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The answers belong to the generation context, which the generation already owns; this selector retains nothing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function generationCaseSensitivity(props: {
|
|
26
|
+
/** The view the caller's context observes through. */
|
|
27
|
+
filesystem: TtscTransformFilesystemOperations;
|
|
28
|
+
/** Native project directory of the generation. */
|
|
29
|
+
projectRoot: string;
|
|
30
|
+
/** The generation's compiler result. */
|
|
31
|
+
result: ITtscCompilerTransformation;
|
|
32
|
+
}): TtscTransformFilesystemOperations["caseSensitive"];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var resultFilesystem = require('../cache/resultFilesystem.js');
|
|
4
|
+
var envelopeDerivation = require('./envelopeDerivation.js');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The directory case answers of one generation's identity context
|
|
8
|
+
* (`envelopeDerivation`), for another identity context built while that
|
|
9
|
+
* generation is captured over the same filesystem view.
|
|
10
|
+
*
|
|
11
|
+
* Capturing a generation builds several identity contexts: the input selections
|
|
12
|
+
* and the trackers' baselines. Each asked every directory's case policy again,
|
|
13
|
+
* which on Windows costs an `fsutil` process for a directory whose names cannot
|
|
14
|
+
* settle it (samchon/ttsc#1742). They now ask the generation's own context,
|
|
15
|
+
* which memoizes each directory once for the generation. A view other than the
|
|
16
|
+
* one registered for the result observes for itself, and a tracker's re-check
|
|
17
|
+
* after an event still builds a context of its own.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation Sharing is admitted only for the filesystem view registered for the result, the view the generation context observes; any other view keeps its own observations.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design One selector returns the generation's case operation, or the view's own for another view, and callers pass it to the existing context factory.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No answer is cached beyond the generation context that observed it, and a tracker's event re-check is not routed through it.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain the repeated probes, the view condition and the re-check exception.
|
|
23
|
+
* @evidence contracts/portability.md#os-neutral-implementation The generation context observes case policy through the registered view's own probes; no platform assumption is introduced.
|
|
24
|
+
* @evidence contracts/performance.md#efficient-algorithms One registry lookup and one derivation lookup; the returned operation delegates to the generation context's memo.
|
|
25
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Every context capturing one generation shares the generation's answer for each directory.
|
|
26
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The answers belong to the generation context, which the generation already owns; this selector retains nothing.
|
|
27
|
+
*/
|
|
28
|
+
function generationCaseSensitivity(props) {
|
|
29
|
+
if (resultFilesystem.resultFilesystem(props.result) !== props.filesystem)
|
|
30
|
+
return props.filesystem.caseSensitive;
|
|
31
|
+
const context = envelopeDerivation.envelopeDerivation({
|
|
32
|
+
projectRoot: props.projectRoot,
|
|
33
|
+
result: props.result,
|
|
34
|
+
}).identityContext;
|
|
35
|
+
return (directory) => context.caseSensitive(directory);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.generationCaseSensitivity = generationCaseSensitivity;
|
|
39
|
+
//# sourceMappingURL=generationCaseSensitivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generationCaseSensitivity.js","sources":["../../../../src/core/transform/envelope/generationCaseSensitivity.ts"],"sourcesContent":[null],"names":["resultFilesystem","envelopeDerivation"],"mappings":";;;;;AAMA;;;;;;;;;;;;;;;;;;;;;AAqBG;AACG,SAAU,yBAAyB,CAAC,KASzC,EAAA;IACC,IAAIA,iCAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,UAAU;AACrD,QAAA,OAAO,KAAK,CAAC,UAAU,CAAC,aAAa;IACvC,MAAM,OAAO,GAAGC,qCAAkB,CAAC;QACjC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC,eAAe;IAClB,OAAO,CAAC,SAAS,KAAK,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC;AACxD;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { resultFilesystem } from '../cache/resultFilesystem.mjs';
|
|
2
|
+
import { envelopeDerivation } from './envelopeDerivation.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The directory case answers of one generation's identity context
|
|
6
|
+
* (`envelopeDerivation`), for another identity context built while that
|
|
7
|
+
* generation is captured over the same filesystem view.
|
|
8
|
+
*
|
|
9
|
+
* Capturing a generation builds several identity contexts: the input selections
|
|
10
|
+
* and the trackers' baselines. Each asked every directory's case policy again,
|
|
11
|
+
* which on Windows costs an `fsutil` process for a directory whose names cannot
|
|
12
|
+
* settle it (samchon/ttsc#1742). They now ask the generation's own context,
|
|
13
|
+
* which memoizes each directory once for the generation. A view other than the
|
|
14
|
+
* one registered for the result observes for itself, and a tracker's re-check
|
|
15
|
+
* after an event still builds a context of its own.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/common.md#principled-implementation Sharing is admitted only for the filesystem view registered for the result, the view the generation context observes; any other view keeps its own observations.
|
|
18
|
+
* @evidence contracts/common.md#clear-and-simple-design One selector returns the generation's case operation, or the view's own for another view, and callers pass it to the existing context factory.
|
|
19
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No answer is cached beyond the generation context that observed it, and a tracker's event re-check is not routed through it.
|
|
20
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs explain the repeated probes, the view condition and the re-check exception.
|
|
21
|
+
* @evidence contracts/portability.md#os-neutral-implementation The generation context observes case policy through the registered view's own probes; no platform assumption is introduced.
|
|
22
|
+
* @evidence contracts/performance.md#efficient-algorithms One registry lookup and one derivation lookup; the returned operation delegates to the generation context's memo.
|
|
23
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Every context capturing one generation shares the generation's answer for each directory.
|
|
24
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The answers belong to the generation context, which the generation already owns; this selector retains nothing.
|
|
25
|
+
*/
|
|
26
|
+
function generationCaseSensitivity(props) {
|
|
27
|
+
if (resultFilesystem(props.result) !== props.filesystem)
|
|
28
|
+
return props.filesystem.caseSensitive;
|
|
29
|
+
const context = envelopeDerivation({
|
|
30
|
+
projectRoot: props.projectRoot,
|
|
31
|
+
result: props.result,
|
|
32
|
+
}).identityContext;
|
|
33
|
+
return (directory) => context.caseSensitive(directory);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { generationCaseSensitivity };
|
|
37
|
+
//# sourceMappingURL=generationCaseSensitivity.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generationCaseSensitivity.mjs","sources":["../../../../src/core/transform/envelope/generationCaseSensitivity.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAMA;;;;;;;;;;;;;;;;;;;;;AAqBG;AACG,SAAU,yBAAyB,CAAC,KASzC,EAAA;IACC,IAAI,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,UAAU;AACrD,QAAA,OAAO,KAAK,CAAC,UAAU,CAAC,aAAa;IACvC,MAAM,OAAO,GAAG,kBAAkB,CAAC;QACjC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC,eAAe;IAClB,OAAO,CAAC,SAAS,KAAK,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC;AACxD;;;;"}
|
|
@@ -8,6 +8,7 @@ var isProjectWalkPath = require('../project/isProjectWalkPath.js');
|
|
|
8
8
|
var isTransformScratchInput = require('../tsconfig/isTransformScratchInput.js');
|
|
9
9
|
var envelopeDerivation = require('./envelopeDerivation.js');
|
|
10
10
|
var envelopeGraphIndexes = require('./envelopeGraphIndexes.js');
|
|
11
|
+
var generationCaseSensitivity = require('./generationCaseSensitivity.js');
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Derive the absolute out-of-walk input set of a whole project transform: the
|
|
@@ -54,7 +55,7 @@ function selectExternalInputPaths(props) {
|
|
|
54
55
|
}
|
|
55
56
|
const members = [];
|
|
56
57
|
const filesystem = props.filesystem ?? DEFAULT_FILESYSTEM_OPERATIONS.DEFAULT_FILESYSTEM_OPERATIONS;
|
|
57
|
-
const identities = createHostPathIdentityContext.createHostPathIdentityContext(filesystem);
|
|
58
|
+
const identities = createHostPathIdentityContext.createHostPathIdentityContext(filesystem, generationCaseSensitivity.generationCaseSensitivity({ ...props, filesystem }));
|
|
58
59
|
const resolutionCandidates = new Set();
|
|
59
60
|
const graph = props.result.graph;
|
|
60
61
|
const graphState = envelopeDerivation.envelopeDerivation({
|