-
Notifications
You must be signed in to change notification settings - Fork 146
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
File system watchers are not held and/or disposed #268
Comments
We should probably upgrade the TypeProvider.fs and remove the watchForChanges stuff |
Nah, that "TypeProviders.fs" I linked to isn't the TypeProviderEmit API, it's the implementation of the FSharp.Data.TypeProviders.dll. There's not currently any reusable helpers for managing this. |
Seems this bug has been spread all over the type providers... |
@forki, I fixed it in FSharp.Data, you can merge from there if you want |
It seem I need someone to make it compile in VS2013 first |
what do you mean? |
The .fsproj files are completely broken in VS2013 and do not compile. Probably the same as fsprojects/FAKE#180 |
Humm, it's building for me both in VS2013 and VS2012 |
Closing as the type providers have all been moved to other projects like https://github.com/fsprojects/FSharp.Configuration and https://github.com/fsprojects/ExcelProvider |
The helper here https://github.com/fsharp/fsharpx/blob/master/src/FSharpx.TypeProviders/TypeProvider.Helper.fs#L24
creates a FileSystemWatcher but never disposes it. This will result in either memory leaks or early disposal of the watcher (and hence events won't be raised).
A handle to the FileSystemWatcher should be kept in the type provider object and IDisposable should be implemented by the type provider object. Compare with this
https://github.com/fsharp/fsharp/blob/master/src/fsharp/FSharp.Data.TypeProviders/TypeProviders.fs#L265
The text was updated successfully, but these errors were encountered: