watch_exec Module

Command execution and run reporting.

Provides the user-facing change summary and the mechanics to construct and execute the effective fpm command.


Uses

  • module~~watch_exec~~UsesGraph module~watch_exec watch_exec face face module~watch_exec->face fpm_command_line fpm_command_line module~watch_exec->fpm_command_line fpm_filesystem fpm_filesystem module~watch_exec->fpm_filesystem fpm_strings fpm_strings module~watch_exec->fpm_strings iso_fortran_env iso_fortran_env module~watch_exec->iso_fortran_env module~watch_types watch_types module~watch_exec->module~watch_types module~watch_util watch_util module~watch_exec->module~watch_util module~watch_types->fpm_command_line module~watch_types->fpm_strings module~watch_types->iso_fortran_env module~watch_util->fpm_strings

Used by

  • module~~watch_exec~~UsedByGraph module~watch_exec watch_exec module~watch_engine watch_engine module~watch_engine->module~watch_exec

Functions

public function build_run_command(settings, full_cmdline, cmd_prefix, cmd_rest, roots, file_mask, changed_idx, changed_count) result(cmd)

Construct the effective command to run based on changes and target masks.

Read more…

Arguments

Type IntentOptional Attributes Name
class(fpm_build_settings), intent(in) :: settings
character(len=*), intent(in) :: full_cmdline
character(len=*), intent(in) :: cmd_prefix
character(len=*), intent(in) :: cmd_rest
type(root_info_t), intent(in), allocatable :: roots(:)
integer(kind=int64), intent(in), allocatable :: file_mask(:)
integer, intent(in) :: changed_idx(:)
integer, intent(in) :: changed_count

Return Value character(len=:), allocatable


Subroutines

public subroutine report_changes(files, changed_idx, changed_count, w)

Print a summary of changed files.

Read more…

Arguments

Type IntentOptional Attributes Name
type(string_t), intent(in), allocatable :: files(:)
integer, intent(in) :: changed_idx(:)
integer, intent(in) :: changed_count
type(watch_opts_t), intent(in) :: w

public subroutine run_command_and_report(cmd, w, exitstat, secs)

Execute a command and print pre/post status lines.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: cmd
type(watch_opts_t), intent(in) :: w
integer, intent(out) :: exitstat
real, intent(out) :: secs