Skip to content

Commit

Permalink
Revert "refactor: avoid informal contractions in warning/error messag…
Browse files Browse the repository at this point in the history
…es (#782)" (#785)

This reverts commit a225e0d.
  • Loading branch information
Disservin authored Jan 17, 2025
1 parent 1583840 commit b0e0eee
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/src/cli/sanitize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void sanitize(config::Tournament& config) {
if (util::fd_limit::maxSystemFileDescriptorCount() <
util::fd_limit::minFileDescriptorRequired(config.concurrency)) {
Logger::warn(
"There are not enough file descriptors available for the specified concurrency.\nPlease increase the limit "
"There aren't enough file descriptors available for the specified concurrency.\nPlease increase the limit "
"using ulimit -n 65536 for each shell manually or \nadjust the defaults (e.g. /etc/security/limits.conf,"
"/etc/systemd/system.conf, and/or /etc/systemd/user.conf).\nThe maximum number of file descriptors "
"required for this configuration is: {}",
Expand Down
2 changes: 1 addition & 1 deletion app/src/core/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void Logger::openFile(const std::string &file) {
if (!compress_) {
log_.emplace<std::ofstream>(file.c_str(), std::ios::app);
} else {
throw std::runtime_error("Compress is enabled but program was not compiled with zlib.");
throw std::runtime_error("Compress is enabled but program wasn't compiled with zlib.");
}
#endif

Expand Down
16 changes: 8 additions & 8 deletions app/src/engine/uci_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ process::Status UciEngine::isready(std::chrono::milliseconds threshold) {
}

if (res != process::Status::OK) {
Logger::trace<true>("Engine {} did not respond to isready.", config_.name);
Logger::trace<true>("Engine {} didn't respond to isready.", config_.name);
Logger::warn<true>("Warning; Engine {} is not responsive.", config_.name);

return res;
Expand Down Expand Up @@ -166,12 +166,12 @@ bool UciEngine::ucinewgame() {

std::optional<std::string> UciEngine::idName() {
if (!uci()) {
Logger::warn<true>("Warning; Engine {} did not respond to uci.", config_.name);
Logger::warn<true>("Warning; Engine {} didn't respond to uci.", config_.name);
return std::nullopt;
}

if (!uciok()) {
Logger::warn<true>("Warning; Engine {} did not respond to uci.", config_.name);
Logger::warn<true>("Warning; Engine {} didn't respond to uci.", config_.name);
return std::nullopt;
}

Expand All @@ -188,12 +188,12 @@ std::optional<std::string> UciEngine::idName() {

std::optional<std::string> UciEngine::idAuthor() {
if (!uci()) {
Logger::warn<true>("Warning; Engine {} did not respond to uci.", config_.name);
Logger::warn<true>("Warning; Engine {} didn't respond to uci.", config_.name);
return std::nullopt;
}

if (!uciok()) {
Logger::warn<true>("Warning; Engine {} did not respond to uci.", config_.name);
Logger::warn<true>("Warning; Engine {} didn't respond to uci.", config_.name);
return std::nullopt;
}

Expand Down Expand Up @@ -254,7 +254,7 @@ void UciEngine::sendSetoption(const std::string &name, const std::string &value)
auto option = uci_options_.getOption(name);

if (!option.has_value()) {
Logger::info<true>("Warning; {} does not have option {}", config_.name, name);
Logger::info<true>("Warning; {} doesn't have option {}", config_.name, name);
return;
}

Expand Down Expand Up @@ -310,7 +310,7 @@ bool UciEngine::start() {
}

if (!uciok(startup_time_)) {
Logger::warn<true>("Engine {} did not respond to uci with uciok after startup.", config_.name);
Logger::warn<true>("Engine {} didn't respond to uci with uciok after startup.", config_.name);

return false;
}
Expand All @@ -337,7 +337,7 @@ bool UciEngine::refreshUci() {
}

if (!ucinewgame()) {
Logger::trace<true>("Engine {} did not respond to ucinewgame.", config_.name);
Logger::trace<true>("Engine {} didn't respond to ucinewgame.", config_.name);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion app/tests/e2e/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ OUTPUT_FILE_3=$(mktemp)
-each tc=2+0.02s option.Hash=-16 option.Threads=2 -rounds 5 -repeat -concurrency 2 \
-openings file=app/tests/data/openings.pgn format=pgn order=random -log file=log.txt level=info 2>&1 | tee $OUTPUT_FILE_3

if ! grep -q "Warning; random_move_1 does not have option Threads" $OUTPUT_FILE_3; then
if ! grep -q "Warning; random_move_1 doesn't have option Threads" $OUTPUT_FILE_3; then
echo "Failed to save results."
exit 1
fi
Expand Down

0 comments on commit b0e0eee

Please sign in to comment.