microsoft / microsoft/TypeScript
SkipLibCheck fails to work in multi-project set-up
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Entpacke Repro.zip und öffne repro.sln in Visual Studio; erstelle dann die Lösung mit den Projekten A, B und C neu. Vergleiche das Verhalten, wenn A/foo/bar.ts nach A/bar.ts verschoben wird, und überprüfe die Projekteinstellungen rund um skiplibcheck. Fertig ist es, wenn der Multi-Projekt-Build ohne die gemeldeten Fehler TS2740 und TS2345 abgeschlossen wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- build-system, compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100