microsoft / microsoft/cppwinrt
Approaches to reducing what is exported from modules
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 281
- PR merge metrics
- No merged PRs in 30d
Description
Currently, C++/WinRT uses a crude approach to exporting declarations: it exports all declarations within an export block. This is permitted by the standard because the standard does not wish to force implementers to distinguish every individual declaration for export. At present, I see two directions for improving this. One is the approach used by the STL, which marks each declaration that needs to be exported with export. The other is the approach used by libc++, which redeclare the declarations to be exported as using-declarations and export them. The advantage of the former is that it more closely resembles a library designed with modules from the very beginning, but the downside is that different overloads must be marked individually. The advantage of the latter is that different overloads can be exported with a single declaration, and it yields a cleaner Git history; the disadvantage is that the export list must be maintained manually. I believe both approaches are good options.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining how C++/WinRT currently emits declarations inside export blocks. Compare the STL approach of marking declarations individually with the libc++ approach of exporting using-declarations, then determine which direction the project wants. Done means a chosen, maintainable export strategy is implemented consistently, but the issue does not identify files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100