Skip to content

Comments

Fix document registry cache key calculation for paths compiler option#48389

Merged
weswigham merged 2 commits intomicrosoft:mainfrom
weswigham:fix-document-registry-cachekey
Mar 23, 2022
Merged

Fix document registry cache key calculation for paths compiler option#48389
weswigham merged 2 commits intomicrosoft:mainfrom
weswigham:fix-document-registry-cachekey

Conversation

@weswigham
Copy link
Member

Fixes #48278

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Mar 23, 2022

function getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey {
return sourceFileAffectingCompilerOptions.map(option => getCompilerOptionValue(settings, option)).join("|") as DocumentRegistryBucketKey;
return sourceFileAffectingCompilerOptions.map(option => compilerOptionValueToString(getCompilerOptionValue(settings, option), option.name === "paths" ? settings.configFilePath || "" : undefined)).join("|") as DocumentRegistryBucketKey;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return sourceFileAffectingCompilerOptions.map(option => compilerOptionValueToString(getCompilerOptionValue(settings, option), option.name === "paths" ? settings.configFilePath || "" : undefined)).join("|") as DocumentRegistryBucketKey;
return sourceFileAffectingCompilerOptions.map(option => compilerOptionValueToString(getCompilerOptionValue(settings, option)).join("|") + (settings.pathsBasePath ? `|${pathsBasePath}` : "") as DocumentRegistryBucketKey;

@weswigham weswigham merged commit 26c701c into microsoft:main Mar 23, 2022
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DocumentRegistry bucket key contains [object Object]

3 participants