Closed rojepp closed 11 years ago
Debugging it, I see that cfg.ResolutionFolder is set to '/' when building from Xamarin Studio. Hard-coding it to the current project works:
[<TypeProvider>]
type public JsonProvider(cfg:TypeProviderConfig) as this =
inherit TypeProviderForNamespaces()
do cfg.ResolutionFolder <- "/Users/robert/geofindervgr/GeoFinderVGR"
Obviously, this is not a bug in FSharp.Data, and should affect all Type Providers that read local files. Possibly a bug in the language binding, ie. something it should be doing that it's not? Maybe @dsyme could help locate it?
Closing, raised an issue in fsharpbinding instead, as this has nothing to do with FSharp.Data.
Are you sure that cfg.ResolutionFolder that is wrong? That value is set by the compiler when invoking the type provider design time assembly, so if it comes wrong, the bug is in the compiler itself and not the binding
Yup, I'm sure it's wrong, It is set to '/' when compiling. Oddly, intellisense and error check manages to compile the file. See more at the fsharpbinding bug: https://github.com/fsharp/fsharpbinding/issues/161
I'm trying to specify a file to use with the Json TP, and it is not working in Xamarin Studio on Mac. This works on Windows/VS2012:
On Mac, I get an error:
Absolute paths work fine, but is obviously not an option:
I'm guessing this bug applies to all TP's in FSharp.Data?