Skip to content

Commit 4629367

Browse files
committed
feat(cli): reconfigure dev session on config changes
1 parent 71e9004 commit 4629367

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/commands/run/dev/DevRebuilder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ namespace vix::commands::RunCommand::dev
7777

7878
DevRebuilderResult DevRebuilder::reconfigure_and_rebuild() const
7979
{
80+
if (!options_.quiet)
81+
info("Configuration change detected.");
82+
8083
DevRebuilderResult configured = run_configure_command();
8184
if (!configured.ok)
8285
return configured;

src/commands/run/dev/DevSession.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,14 @@ namespace vix::commands::RunCommand::dev
412412
const DevChangeKind kind = strongest_change_kind(changes);
413413

414414
if (change.valid())
415-
detail::print_watch_restart_banner(change.path, "Rebuilding project...");
415+
{
416+
const std::string label =
417+
kind == DevChangeKind::ReconfigureAndRebuild
418+
? "Reconfiguring project..."
419+
: "Rebuilding project...";
420+
421+
detail::print_watch_restart_banner(change.path, label);
422+
}
416423

417424
needRestart = true;
418425
stop_child(pid);
@@ -421,6 +428,7 @@ namespace vix::commands::RunCommand::dev
421428
(void)::waitpid(pid, &status, 0);
422429

423430
const int rebuildCode = rebuild_for_change(kind);
431+
424432
if (rebuildCode != 0)
425433
{
426434
hint("Fix the errors, save your files, and Vix will rebuild automatically.");

0 commit comments

Comments
 (0)