Skip to main content

Module watch

Module watch 

Source

Re-exportsΒ§

use super::build::BuildArgs; πŸ”’
use super::coverage::CoverageArgs; πŸ”’
use super::doc::DocArgs; πŸ”’
use super::fmt::FmtArgs; πŸ”’
use super::snapshot::GasSnapshotArgs; πŸ”’
use super::test::TestArgs; πŸ”’
use crate::opts::Forge; πŸ”’
use alloy_primitives::map::HashMap; πŸ”’
use alloy_primitives::map::HashSet; πŸ”’
use clap::CommandFactory; πŸ”’
use clap::Parser; πŸ”’
use eyre::Result; πŸ”’
use foundry_cli::utils; πŸ”’
use foundry_cli::utils::FoundryPathExt; πŸ”’
use foundry_cli::utils::LoadConfig; πŸ”’
use foundry_config::Config; πŸ”’
use parking_lot::Mutex; πŸ”’
use std::ffi::OsStr; πŸ”’
use std::ffi::OsString; πŸ”’
use std::io::IsTerminal; πŸ”’
use std::path::PathBuf; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::OnceLock; πŸ”’
use std::sync::Weak; πŸ”’
use std::sync::atomic::AtomicU8; πŸ”’
use std::sync::atomic::Ordering; πŸ”’
use std::time::Duration; πŸ”’
use tokio::process::Command as TokioCommand; πŸ”’
use watchexec::Watchexec; πŸ”’
use watchexec::action::ActionHandler; πŸ”’
use watchexec::command::Command; πŸ”’
use watchexec::command::Program; πŸ”’
use watchexec::job::CommandState; πŸ”’
use watchexec::job::Job; πŸ”’
use watchexec::paths::summarise_events_to_env; πŸ”’
use watchexec_events::Event; πŸ”’
use watchexec_events::KeyCode; πŸ”’
use watchexec_events::Keyboard; πŸ”’
use watchexec_events::Priority; πŸ”’
use watchexec_events::ProcessEnd; πŸ”’
use watchexec_events::Tag; πŸ”’
use watchexec_events::filekind::AccessKind; πŸ”’
use watchexec_events::filekind::FileEventKind; πŸ”’
use watchexec_signals::Signal; πŸ”’
use yansi::Color; πŸ”’
use yansi::Paint; πŸ”’

StructsΒ§

WatchArgs

EnumsΒ§

KeyboardAction πŸ”’
WatchFlag πŸ”’
How a command-line argument relates to the watch flag.

FunctionsΒ§

clean_cmd_args πŸ”’
Removes the --watch flag from the args for the Watchexec command, so that the child command does not enter watch mode itself and spawn another watcher.
cmd_args πŸ”’
Returns the env args without the --watch flag from the args for the Watchexec command.
command_options πŸ”’
Returns valueless short flags and variable-arity long options for the active command.
end_of_process πŸ”’
keyboard_action πŸ”’
looks_like_option πŸ”’
Returns whether arg looks like an option, which is where clap stops consuming the values of a num_args(0..) argument. A lone - is a value.
run
Runs the given [watchexec::Config].
run_inner πŸ”’
set_keyboard_events πŸ”’
setup_process πŸ”’
short_watch_pos πŸ”’
Returns the byte index after w in a short flag cluster, if arg contains a watch flag.
watch_build
Executes a [Watchexec] that listens for changes in the project’s src dir and reruns forge build
watch_command πŸ”’
Converts a list of arguments to a watchexec::Command.
watch_coverage
watch_doc
Executes a [Watchexec] that listens for changes affecting the generated documentation: project sources, optionally library sources, the README that becomes the homepage, the deployments directory, and the foundry config file itself. Without these, the live preview goes silently stale on common edits.
watch_flag πŸ”’
Returns how arg relates to the watch flag.
watch_fmt
watch_gas_snapshot
Executes a [Watchexec] that listens for changes in the project’s src dir and reruns forge snapshot
watch_test
Executes a [Watchexec] that listens for changes in the project’s src dir and reruns forge test

Type AliasesΒ§

KeyboardConfig πŸ”’
SpawnHook πŸ”’