Skip to content

feat: use cli for messages, warnings and errors - #64

Merged
novica merged 1 commit into
mainfrom
feat--cli-conditions
Oct 20, 2026
Merged

novica merged 1 commit into
mainfrom
feat--cli-conditions

Conversation

@novica

@novica novica commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Closes #32.

Errors, warnings and verbose progress output now go through cli, so suppressMessages() silences progress output as well as verbose.

  • stop(), warning() and message() become cli_abort(), cli_warn() and cli_inform(). rlang is added to Imports because cli_abort() needs it; ggplot2 already depends on it.
  • checkParameters() and checkKmArgs() report errors against the calling function (bayesOpt(), addIterations(), updateGP()), not the internal helper.
  • Verbose progress lines are messages now. Each timed step prints one line after it finishes, with its elapsed time.
  • At verbose = 2, result tables are sent with message() so their layout is kept. The initialization error table uses rlang::abort() for the same reason.
  • print.bayesOpt() stays on stdout. stop() calls inside foreach worker bodies are unchanged.

User-visible change: progress output moves from stdout to stderr, so capture.output() or sink() no longer captures it.

Assisted-by: Claude Code

Progress output can now be silenced with suppressMessages(), not only
with verbose.

Closes #32

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@novica
novica merged commit 69e518f into main Oct 20, 2026
7 checks passed
@novica
novica deleted the feat--cli-conditions branch October 20, 2026 17:51
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.

Use cli for messages, warnings and errors

1 participant