You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ReportGenerator documentation example does not work. Using the exact example provided, FAKE replies with:
Script is not valid:
/mnt/c/users/ThomasMAtwood/repos/test-project/build.fsx (282,34)-(282,43): Error FS0039: The record label 'TargetDir' is not defined. Maybe you want one of the following:
Targets
Target
TargetInfo
/mnt/c/users/[UserProfile]/repos/test-project/build.fsx (284,9)-(284,51): Error FS0001: Type mismatch. Expecting a
'IGlobbingPattern -> unit'
but given a
'string list -> unit'
The type 'IGlobbingPattern' does not match the type 'string list'
/mnt/c/users/[UserProfile]/repos/test-project/build.fsx (284,9)-(284,51): Error FS0001: Type mismatch. Expecting a
'IGlobbingPattern -> unit'
but given a
'string list -> unit'
The type 'IGlobbingPattern' does not match the type 'string list'
Hey @AtwoodTM I know it took a while, but thanks for reporting this. Yes indeed the correct code is:
Target.create "Generate Reports" (fun _ ->
!! "**/opencover.xml"
|> Seq.toList
|> ReportGenerator.generateReports (fun p -> { p with TargetDir = "c:/reports/" })
)
For some reason that module takes a list and inference in F# is not strong enough to figure out the types when defining the function as in the docs (a type hint would be required) :(
In any chase I changed it to a sequence in the next version and changed the docs.
Description
The ReportGenerator documentation example does not work. Using the exact example provided, FAKE replies with:
Script is not valid:
/mnt/c/users/ThomasMAtwood/repos/test-project/build.fsx (282,34)-(282,43): Error FS0039: The record label 'TargetDir' is not defined. Maybe you want one of the following:
Targets
Target
TargetInfo
/mnt/c/users/[UserProfile]/repos/test-project/build.fsx (284,9)-(284,51): Error FS0001: Type mismatch. Expecting a
'IGlobbingPattern -> unit'
but given a
'string list -> unit'
The type 'IGlobbingPattern' does not match the type 'string list'
/mnt/c/users/[UserProfile]/repos/test-project/build.fsx (284,9)-(284,51): Error FS0001: Type mismatch. Expecting a
'IGlobbingPattern -> unit'
but given a
'string list -> unit'
The type 'IGlobbingPattern' does not match the type 'string list'
where lines 273-288 are:
Repro steps
To reproduce, try the example code.
Expected behavior
The expected code would allow for the ReportGenerator to work.
Actual behavior
Please provide a description of the actual behavior you observe.
Known workarounds
There are no known workarounds
Related information
The text was updated successfully, but these errors were encountered: