Merge branch 'bug/285-error-converting-value-to-string' into 'latest-fc'
#285 error converting value to string See merge request PBSA/tools-libs/peerplays-fc!24
This commit is contained in:
commit
6171e973c7
6 changed files with 47 additions and 6 deletions
|
|
@ -2,9 +2,43 @@ include:
|
||||||
- template: Jobs/Code-Quality.gitlab-ci.yml
|
- template: Jobs/Code-Quality.gitlab-ci.yml
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- build
|
||||||
- test
|
- test
|
||||||
|
- trigger_build_peerplays
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- rm -rf .git/modules/vendor ./vendor
|
||||||
|
- git submodule sync
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- rm -rf build
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
- make -j$(nproc)
|
||||||
|
artifacts:
|
||||||
|
untracked: true
|
||||||
|
paths:
|
||||||
|
- build/tests/
|
||||||
|
tags:
|
||||||
|
- builder-fc
|
||||||
|
|
||||||
|
test:
|
||||||
|
stage: test
|
||||||
|
dependencies:
|
||||||
|
- build
|
||||||
|
script:
|
||||||
|
- ./build/tests/all_test
|
||||||
|
tags:
|
||||||
|
- builder-fc
|
||||||
|
when:
|
||||||
|
- manual
|
||||||
|
|
||||||
trigger_build_peerplays:
|
trigger_build_peerplays:
|
||||||
stage: test
|
stage: trigger_build_peerplays
|
||||||
|
dependencies:
|
||||||
|
- test
|
||||||
script:
|
script:
|
||||||
- "curl -X POST -F token=$CI_JOB_TOKEN -F ref=$REF_NAME https://gitlab.com/api/v4/projects/10735589/trigger/pipeline"
|
- "curl -X POST -F token=$CI_JOB_TOKEN -F ref=$REF_NAME https://gitlab.com/api/v4/projects/10735589/trigger/pipeline"
|
||||||
|
|
||||||
|
|
@ -3,7 +3,12 @@
|
||||||
#define FC_PACK_MAX_DEPTH 1000
|
#define FC_PACK_MAX_DEPTH 1000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef FC_MAX_STRING_OBJECT_DEPTH
|
||||||
|
// how many levels of nested objects are proceed for string functions
|
||||||
|
#define FC_MAX_STRING_OBJECT_DEPTH 200
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef FC_MAX_LOG_OBJECT_DEPTH
|
#ifndef FC_MAX_LOG_OBJECT_DEPTH
|
||||||
// how many levels of nested objects are displayed in log messages
|
// how many levels of nested objects are displayed in log messages
|
||||||
#define FC_MAX_LOG_OBJECT_DEPTH 200
|
#define FC_MAX_LOG_OBJECT_DEPTH 1000
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -15,7 +15,7 @@ namespace fc
|
||||||
{
|
{
|
||||||
string endpoint = "127.0.0.1:12201";
|
string endpoint = "127.0.0.1:12201";
|
||||||
string host = "fc"; // the name of the host, source or application that sent this message (just passed through to GELF server)
|
string host = "fc"; // the name of the host, source or application that sent this message (just passed through to GELF server)
|
||||||
uint32_t max_object_depth;
|
uint32_t max_object_depth = FC_MAX_LOG_OBJECT_DEPTH;
|
||||||
};
|
};
|
||||||
|
|
||||||
gelf_appender(const variant& args);
|
gelf_appender(const variant& args);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include <fc/utility.hpp>
|
#include <fc/utility.hpp>
|
||||||
#include <fc/fwd.hpp>
|
#include <fc/fwd.hpp>
|
||||||
#include <fc/optional.hpp>
|
#include <fc/optional.hpp>
|
||||||
|
#include <fc/config.hpp>
|
||||||
|
|
||||||
#ifndef USE_FC_STRING
|
#ifndef USE_FC_STRING
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
@ -25,7 +26,7 @@ namespace fc
|
||||||
|
|
||||||
typedef fc::optional<fc::string> ostring;
|
typedef fc::optional<fc::string> ostring;
|
||||||
class variant_object;
|
class variant_object;
|
||||||
fc::string format_string( const fc::string&, const variant_object&, uint32_t max_object_depth = 200 );
|
fc::string format_string( const fc::string&, const variant_object&, uint32_t max_object_depth = FC_MAX_STRING_OBJECT_DEPTH );
|
||||||
fc::string trim( const fc::string& );
|
fc::string trim( const fc::string& );
|
||||||
fc::string to_lower( const fc::string& );
|
fc::string to_lower( const fc::string& );
|
||||||
string trim_and_normalize_spaces( const string& s );
|
string trim_and_normalize_spaces( const string& s );
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,8 @@ namespace fc {
|
||||||
filename(p),
|
filename(p),
|
||||||
flush(true),
|
flush(true),
|
||||||
rotate(false),
|
rotate(false),
|
||||||
rotation_compression(false)
|
rotation_compression(false),
|
||||||
|
max_object_depth(FC_MAX_LOG_OBJECT_DEPTH)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
file_appender::file_appender( const variant& args ) :
|
file_appender::file_appender( const variant& args ) :
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,7 @@ BOOST_AUTO_TEST_CASE(recursion_test)
|
||||||
BOOST_AUTO_TEST_CASE(rethrow_test)
|
BOOST_AUTO_TEST_CASE(rethrow_test)
|
||||||
{
|
{
|
||||||
fc::variants biggie;
|
fc::variants biggie;
|
||||||
for( int i = 0; i < 250; i++ )
|
for( int i = 0; i < 1010; i++ )
|
||||||
{
|
{
|
||||||
fc::variant tmp( std::move(biggie) );
|
fc::variant tmp( std::move(biggie) );
|
||||||
biggie.reserve(1);
|
biggie.reserve(1);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue