Skip to content

Set rootDir in tsconfig-base.json#26415

Merged
1 commit merged into
masterfrom
rootDir
Aug 13, 2018
Merged

Set rootDir in tsconfig-base.json#26415
1 commit merged into
masterfrom
rootDir

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Aug 13, 2018

Fixes #25810

The problem was that we copy src/services/tsconfig.json to build/local/typescriptServices.tsconfig.json. But when compiling from built/local, we'll get compile errors because the paths aren't in rootDirectory which defaults to options.configFilePath. These compile errors only happen when calling getCommonSourceDirectory, explaining why the change to utilities.ts uncovers it.

Note that when the change to utilities.ts is made but not the change to tsconfig-base.json, the error message is just Error: ENOENT: no such file or directory, open 'built/local/typescriptServices.out.d.ts' with no compile errors shown; but I've verifeid that removing the programDiagnostics.add call in checkSourceFilesBelongToPath made it work again.

@ghost ghost requested a review from RyanCavanaugh August 13, 2018 18:11
@ghost ghost merged commit cea4838 into master Aug 13, 2018
@ghost ghost deleted the rootDir branch August 13, 2018 22:19
Copy link
Copy Markdown
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

Hm. So this has broken the nightly publish - probably because of the relative paths in, eg, the outDir of the cancellationToken tsconfig. Probably need to define it in that config, too (and also as ".").

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 14, 2018

@weswigham That extends tsconfig-base so it should inherit it?

@weswigham
Copy link
Copy Markdown
Member

Relative paths in the config are resolved relative to the config they were found in, though, right?

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants