-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Is your feature request related to a problem? Please describe.
Due to the nature of type providers all their static parameters must be literals. It's fine until you want to implement CI/CD pipeline and then you need to configure type providers dynamically regarding build process. Each type provider solves this issue individually. Some let you define the path to local file which will be tried as a fallback, if resource is not available at given url.
Describe the solution you'd like
It would be very nice if F# compiler could query existing assembly for the values of static parameters.
[<GetParametersFrom("TypeProviderValues.dll", ProviderId="Bar1")>]
type Foo1 = Bar<>
[<GetParametersFrom("TypeProviderValues.dll", ProviderId="Bar2")>]
type Foo2 = Bar<>And then assembly TypeProviderValues.dll which would adhere to some known strict protocol could return values for all required and optional parameters.
For example this assembly could use environment variables, or some json files or any other sources for populating parameters.