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

When trying to watch non-existing file or directory, report a single error kind instead of the native one #110

Closed
dfaust opened this issue Jan 12, 2017 · 2 comments

Comments

@dfaust
Copy link
Member

dfaust commented Jan 12, 2017

Linux: Io(Error { repr: Os { code: 2, message: "No such file or directory" } })
Windows: Generic("Input watch path is neither a file nor a directory.")
macOS: PathNotFound

Any opinions?

@passcod
Copy link
Member

passcod commented Dec 28, 2017

This will be handled above the backend in v5.

However, it will still be a problem in race conditions when the file disappears between the time the frontend checks for it and the backend attempts to watch it. That will need to be fixed somehow, but I haven't yet figured out what path I want to take for it.

@passcod passcod changed the title All back-ends report different errors when trying to watch non-existing file or directory When trying to watch non-existing file or directory, report a single error kind instead of the native one Dec 28, 2017
passcod added a commit that referenced this issue Dec 31, 2017
- NotImplemented, convenience variant to be used in Backend development
- Unavailable, to indicate at runtime that a Backend's upstream is
unavailable
- NonExistent, as a common error from an upstream that indicates one or
more path passed was not found by the upstream. See #110
@passcod
Copy link
Member

passcod commented Jul 12, 2018

This is solved in v5 as file-does-not-exist errors are a specific variant now.

The race condition problem is also solved as both a core and a backend concern. Basically because of #64 and how that's implemented we retry creating backends if it fails on specific paths, without those specific paths.

Closing before v5 release to clear things up a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants