Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model recompile on windows and MacOS #28

Merged
merged 5 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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}"
}
]
}
13 changes: 8 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(&parameters) {
Ok(shape) => shape,
Expand Down