Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,602 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần triển khai của tùy chọn CppWinRTModuleInclude và đường dẫn tạo dependency của module. Tái hiện vấn đề với Windows.Foundation và kiểm tra cách các module được tham chiếu được phân giải. Hoàn tất khi output được tạo bao gồm tất cả module được Windows.Foundation và các dependency của nó sử dụng mà không yêu cầu liệt kê thủ công từng namespace.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
1.9k
Fork
281
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/cppwinrt

Tất cả issue của microsoft/cppwinrt

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.