Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ Don't interrupt reloads when files change.

Depending on your workflow, `ghciwatch` may feel more responsive with this set.

</dd>
<dt><a id="--track-warnings" href="#--track-warnings"><code>--track-warnings</code></a></dt><dd>

Track warnings across recompilations.

When enabled, warnings will be preserved in memory even when files are recompiled due to dependency changes, helping prevent "ephemeral warnings" from being missed.

</dd>
<dt><a id="--completions" href="#--completions"><code>--completions &lt;COMPLETIONS&gt;</code></a></dt><dd>

Expand Down
7 changes: 7 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ pub struct Opts {
#[arg(long, hide = true)]
pub tui: bool,

/// Track warnings across recompilations.
///
/// When enabled, warnings will be preserved in memory even when files are recompiled
/// due to dependency changes, helping prevent "ephemeral warnings" from being missed.
#[arg(long, env = "GHCIWATCH_TRACK_WARNINGS")]
pub track_warnings: bool,

/// Generate Markdown CLI documentation.
#[cfg(feature = "clap-markdown")]
#[arg(long, hide = true)]
Expand Down
3 changes: 3 additions & 0 deletions src/ghci/compilation_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use camino::Utf8Path;

use crate::ghci::parse::CompilationResult;
use crate::ghci::parse::CompilationSummary;
use crate::ghci::parse::CompilingModule;
use crate::ghci::parse::GhcDiagnostic;
use crate::ghci::parse::GhcMessage;
use crate::ghci::parse::Severity;
Expand All @@ -13,6 +14,7 @@ use super::parse::ModulesLoaded;
pub struct CompilationLog {
pub summary: Option<CompilationSummary>,
pub diagnostics: Vec<GhcDiagnostic>,
pub compiled_modules: Vec<CompilingModule>,
}

impl CompilationLog {
Expand Down Expand Up @@ -69,6 +71,7 @@ impl Extend<GhcMessage> for CompilationLog {
reason = progress.reason.as_deref().unwrap_or(""),
"Compiling",
);
self.compiled_modules.push(progress.module);
}
GhcMessage::Diagnostic(diagnostic) => {
if let GhcDiagnostic {
Expand Down
Loading