microsoft / microsoft/TypeScript
SkipLibCheck fails to work in multi-project set-up
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
TypeScript Version: 3.8. Beta
Search Terms:
skiplibcheck
Steps to reproduce
- Extract the attached zip file to a folder and open
repro.slnin Visual Studio (I'm using 2019) - Expand the
npmfolder on project B and install the missing@azure/storage-blobpackage. - Rebuild the solution.
Expected behavior:
No build errors.
Actual behavior:
2 errors:
error TS2740: Build:Type 'Buffer' is missing the following properties...
error TS2345: Build:Argument of type 'ErrnoException' is not assignable...
Explanation
We want have a custom definition for NodeJS. The npm package imported in Project B also has its own (incomplete) definition. So, we've added skiplibcheck to all the projects.
Project B builds fine by itself.
Project C references some NodeJS types. Project C also builds fine by itself.
Project A references types from both B and C.
When attempting to build A, we get the error above. But the error is for project C.
Basically, when building Project A, the skiplibcheck option is being ignored and the incomplete NodeJS definition from the imported package is being used.
Further Observations
Curiously, if file A/foo/bar.ts is moved to A/bar.ts (and the imports amended) the build compiles fine.
Attachment
Repro.zip
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
Estrai Repro.zip e apri repro.sln in Visual Studio, quindi ricompila la soluzione con i progetti A, B e C. Confronta il comportamento quando A/foo/bar.ts viene spostato in A/bar.ts e controlla le impostazioni del progetto relative a skiplibcheck. Il lavoro è completato quando la build multiprogetto termina senza gli errori TS2740 e TS2345 segnalati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- build-system, compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100