-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated to FSharp.TypeProviders.SDK NuGet package from referenced files #229
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
File: ProvidedTypes.fsi | ||
File: ProvidedTypes.fs | ||
File: Pluralizer.fs | ||
File: NameUtils.fs | ||
|
||
System.Text.Json | ||
Microsoft.OpenApi.Readers | ||
FSharp.TypeProviders.SDK | ||
|
||
YamlDotNet |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ namespace SwaggerProvider.Internal.v3.Compilers | |
open System | ||
open System.Reflection | ||
open ProviderImplementation.ProvidedTypes | ||
open UncheckedQuotations | ||
open FSharp.Data.Runtime.NameUtils | ||
open Swagger.Internal | ||
open SwaggerProvider.Internal | ||
|
@@ -194,11 +193,11 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = | |
ty, | ||
getterCode = | ||
(function | ||
| [ this ] -> Expr.FieldGetUnchecked(this, providedField) | ||
| [ this ] -> Expr.FieldGet(this, providedField) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please explain this change as well. Why we should not use Expr methods crafted for TP authors as part of TP SDK? It is probably because you SDK out of assembly and have no longer assess to them... Hmm |
||
| _ -> failwith "invalid property getter params"), | ||
setterCode = | ||
(function | ||
| [ this; v ] -> Expr.FieldSetUnchecked(this, providedField, v) | ||
| [ this; v ] -> Expr.FieldSet(this, providedField, v) | ||
| _ -> failwith "invalid property setter params") | ||
) | ||
|
||
|
@@ -307,7 +306,7 @@ type DefinitionCompiler(schema: OpenApiDocument, provideNullable) as this = | |
| _ -> failwith "Wrong constructor arguments" | ||
|
||
List.zip args fields | ||
|> List.map(fun (arg, f) -> Expr.FieldSetUnchecked(this, f, arg)) | ||
|> List.map(fun (arg, f) -> Expr.FieldSet(this, f, arg)) | ||
|> List.rev | ||
|> List.fold (fun a b -> Expr.Sequential(a, b)) <@@ () @@> | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
File: ProvidedTypes.fsi | ||
File: ProvidedTypes.fs | ||
|
||
FSharp.Core | ||
FSharp.SystemTextJson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.