(
cmd: Command,
wc: WatcherConfig,
ext_cache: ExtensionCache,
)
| 48 | } |
| 49 | |
| 50 | pub(crate) async fn new( |
| 51 | cmd: Command, |
| 52 | wc: WatcherConfig, |
| 53 | ext_cache: ExtensionCache, |
| 54 | ) -> Result<Arc<Watchexec>, ServerError> { |
| 55 | let init = crate::watcher::init(); |
| 56 | let runtime = crate::watcher::runtime(cmd, wc, ext_cache).await?; |
| 57 | |
| 58 | let wx = Watchexec::new(init, runtime)?; |
| 59 | wx.send_event(Event::default(), Priority::Urgent).await?; |
| 60 | |
| 61 | Ok(wx) |
| 62 | } |
| 63 | |
| 64 | fn init() -> InitConfig { |
| 65 | let mut config = InitConfig::default(); |