-
Notifications
You must be signed in to change notification settings - Fork 285
Description
I would like to keep 3rd party data-structures of JSON / XML files (samples) in separate files, so that e.g. the intellisense of those files is easily checked.
So I like using F# data with, great:
// Library 1 (a dll):
FSharp.Data.JsonProvider<"json-samples/whateverService.json", SampleIsList = true>
//...logic to use the types.
// Root project (e.g. myprogram.exe): Project reference (or NuGet) to Library 1.However, when multiple F# projects exist, e.g., via separate NuGet libraries or separate F# dlls, it's really unclear (on compile-time) what the relative path is pointing to.
So it seems this "json-samples"-folder should be included in all the root level programs, while my expectation would be that it only points to the library of actual source code above (Library1). FSharp.Data is a generative provider. Wouldn't it be enough to generate the types on the compilation of Library1, then embed them there, and never spend resources to regenerate them again (on design-time and compilation of "root programs")?