Skip to content

Conversation

@StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Dec 19, 2020

Works towards #60.

This adds header-units.json, a file that will tell the compiler which headers are eligible to be automatically treated as header units at the user's request. (That is, there will be a compiler option allowing #include <vector> to be treated as import <vector>; without changing the source code.)

Changing .vscode/settings.json is necessary because otherwise the "**/stl/inc/**" entry causes this file to be displayed as C++.

Remaining tasks:

  • Name the file header-units.json with a hyphen.
  • Confirm that JSON With Comments is acceptable.
  • Confirm that this syntax is correct.
  • Update stl/CMakeLists.txt to copy this to the output directory.
    • Verified for x86 and x64 that this copies to out\build\ARCH\out\inc\header-units.json.
  • Update internal MSBuild machinery to copy this to the output directory.
    • Updated src/vctools/crt/copy_crt/copy_crt.nativeproj.
  • Update internal setup authoring.
    • Updated src/SetupPackages/swix/VisualCpp/crt.headers/files.swr.
  • Confirm that internal src\vctools\crt\lkgsync\lkgsync.xml should ignore this.
    • Yep; @amyw-msft will add this to the LKG12 todo list, as this will be low priority for a while.
  • Update the wiki's Files To Edit When Adding Or Removing Files.

@StephanTLavavej StephanTLavavej added cxx20 C++20 feature enhancement Something can be improved and removed cxx20 C++20 feature labels Dec 19, 2020
@StephanTLavavej StephanTLavavej changed the title Add header_units.json Add header-units.json Jan 6, 2021
@StephanTLavavej StephanTLavavej marked this pull request as ready for review January 12, 2021 04:17
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner January 12, 2021 04:17
@cdacamar
Copy link
Contributor

As per the design doc agreed upon between the FE, project system, and Libs, the syntax is indeed correct.

@mnatsuhara mnatsuhara removed their assignment Jan 14, 2021
@StephanTLavavej StephanTLavavej self-assigned this Jan 14, 2021
@StephanTLavavej StephanTLavavej merged commit 3a7946e into microsoft:master Jan 15, 2021
@StephanTLavavej StephanTLavavej deleted the header_units_json branch January 15, 2021 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants