is_ignored_path Function

public pure function is_ignored_path(path, build_dir) result(ignored)

Identify paths that should be ignored due to being inside the build directory.

This is used to prevent watch loops from triggering rebuilds due to build artifacts changing. When dependency watching is enabled, callers may selectively override this behavior.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
character(len=*), intent(in) :: build_dir

Return Value logical


Calls

proc~~is_ignored_path~~CallsGraph proc~is_ignored_path is_ignored_path proc~contains_path_fragment contains_path_fragment proc~is_ignored_path->proc~contains_path_fragment proc~normalize_path normalize_path proc~is_ignored_path->proc~normalize_path proc~starts_with starts_with proc~is_ignored_path->proc~starts_with proc~ends_with ends_with proc~contains_path_fragment->proc~ends_with

Called by

proc~~is_ignored_path~~CalledByGraph proc~is_ignored_path is_ignored_path proc~vec_push_unique vec_push_unique proc~vec_push_unique->proc~is_ignored_path proc~gather_files_with_mask gather_files_with_mask proc~gather_files_with_mask->proc~vec_push_unique proc~push_file_with_mask push_file_with_mask proc~push_file_with_mask->proc~vec_push_unique proc~compute_watch_files_from_settings compute_watch_files_from_settings proc~compute_watch_files_from_settings->proc~gather_files_with_mask proc~compute_watch_files_from_settings->proc~push_file_with_mask proc~rebuild_watch_list rebuild_watch_list proc~rebuild_watch_list->proc~compute_watch_files_from_settings proc~handle_manifest_change handle_manifest_change proc~handle_manifest_change->proc~rebuild_watch_list proc~watcher_init watcher_t%watcher_init proc~watcher_init->proc~rebuild_watch_list proc~watcher_run watcher_t%watcher_run proc~watcher_run->proc~rebuild_watch_list proc~watcher_run->proc~handle_manifest_change

Source Code

   pure logical function is_ignored_path(path, build_dir) result(ignored)
      character(len=*), intent(in) :: path, build_dir
      character(len=:), allocatable :: p, b

      p = normalize_path(path)
      b = normalize_path(build_dir)

      ignored = .false.

      if (len_trim(b) == 0) return

      if (p == b) then
         ignored = .true.
         return
      end if

      if (starts_with(p, b // "/")) then
         ignored = .true.
         return
      end if

      if (contains_path_fragment(p, b)) then
         ignored = .true.
         return
      end if
   end function is_ignored_path