microsoft / microsoft/cppwinrt

Bug: Why CppWinRTModuleInclude not auto include the dependencies of include modules

オープン
#1,602 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C++
スター
1.9k
フォーク
281
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、CppWinRTModuleInclude オプションの実装と、モジュール依存関係の生成経路を見つけます。Windows.Foundation で問題を再現し、参照されるモジュールがどのように解決されるかを調べます。生成された出力に、各 namespace を手動で列挙しなくても Windows.Foundation とその依存関係が使用するすべてのモジュールが含まれれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。