Skip to content

Fix external merge in python index module#437

Open
hendrikmuhs wants to merge 4 commits into
KeyviDev:masterfrom
hendrikmuhs:fix-external-merge
Open

Fix external merge in python index module#437
hendrikmuhs wants to merge 4 commits into
KeyviDev:masterfrom
hendrikmuhs:fix-external-merge

Conversation

@hendrikmuhs
Copy link
Copy Markdown
Contributor

external merge in the python module was broken after switching process creation

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

std::vector<std::string> args;
std::string token;
while (iss >> token) {
args.push_back(std::move(token));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "std::move" is directly included [misc-include-cleaner]

keyvi/include/keyvi/index/internal/merge_job.h:27:

- #include <vector>
+ #include <utility>
+ #include <vector>


external_process_.reset(
new boost::process::v2::process(*external_process_ctx, payload_.settings_.GetKeyviMergerBin(), args));
external_process_.reset(new boost::process::v2::process(*external_process_ctx, executable, args));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: initializing non-owner argument of type 'boost::process::basic_process<> *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]

    external_process_.reset(new boost::process::v2::process(*external_process_ctx, executable, args));
                            ^


external_process_.reset(
new boost::process::v2::process(*external_process_ctx, payload_.settings_.GetKeyviMergerBin(), args));
external_process_.reset(new boost::process::v2::process(*external_process_ctx, executable, args));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use std::make_shared instead [modernize-make-shared]

Suggested change
external_process_.reset(new boost::process::v2::process(*external_process_ctx, executable, args));
external_process_ = std::make_shared<boost::process::v2::process>(*external_process_ctx, executable, args);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant