watch_types Module

Shared types used throughout fpm-watch.

This module defines the configuration records used to pass options and fpm settings into the engine.


Uses

  • module~~watch_types~~UsesGraph module~watch_types watch_types fpm_command_line fpm_command_line module~watch_types->fpm_command_line fpm_strings fpm_strings module~watch_types->fpm_strings iso_fortran_env iso_fortran_env module~watch_types->iso_fortran_env

Used by

  • module~~watch_types~~UsedByGraph module~watch_types watch_types module~watch_banner watch_banner module~watch_banner->module~watch_types module~watch_cli watch_cli module~watch_cli->module~watch_types module~watch_config watch_config module~watch_cli->module~watch_config module~watch_config->module~watch_types module~watch_engine watch_engine module~watch_engine->module~watch_types module~watch_engine->module~watch_banner module~watch_exec watch_exec module~watch_engine->module~watch_exec module~watch_feature_factory watch_feature_factory module~watch_engine->module~watch_feature_factory module~watch_feature_manager watch_feature_manager module~watch_engine->module~watch_feature_manager module~watch_fpm_graph watch_fpm_graph module~watch_engine->module~watch_fpm_graph module~watch_log watch_log module~watch_engine->module~watch_log module~watch_exec->module~watch_types module~watch_feat_stats watch_feat_stats module~watch_feat_stats->module~watch_types module~watch_feature_api watch_feature_api module~watch_feat_stats->module~watch_feature_api module~watch_feat_stats->module~watch_log module~watch_feature_api->module~watch_types module~watch_feature_factory->module~watch_types module~watch_feature_factory->module~watch_feat_stats module~watch_feature_factory->module~watch_feature_api module~watch_feature_factory->module~watch_feature_manager module~watch_feature_factory->module~watch_log module~watch_feature_manager->module~watch_types module~watch_feature_manager->module~watch_feature_api module~watch_fpm_graph->module~watch_types module~watch_fpm_graph->module~watch_log module~watch_log->module~watch_types module~watch_restart watch_restart module~watch_restart->module~watch_config

Derived Types

type, public ::  root_info_t

Root target metadata used for change → target mapping.

Read more…

Components

Type Visibility Attributes Name Initial
integer(kind=int64), public :: mask = 0_int64
character(len=:), public, allocatable :: name

type, public ::  watch_config_t

Fully assembled watcher configuration.

Read more…

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: cmd_prefix

Cached remainder after the subcommand token (for injection).

character(len=:), public, allocatable :: cmd_rest
character(len=:), public, allocatable :: fpm_cmdline

Selected fpm subcommand (build, test, or run).

class(fpm_build_settings), public, allocatable :: settings

Cached prefix up to and including the subcommand token (for injection).

character(len=:), public, allocatable :: subcmd

Typed fpm settings corresponding to subcmd.

type(watch_opts_t), public :: w

Full command line string to execute (e.g., fpm test -- ...).

type, public ::  watch_opts_t

Watcher configuration options.

Read more…

Components

Type Visibility Attributes Name Initial
real, public :: debounce = 0.2

Optional periodic rescan interval (seconds). 0 disables periodic rescans.

logical, public :: debug = .false.

Poll interval (seconds) between change scans.

type(string_t), public, allocatable :: enabled_features(:)

Run once (init + optional run-on-start) and exit (CI-friendly).

type(string_t), public, allocatable :: ignore(:)

Glob patterns to include; if empty, includes all.

type(string_t), public, allocatable :: include(:)

Names of optional feature plugins to enable.

logical, public :: low_cpu = .false.

Glob patterns to ignore.

logical, public :: once = .false.
real, public :: poll = 0.5

Debounce interval (seconds) used after the first detected change.

logical, public :: print_files_once = .false.

Suppress fpm output; keep only fpm-watch status lines.

real, public :: rescan = 0.0

Run the command once immediately on startup.

logical, public :: run_on_start = .true.

Print the watched file list once at startup (requires high verbosity).

logical, public :: silent_fpm = .false.

Also watch dependency project sources (can include paths under build dir).

integer, public :: verbosity = 0

Enable extra debug output and internal timing/status messages.

logical, public :: watch_deps = .false.

Use OS sleep for waiting to minimize idle CPU usage.