FSharp.Configuration icon indicating copy to clipboard operation
FSharp.Configuration copied to clipboard

Ini type provider: Load another ini file method

Open mvkara opened this issue 8 years ago • 5 comments

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

mvkara avatar Dec 09 '16 00:12 mvkara

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.

s-trooper avatar Feb 21 '17 10:02 s-trooper

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

vasily-kirichenko avatar Feb 21 '17 11:02 vasily-kirichenko

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.

Kubikx avatar Aug 10 '17 07:08 Kubikx

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.

vasily-kirichenko avatar Aug 10 '17 07:08 vasily-kirichenko

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

Kubikx avatar Aug 10 '17 13:08 Kubikx