{"record":{"id":"549e09347d95ff84","repo":"biomejs/biome","slug":"watcher-created","errorCode":null,"errorMessage":"watcher created","messagePattern":"watcher created","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/biome_cli/src/runner/impls/watchers/default.rs","lineNumber":21,"sourceCode":"use crate::runner::diagnostics::WatcherDiagnostic;\nuse crate::runner::watcher::{Watcher, WatcherEvent};\nuse biome_diagnostics::{Error, NotifyError};\nuse camino::Utf8PathBuf;\nuse notify::event::{CreateKind, ModifyKind, RemoveKind};\nuse notify::{Event, EventKind, RecursiveMode, Result, recommended_watcher};\nuse tracing::warn;\n\npub(crate) struct DefaultWatcher {\n    rx: Receiver<Result<Event>>,\n    watcher: Box<dyn notify::Watcher>,\n}\n\nimpl DefaultWatcher {\n    pub fn new() -> Self {\n        let (tx, rx) = channel();\n        Self {\n            rx,\n            watcher: Box::new(recommended_watcher(tx).expect(\"watcher created\")),\n        }\n    }\n}\n\nimpl Watcher for DefaultWatcher {\n    fn watch(&mut self, paths: Vec<Utf8PathBuf>) {\n        let mut watched_paths = self.watcher.paths_mut();\n\n        for path in paths {\n            if let Err(e) = watched_paths.add(path.as_std_path(), RecursiveMode::Recursive) {\n                warn!(\"Failed to watch path {}: {}\", path, e);\n            }\n        }\n        if let Err(e) = watched_paths.commit() {\n            warn!(\"Failed to commit watched paths: {}\", e);\n        }\n    }\n","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/biomejs/biome/blob/405dedb0ff65dd29927faf587f6542e3c29db248/crates/biome_cli/src/runner/impls/watchers/default.rs#L3-L39","documentation":"Error \"watcher created\" thrown in biomejs/biome.","triggerScenarios":"Thrown at crates/biome_cli/src/runner/impls/watchers/default.rs:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the watched paths exist before creating the watcher.","Check inotify/fs-event limits if watcher creation fails repeatedly."],"exampleFix":"// Raise the inotify watch limit: sysctl fs.inotify.max_user_watches","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"405dedb0ff65dd29927faf587f6542e3c29db248","analyzedAt":"2026-08-20T00:25:09.682Z","contentChangedAt":"2026-08-20T00:25:09.682Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}