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

[v0.6.3] errors on animations with windows d2.exe -w #1823

Open
Melandel opened this issue Jan 30, 2024 · 0 comments
Open

[v0.6.3] errors on animations with windows d2.exe -w #1823

Melandel opened this issue Jan 30, 2024 · 0 comments

Comments

@Melandel
Copy link

Hi, love the work!

In version 0.6.3, I also get a lot of activity (mainly retries, to be accurate), with accompanying errors.

Reproduction

Given the following sandbox.d2:

# Root board

x -> y

layers: {
  # Board named "numbers" that does not inherit anything from root

  numbers: {
    1 -> 2
  }
}

When I do the following actions:

  • d2.exe -w sandbox.d2
  • save sandbox.d2 without any changes beforehand

Then I get the following logs:

debug: using theme Neutral default (ID: 0)
success: listening on http://127.0.0.1:58536
info: compiling sandbox.d2...
debug: using layout plugin dagre (bundled)
success: successfully compiled sandbox.d2 to sandbox\numbers.svg in 73.9884ms
success: successfully compiled sandbox.d2 to sandbox\index.svg in 72.445ms
info: broadcasting update to 0 clients
success: GET / 200 457B 0s
success: GET /static/watch.css 200 206B 42.2503ms
success: GET /static/watch.js 200 2,661B 43.3761ms
success: GET /static/favicon.ico 200 1,150B 0s
success: GET /watch 101 0B 518.7µs

# At this point I'm going to do one action: saving the file (without changing it beforehand)

debug: received file system event REMOVE        "some\path\sandbox.d2"
debug: received file system event WRITE         "some\path\sandbox.d2"
info: detected change in sandbox.d2: recompiling...
debug: using layout plugin dagre (bundled)
success: successfully compiled sandbox.d2 to sandbox\numbers.svg in 71.1158ms
success: successfully compiled sandbox.d2 to sandbox\index.svg in 69.3875ms
info: broadcasting update to 1 client
debug: using layout plugin dagre (bundled)
debug: received file system event WRITE         "some\path\sandbox"
err: failed to watch "sandbox": GetFileAttributes: The system cannot find the file specified. (retrying in 2s)
success: successfully compiled sandbox.d2 to sandbox\numbers.svg in 69.1076ms
success: successfully compiled sandbox.d2 to sandbox\index.svg in 62.8426ms
info: broadcasting update to 1 client
debug: received file system event REMOVE        "some\path\sandbox"
debug: received file system event CREATE        "some\path\sandbox"
debug: received file system event WRITE         "some\path\sandbox"
info: detected change in sandbox: recompiling...
debug: using layout plugin dagre (bundled)
debug: received file system event REMOVE        "some\path\sandbox\\index.svg"
err: failed to watch "sandbox\\index.svg": GetFileAttributes: The system cannot find the path specified. (retrying in 2s)
success: successfully compiled sandbox.d2 to sandbox\numbers.svg in 77.9144ms
success: successfully compiled sandbox.d2 to sandbox\index.svg in 70.6919ms
info: broadcasting update to 1 client
debug: received file system event REMOVE        "some\path\sandbox\\numbers.svg"
debug: received file system event REMOVE        "some\path\sandbox"
info: detected change in sandbox, sandbox\index.svg, sandbox\numbers.svg: recompiling...
debug: using layout plugin dagre (bundled)
debug: received file system event REMOVE        "some\path\sandbox\\index.svg"
err: failed to watch "sandbox\\index.svg": GetFileAttributes: The system cannot find the path specified. (retrying in 2s)
success: successfully compiled sandbox.d2 to sandbox\numbers.svg in 72.9736ms
success: successfully compiled sandbox.d2 to sandbox\index.svg in 69.8808ms
info: broadcasting update to 1 client
debug: received file system event REMOVE        "some\path\sandbox\\index.svg"
debug: received file system event REMOVE        "some\path\sandbox\\numbers.svg"
debug: received file system event REMOVE        "some\path\sandbox\\numbers.svg"
debug: received file system event REMOVE        "some\path\sandbox"
info: detected change in sandbox, sandbox\index.svg, sandbox\numbers.svg: recompiling...
debug: using layout plugin dagre (bundled)
debug: received file system event REMOVE        "some\path\sandbox\\index.svg"
err: failed to watch "sandbox\\index.svg": GetFileAttributes: The system cannot find the path specified. (retrying in 2s)
success: successfully compiled sandbox.d2 to sandbox\numbers.svg in 70.4932ms
success: successfully compiled sandbox.d2 to sandbox\index.svg in 67.4764ms
info: broadcasting update to 1 client
debug: received file system event REMOVE        "some\path\sandbox\\index.svg"
debug: received file system event REMOVE        "some\path\sandbox\\numbers.svg"
debug: received file system event REMOVE        "some\path\sandbox\\numbers.svg"
debug: received file system event REMOVE        "some\path\sandbox"
info: detected change in sandbox, sandbox\index.svg, sandbox\numbers.svg: recompiling...
debug: using layout plugin dagre (bundled)
debug: received file system event REMOVE        "some\path\sandbox\\index.svg"
success: successfully compiled sandbox.d2 to sandbox\numbers.svg in 70.5336ms
err: failed to watch "sandbox\\index.svg": GetFileAttributes: The system cannot find the file specified. (retrying in 2s)
success: successfully compiled sandbox.d2 to sandbox\index.svg in 69.6613ms
info: broadcasting update to 1 client

Analysis

It seems that for some reason d2 tries to watch the bundle folder & files - triggering the following:

  • for the sandbox/ folder: err: failed to watch "sandbox": GetFileAttributes: The system cannot find the path specified. (retrying in 2s)
  • for the sandbox/index.svg file: err: failed to watch "sandbox\\index.svg": GetFileAttributes: The system cannot find the path specified. (retrying in 2s) after a receiving a REMOVE event
@cyborg-ts cyborg-ts added this to D2 Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant