microsoft / microsoft/TypeScript
SkipLibCheck fails to work in multi-project set-up
Personne n'a encore pris cette issue.
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.3k
- Merge moyen
- 1 j 19 h
- PR mergées (30 j)
- 117
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Extrayez Repro.zip et ouvrez repro.sln dans Visual Studio, puis reconstruisez la solution avec les projets A, B et C. Comparez le comportement lorsque A/foo/bar.ts est déplacé vers A/bar.ts et examinez les paramètres du projet autour de skiplibcheck. C’est terminé lorsque la build multiprojet s’achève sans les erreurs TS2740 et TS2345 signalées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- build-system, compilers
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100