-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Regression tests for MSVC #1570
Conversation
The AppVeyor tests seem to be broken. Any idea on this? |
201d7ec
to
b72ea7d
Compare
There were two errors:
By borrowing build flags for VS2015-Debug it can be reproduced: https://godbolt.org/z/MOkndK It seems that That's how far I was be able to get. Maybe @mistersandman or @theodelrieu could shed some light on what is causing |
Also, do you have any suggestion on the choices in #1570 (comment) to have a build with |
b72ea7d
to
b946a79
Compare
7bdcf89
to
bf09f78
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nickaein! Thanks for the PR and sorry for not having it checked earlier. I only have some minor remarks, and it would be great if you could address them.
1722188
to
e3f4c24
Compare
e3f4c24
to
9da741a
Compare
9da741a
to
0a137b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another minor comment.
Now the latest CI build at AppVeyor is failing again... Either we set up the timeout or we only use the small test suite in the Debug build. What do you think? |
In the last succesful CI build, MSVC debug builds has taken ~1 hour. It seems we are almost exceeding the 1 hour time restriction of AppVeyor. As you suggested, we can skip time-consuimg test(s) for MSVC debug, at least |
1fa3cd5
to
5b2e230
Compare
Now I just wait until the CI jobs run through and we're set. Thanks! |
🔖 Release itemThis issue/PR will be part of the next release of the library. This template helps preparing the release notes. Type
Description
|
Thanks! |
Thank you! |
Fixes #1543 (and avoid regression to issues like #1531 and #1536).
Fixes #1608.
This pull request:
Adds Debug builds on Appveyor for VS2015 and VS2017.
Add a separate build job that first injects
#include <Windows.h>
line to the top ofjson.hpp
header. This build job helps to detect whether the presence ofWindows.h
could have any undersiable side-effects.On point 2: Currently the unit-test for case 2 doesn't do much and only can catch compile errors. Also, I tested it on my
json.hpp
with some unfixednumeric_limits<>::max()
andnumeric_limits<>min()
functions and it only caused compiler errors on Debug builds. Probably on Release builds, the compiler eliminates the codes related to unfixed macro definitions. Therefore, the unit-test only can catch compiler errors on Debug mode.A more thorough approach is that instead of adding a unit-test with
#include <Windows.h>
on top, we add a separate build configuration in which the#include <Windows.h>
gets injected to the top ofjson.hpp
. In this build, all codes and unit-tests will be complied and checked in presence ofWindows.h
.I have implemented and tested the second approach on my fork but and wanted to double check and get some feedback before adding it to the PR.
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filesingle_include/nlohmann/json.hpp
. The whole process is described here.Please don't
#ifdef
s or other means.