microsoft / microsoft/TypeScript
project reference { "path": "" } is ignored
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
## Steps to reproduce
In every project folder I have a `./tsconfig.build.json` which my build script finds and compiles.
In one project I have no subdirectories but only flat files, so I reference "the same directory".
`./tsconfig.build.json`
```json
{
"$schema": "http://json.schemastore.org/tsconfig",
"references": [
{ "path": "" }
],
"files": [],
"include": []
}
```
The file `./tsconfig.json` contains the final compile:
```json
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "../tsconfig_base",
"include": ["./*.ts"]
}
```
Looks silly, but I also have `./tsconfig.build.json` which have this:
```
"references": [
{ "path": "Worker/" },
{ "path": "" },
```
## Behavior with `typescript@6.0`
Compiles
```
> node_modules\.bin\tsc --build Folder/tsconfig.build.json --force --verbose
[17:36:53] Projects in this build:
* Folder/tsconfig.json
* Folder/tsconfig.build.json
...
```
## Behavior with `tsgo`
```
> node_modules\.bin\tsgo --build Folder/tsconfig.build.json --force --verbose
[05:37:22 PM] Projects in this build:
* Folder/tsconfig.build.json
...
```
When I change the file `./tsconfig.build.json` to that:
```json
{
"$schema": "http://json.schemastore.org/tsconfig",
"references": [
{ "path": "./" }
],
"files": [],
"include": []
}
```
It compiles like a charm, but still I wanted to report the compiler difference.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the difference with the shown tsconfig.build.json and the `tsc --build` and `tsgo --build` commands, comparing their verbose project lists. Trace how each command resolves the `references` path values `""` and `"./"`; done means an empty path is handled consistently with the current-directory path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100