-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test P1502R1 Standard Library Header Units #1388
Test P1502R1 Standard Library Header Units #1388
Conversation
Have you considered to check each import in a separate TU in addition to importing them all into a common file? |
This comment has been minimized.
This comment has been minimized.
That could be done, but it would take longer to build (~2x, I think), it would be more work to maintain and keep in sync, and I am unsure whether it would find any compiler bugs that the megatest isn't already finding. From my understanding of what @cdacamar explained to me, importing all header units is the most stressful case, as the compiler has to match up declarations.
Yes, welcome to my life 😿
Thanks for investigating, and sorry about that. I had iterated on this until I had gotten the test passing with both MSVC-internal I'll fix this up and push a revision.
Yep, that's why those |
It wouldn't come close to being worth the work to split it up, but it would be really nice if this were a single test per-header instead. We'd at least get a line or two of context in the logs. (Hindsight is 20/20, etc. etc.) |
See @MikeGitb's question - smaller tests would be easier to diagnose, but the larger test is both more realistic and (as I understand it) more stressful for the compiler, so it is a more effective test. My understanding is that classic |
I'm really just griping about needing to download test logs to analyze failures; my concerns would be addressed by removing the |
Oh, the |
My concern was mostly around the question if a individual import actually provides the things it should, but I don't have any real reason to assume that there is a problem, so I guess you are right, that there isn't a real benefit to it. |
@MikeGitb Ah, I see - that is a very valid concern, and applies to classic includes too. We have an “include each header alone” test that’s very good at finding headers that can’t even be included by themselves - but it doesn’t test that the header provides what it should. It’s often pretty difficult to use a header without including others that would make the test less specific. I think that libcxx’s fine-grained tests probably have the best combination of having fairly minimal includes combined with checking that everything is being provided - you’re absolutely right that our |
Works towards #60.
stl/inc/memory_resource
const
on these value parameters. This has been fixed in VS 2019 16.9 Preview 1.tests/std/test.lst
tests/std/tests/P1502R1_standard_library_header_units
__init__.py
custom_format.py
stl_headers
, building each header unit with/exportHeader
, and recording the/headerUnit
compiler option and object file path needed to consume it later. (This also contains code to handle/BE
, which has to be ignored when building the header unit./BE
is not yet active.)custombuild.pl
/BE
yet. This needs a new environment variableSTL_INCLUDE_DIR
(added in MSVC-internaldistrib.yaml
) which is the single directory where STL headers live./DMSVC_INTERNAL_TESTING
, allowing us to activate portions of the test that successfully compile and run with the latest development build, before those fixes ship in the public VS Preview. As the TRANSITION comments note, this is temporary - after things settle down, we'll be able to remove this macro.env.lst
/Zc:preprocessor
.) The apparently-strange pattern ofRUNALL_CROSSLIST
s is imitating how theusual_matrix
family works./analyze
works but is much slower; as it found no compiler bugs, I have disabled it for now./BE
is blocked by Microsoft-internal VSO-1232145 "EDG ICEs when consuming Standard Library Header Units".lit.local.cfg
test.cpp
Adding this test to GitHub and MSVC now will prevent further regressions as we continue to change the STL and @cdacamar continues to fix the compiler. When all of the major blocking compiler bugs are fixed, we'll be able to declare feature-completeness.
Microsoft-internal mirror: MSVC-PR-282732