Skip to main content

Module glob

Module glob 

Source
Expand description

Shared glob-set compilation (EF.1).

One place to turn a list of string patterns into a compiled [globset::GlobSet]. Used by crate::EventFilter’s path_glob field (mode-activation triggers, mode-architecture.md §7.4) and the major-mode resolver (MA.2); the LSP file-watcher and workspace-exclude builders each carried their own parse-skip-build loop before this, so the directive (EF.1) was to consolidate rather than grow a third copy.

Consolidating here means one graceful-degradation policy (CLAUDE.md “graceful error handling – log + skip on recoverable failures, never panic”): an unparsable pattern is logged at warn and skipped; a failed final build falls back to an empty set (matches nothing) instead of panicking.

Functions§

compile_glob_set
Compile patterns into a single [GlobSet] that matches a path against any of them in one pass.