Closed bartelink closed 10 months ago
Workaround is carting around:
type Argu.ParseResults<'T when 'T :> Argu.IArgParserTemplate> with
member x.GetResult([<ReflectedDefinition>] e: Quotations.Expr<'Fields -> 'T>, f: unit -> 'Fields) = x.TryGetResult(e) |> Option.defaultWith f
Could you add a release note and a new version for this? We can have another release with this.
Sure, 6.1.3, or another number?
Not entirely sure, 6.1.3
sounds right to me. Although I don't have the greatest insight into this specific fix.
On reflection, I think the correct implementation may be a bit more involved...
Give me a while before we merge it...
@nojaf OK, happier with this
If the truth be told, I'm sill looking for a fully integrated way of having a <MandatoryOrFromEnvVar "name">
mechanism as I'm rappling for in https://github.com/fsprojects/Argu/issues/143 though!
I'm going to try another publish with this fix.
Looks great, nice work (though I see my summary docs are lacking...) https://fsprojects.github.io/Argu/reference/argu-parseresults-1.html#GetResult
Useful to defer computation work (or raising of an exception in the course of that) to look up a fallback where a parameter is missing