diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..73d64e0ef --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,45 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'fj'", + "cargo": { + "args": [ + "build", + "--bin=fj-host", + "--package=fj-host" + ], + "filter": { + "name": "fj-host", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'fj'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=fj-host", + "--package=fj-host" + ], + "filter": { + "name": "fj-host", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 5b0a3f204..8829ac73f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,11 +65,14 @@ fn main() -> anyhow::Result<()> { // handle it. let event = event.expect("Error handling watch event"); - if let notify::EventKind::Access( - notify::event::AccessKind::Close( - notify::event::AccessMode::Write, - ), - ) = event.kind + //Various acceptable ModifyKind kinds. Varies across platforms (e.g. MacOs vs. Windows10) + if let notify::EventKind::Modify(notify::event::ModifyKind::Any) + | notify::EventKind::Modify(notify::event::ModifyKind::Data( + notify::event::DataChange::Any, + )) + | notify::EventKind::Modify(notify::event::ModifyKind::Data( + notify::event::DataChange::Content, + )) = event.kind { let shape = match model.load(¶meters) { Ok(shape) => shape,