microsoft / microsoft/cppwinrt
Bug: Why CppWinRTModuleInclude not auto include the dependencies of include modules
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 1.9k
- Forks
- 281
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Version
3.0.260520.1
Summary
When we use CppWinRTModuleInclude, we expect that we can write the module which we need so that we do not need to generate everything. But when we add it, we will find that it is useless because it indeed only generates the module we write but not consider the dependencies which the module referenced. So that we need to write all dependencies manually. But the dependencies of dependencies of dependencies will be almost all namespace to include. We are almost unable to find out all the dependencies.
Reproducible example
Add
<CppWinRTModuleInclude>
Windows.Foundation
</CppWinRTModuleInclude>
Then try to fix the dependencies. Do not say use CppWinRTModuleExclude, we need use all the member under Windows.Foundation and do not want to know what they dependence.
Expected behavior
C++/WinRT should add all used module.
Actual behavior
C++/WinRT only add Windows.Foundation.
Additional comments
I don't think it is a feature. Or the C++/WinRT should include all Windows.* modules just like C#/WinRT so that when we add third part CppWinRTModuleInclude it can correctly reference the Windows.* modules.
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
Beginne damit, die Implementierung der Option CppWinRTModuleInclude und den Pfad zur Generierung von Modulabhängigkeiten zu finden. Reproduziere das Problem mit Windows.Foundation und untersuche, wie referenzierte Module aufgelöst werden. Als erledigt gilt die Aufgabe, wenn die generierte Ausgabe alle von Windows.Foundation und seinen Abhängigkeiten verwendeten Module enthält, ohne dass jeder Namespace manuell aufgeführt werden muss.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100