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. |
1722188 to
e3f4c24
Compare
e3f4c24 to
9da741a
Compare
9da741a to
0a137b7
Compare
|
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.hppheader. This build job helps to detect whether the presence ofWindows.hcould 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.hppwith 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/nlohmanndirectory, runmake amalgamateto create the single-header filesingle_include/nlohmann/json.hpp. The whole process is described here.Please don't
#ifdefs or other means.