fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

Ini type provider: Load another ini file method #110

Open mvkara opened 7 years ago

mvkara commented 7 years ago

Just trying to use the Ini type provider and having trouble with it that I'm not having with other type providers in my build scripts.

In a nutshell the problem is that the IniFile type provider uses the same Ini file that it used to generate the provided types. Would like a .Load("path/to/another/ini/file.ini") that allows me at runtime to dynamically select which Ini file to use and its location. I would expect the API to be the same as the sample INI I gave when writing the script.

FSharp.Data's JSON provider is an example of something that does this: http://fsharp.github.io/FSharp.Data/library/JsonProvider.html

s-trooper commented 7 years ago

sorry, i probably don't understand what this project is for but isn't quite strange to have the config to be static? actually it would be nice if all configuration provider would provide load/parse function.

vasily-kirichenko commented 7 years ago

@mvkra Good point. I think nobody has used Ini file provider. Go ahead and add Load.

Kubikx commented 6 years ago

Is this still planed? I am new to F# and config that can be read and written is necessary for almost all applications. I try to add Load myself but I have no idea how the ini type work after few hours of reading and trying to understand it. Then I give up and try yaml. I really prefer ini for cleaner look if it will be possible. Thanks for your answer.

vasily-kirichenko commented 6 years ago

No, it's not planned. I've never used this TP and have no plans to use it in the future. This feature should be implemented by someone who does use it.

Kubikx commented 6 years ago

Ok thanks for info. I will use yaml, because yaml have it.