microsoft / microsoft/TypeScript
project reference { "path": "" } is ignored
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
## 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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo la differenza con il tsconfig.build.json mostrato e i comandi `tsc --build` e `tsgo --build`, confrontando i rispettivi elenchi dettagliati dei progetti. Traccia il modo in cui ciascun comando risolve i valori di percorso `""` e `"./"` di `references`; il lavoro è completato quando un percorso vuoto viene gestito in modo coerente con il percorso della directory corrente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go, typescript
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 62/100