You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was including some unrelated file. I guess both that package and json itself were using "version" for their own thing. This software should search instead "json_version" or something, and that other package should have its own convention, I guess.
Reproduction steps
At the base of a conda environment create a file called "version". Then this library will try to include it and will fail. This may require setting some compiler include flags. The point here that it is fragile logic to count on a file called "version" to be the thing one thinks of as "version".
Expected vs. actual results
I expected json to compile, but it failed.
Minimal code example
No response
Error messages
No response
Compiler and operating system
Linux
Library version
3.11.2
Validation
The bug also occurs if the latest version from the develop branch is used.
Description
I ran into a compilation problem for some software using this library which was triggered by this line:
https://github.com/nlohmann/json/blob/3780b41dd070436f3f55327b0a88f27a52e2dfa8/include/nlohmann/detail/macro_scope.hpp#L52C18-L52C18
which says: #include
It was including some unrelated file. I guess both that package and json itself were using "version" for their own thing. This software should search instead "json_version" or something, and that other package should have its own convention, I guess.
Reproduction steps
At the base of a conda environment create a file called "version". Then this library will try to include it and will fail. This may require setting some compiler include flags. The point here that it is fragile logic to count on a file called "version" to be the thing one thinks of as "version".
Expected vs. actual results
I expected json to compile, but it failed.
Minimal code example
No response
Error messages
No response
Compiler and operating system
Linux
Library version
3.11.2
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: