char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
a29d09f
main
1use std:: collections:: BTreeMap ; 2 3mod cache; 4mod env; 5mod execution; 6mod fingerprint; 7mod glob; 8mod graph; 9mod watch; 10 11pub use cache:: Cache ; 12pub use env::{ Error as EnvError , load_valuesas load_env_values}; 13pub use execution::{ CancelToken , Execution , FailedTask , ReadyTask , Report , RunOptions , Step }; 14pub use fingerprint:: graph_fingerprint; 15pub use glob::{ 16PatternError , collect_paths, compile_pattern, covers, expand_files, normalize_pattern, 17 validate_output_pattern, validate_pattern, 18}; 19pub use graph::{ Action , CallbackRef , Graph , Task , shell_quote}; 20pub use watch::{ 21EnvResolution , Relevance , WatchContext , WatchEvent , WatchSet , WatchState , external_roots, 22 forget_directories, known_directories, normalize_path, relative_to, remember_directories, 23 resolution_paths, resolve_watch_target, resolved_input_paths, 24}; 25 26# [ derive ( Debug , thiserror :: Error )] 27pub enum Error { 28# [ error ( "Unknown task {0:?}" )] 29UnknownTask ( String ), 30# [ error ( "Task cycle detected: {0}" )] 31Cycle ( String ), 32# [ error ( "Task {task:?} files pattern {pattern:?} matched no files" )] 33UnmatchedFiles { task : String , pattern : String }, 34# [ error ( "Task {task:?}: invalid glob pattern {pattern:?}: {message}" )] 35Pattern { 36task : String , 37pattern : String , 38message : String , 39}, 40# [ error ( "Task {task:?}: cannot read {path}: {source}" )] 41Read { 42task : String , 43path : String , 44# [ source ] 45source : std:: io:: Error , 46}, 47# [ error ( "Invalid environment variable name {0:?}" )] 48EnvName ( String ), 49# [ error ( transparent )] 50Env ( # [ from ] EnvError ), 51# [ error ( "Task {task:?}: unsupported action {kind} in this driver" )] 52UnsupportedAction { task : String , kind : &' static str }, 53# [ error ( transparent )] 54Io ( # [ from ] std:: io:: Error ), 55} 56 57pub type Result < T > = std:: result:: Result < T , Error >; 58pub type EnvMap =BTreeMap < String , String >; 59 60// ------------------------------------------------------------------ reporter 61 62pub trait Reporter { 63fn cached ( & self , _name : & str ) {} 64fn unmatched_output ( & self , _name : & str , _pattern : & str ) {} 65fn cache_error ( & self , _name : & str , _message : & str ) {} 66} 67 68pub struct NoopReporter ; 69impl Reporter for NoopReporter {}