Skip to content

Drop compile-time deprecation warning #1351

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

Merged
merged 2 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ project(jsoncpp
# 2. ./include/json/version.h
# 3. ./CMakeLists.txt
# IMPORTANT: also update the PROJECT_SOVERSION!!
VERSION 1.9.4 # <major>[.<minor>[.<patch>[.<tweak>]]]
VERSION 1.9.5 # <major>[.<minor>[.<patch>[.<tweak>]]]
LANGUAGES CXX)

message(STATUS "JsonCpp Version: ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(PROJECT_SOVERSION 24)
set(PROJECT_SOVERSION 25)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why the SOVERSION is incremented for a patch release that doesn't break API or ABI? This causes downstream packages to need to be rebuilt on macOS

I can open a separate issue to discuss this if that is a better venue

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started a discussion about this in #1384


include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInSourceBuilds.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInBuildInstalls.cmake)
Expand Down
7 changes: 3 additions & 4 deletions include/json/reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ namespace Json {
* \deprecated Use CharReader and CharReaderBuilder.
*/

class JSONCPP_DEPRECATED(
"Use CharReader and CharReaderBuilder instead.") JSON_API Reader {
class JSON_API Reader {
public:
using Char = char;
using Location = const Char*;
Expand All @@ -51,13 +50,13 @@ class JSONCPP_DEPRECATED(
};

/** \brief Constructs a Reader allowing all features for parsing.
* \deprecated Use CharReader and CharReaderBuilder.
*/
JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead")
Reader();

/** \brief Constructs a Reader allowing the specified feature set for parsing.
* \deprecated Use CharReader and CharReaderBuilder.
*/
JSONCPP_DEPRECATED("Use CharReader and CharReaderBuilder instead")
Reader(const Features& features);

/** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
Expand Down
4 changes: 2 additions & 2 deletions include/json/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
// 3. /CMakeLists.txt
// IMPORTANT: also update the SOVERSION!!

#define JSONCPP_VERSION_STRING "1.9.4"
#define JSONCPP_VERSION_STRING "1.9.5"
#define JSONCPP_VERSION_MAJOR 1
#define JSONCPP_VERSION_MINOR 9
#define JSONCPP_VERSION_PATCH 4
#define JSONCPP_VERSION_PATCH 5
#define JSONCPP_VERSION_QUALIFIER
#define JSONCPP_VERSION_HEXA \
((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \
Expand Down
8 changes: 4 additions & 4 deletions include/json/writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
/** \brief Abstract class for writers.
* \deprecated Use StreamWriter. (And really, this is an implementation detail.)
*/
class JSONCPP_DEPRECATED("Use StreamWriter instead") JSON_API Writer {
class JSON_API Writer {
public:
virtual ~Writer();

Expand All @@ -167,7 +167,7 @@ class JSONCPP_DEPRECATED("Use StreamWriter instead") JSON_API Writer {
#pragma warning(push)
#pragma warning(disable : 4996) // Deriving from deprecated class
#endif
class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter
class JSON_API FastWriter
: public Writer {
public:
FastWriter();
Expand Down Expand Up @@ -227,7 +227,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter
#pragma warning(push)
#pragma warning(disable : 4996) // Deriving from deprecated class
#endif
class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API
class JSON_API
StyledWriter : public Writer {
public:
StyledWriter();
Expand Down Expand Up @@ -296,7 +296,7 @@ class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API
#pragma warning(push)
#pragma warning(disable : 4996) // Deriving from deprecated class
#endif
class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API
class JSON_API
StyledStreamWriter {
public:
/**
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jsoncpp_lib = library(
'src/lib_json/json_value.cpp',
'src/lib_json/json_writer.cpp',
]),
soversion : 24,
soversion : 25,
install : true,
include_directories : jsoncpp_include_directories,
cpp_args: dll_export_flag)
Expand Down