@@ -28,43 +28,41 @@ let rec collectModules pn pu nn nu (m: Module) =
28
28
29
29
30
30
let loader ( projectRoot : string ) ( siteContent : SiteContents ) =
31
- try
32
- let label = " FSharp.Compiler.Service"
33
- let dll = Path.Combine( projectRoot, " .." , " .." , " artifacts" , " bin" , " fcs" , " Release" , " netcoreapp3.0" , " FSharp.Compiler.Service.dll" )
34
- let libs = Path.Combine( projectRoot, " .." , " .." , " artifacts" , " bin" , " fcs" , " Release" , " netcoreapp3.0" )
31
+ let label = " FSharp.Compiler.Service"
32
+ let dll = Path.Combine( projectRoot, " .." , " .." , " artifacts" , " bin" , " fcs" , " Release" , " netstandard2.0" , " FSharp.Compiler.Service.dll" )
33
+ let libs = Path.Combine( projectRoot, " .." , " .." , " artifacts" , " bin" , " fcs" , " Release" , " netstandard2.0" )
35
34
36
- printfn " generating api ref for %s at %s " label dll
35
+ if ( not ( File.Exists dll )) then failwithf " Unable to find FCS dll at %s " dll
37
36
38
- let output = MetadataFormat.Generate ( dll , markDownComments = true , publicOnly = true , libDirs = [ libs ])
37
+ printfn " generating api ref for %s at %s " label dll
39
38
40
- let allModules =
41
- output.AssemblyGroup.Namespaces
42
- |> List.collect ( fun n ->
43
- List.collect ( collectModules n.Name n.Name n.Name n.Name) n.Modules
44
- )
39
+ let output = MetadataFormat.Generate( dll, markDownComments = true , publicOnly = true , libDirs = [ libs])
45
40
46
- let allTypes =
47
- [
48
- yield !
49
- output.AssemblyGroup.Namespaces
50
- |> List.collect ( fun n ->
51
- n.Types |> List.map ( fun t -> { ParentName = n.Name; ParentUrlName = n.Name; NamespaceName = n.Name; NamespaceUrlName = n.Name; Info = t} )
52
- )
53
- yield !
54
- allModules
55
- |> List.collect ( fun n ->
56
- n.Info.NestedTypes |> List.map ( fun t -> { ParentName = n.Info.Name; ParentUrlName = n.Info.UrlName; NamespaceName = n.NamespaceName; NamespaceUrlName = n.NamespaceUrlName; Info = t}) )
57
- ]
58
- let entities = {
59
- Label = label
60
- Modules = allModules
61
- Types = allTypes
62
- GeneratorOutput = output
63
- }
64
- siteContent.Add entities
65
- printfn " generated api ref for %s at %s " label dll
66
- with
67
- | ex ->
68
- printfn " %A " ex
41
+ let allModules =
42
+ output.AssemblyGroup.Namespaces
43
+ |> List.collect ( fun n ->
44
+ List.collect ( collectModules n.Name n.Name n.Name n.Name) n.Modules
45
+ )
46
+
47
+ let allTypes =
48
+ [
49
+ yield !
50
+ output.AssemblyGroup.Namespaces
51
+ |> List.collect ( fun n ->
52
+ n.Types |> List.map ( fun t -> { ParentName = n.Name; ParentUrlName = n.Name; NamespaceName = n.Name; NamespaceUrlName = n.Name; Info = t} )
53
+ )
54
+ yield !
55
+ allModules
56
+ |> List.collect ( fun n ->
57
+ n.Info.NestedTypes |> List.map ( fun t -> { ParentName = n.Info.Name; ParentUrlName = n.Info.UrlName; NamespaceName = n.NamespaceName; NamespaceUrlName = n.NamespaceUrlName; Info = t}) )
58
+ ]
59
+ let entities = {
60
+ Label = label
61
+ Modules = allModules
62
+ Types = allTypes
63
+ GeneratorOutput = output
64
+ }
65
+ siteContent.Add entities
66
+ printfn " generated api ref for %s at %s " label dll
69
67
70
68
siteContent
0 commit comments