#f# #mono #runtime-error #documentation-generation
#f# #mono #ошибка во время выполнения #документация-генерация
Вопрос:
mdoc-update выдает ошибку по непонятной мне причине, когда я пытаюсь извлечь документацию из моего модуля F #. Я почти уверен, что это сработало год назад с более ранней версией mono, когда я пытался в последний раз. Кто-нибудь может указать мне направление решения? Спасибо.
У меня есть следующие файлы библиотеки:
library.fsi:
module Library
/// Calculate the n'th Fibonacci number
val fib : int -> int
и library.fs:
module Library
let fib N =
if N < 3 then
1
else
let mutable pair = (1,1)
for i = 3 to N do
pair <- (snd pair, fst pair snd pair)
snd pair
который я пытаюсь создать документацию на macOS:
% fsharpc -a --doc:library.xml library.fsi library.fs
Microsoft (R) F# Compiler version 10.2.3 for F# 4.5
Copyright (c) Microsoft Corporation. All Rights Reserved.
% mdoc update -o library -i library.xml library.dll
mdoc 5.7.4.9
Updating library, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null from library.dll
New Type: Library
mdoc: Error processing library, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null from library.dll
See `mdoc help' for more information or use --debug to diagnose.
что мне мало что говорит. Когда я включаю —debug, я получаю:
% mdoc update --debug -o library -i library.xml library.dll
mdoc 5.7.4.9
Updating library, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null from library.dll
New Type: Library
mdoc: Mono.Documentation.MDocAssemblyException: Error processing library, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null from library.dll ---> Mono.Documentation.MDocException: Failed to resolve type 'Microsoft.FSharp.Core.SourceConstructFlags' ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'FSharp.Core, Version=4.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Mono.Documentation.Updater.Frameworks.MDocBaseResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters, System.Collections.Generic.IEnumerable`1[T] filesToIgnore) [0x000a3] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.Updater.Frameworks.MDocResolver.ResolveCore (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters, System.Collections.Generic.IEnumerable`1[T] assembliesToIgnore) [0x00060] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.Updater.Frameworks.MDocResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters r, Mono.Cecil.TypeReference forType, System.Collections.Generic.List`1[T] exportedFiles) [0x00018] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.Updater.Frameworks.CachedResolver.ResolveCore (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters, Mono.Cecil.TypeReference forType) [0x000ba] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.Updater.Frameworks.MDocMetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00058] in <8a665cb14afb4f9387a990248cf5aa4a>:0
--- End of inner exception stack trace ---
at Mono.Documentation.Updater.Frameworks.MDocMetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00116] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00006] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.TypeReference.Resolve () [0x00006] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.Mixin.CheckedResolve (Mono.Cecil.TypeReference self) [0x00000] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum (Mono.Cecil.TypeReference enum_type) [0x00000] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue (Mono.Cecil.TypeReference type) [0x0002f] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement (Mono.Cecil.TypeReference type) [0x00015] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument (Mono.Cecil.TypeReference type) [0x00015] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments (Mono.Cecil.CustomAttribute attribute, Mono.Collections.Generic.Collection`1[T] parameters) [0x0002e] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature (Mono.Cecil.CustomAttribute attribute) [0x0003c] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.CustomAttribute.<Resolve>b__35_0 (Mono.Cecil.CustomAttribute attribute, Mono.Cecil.MetadataReader reader) [0x00000] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.ModuleDefinition.Read[TItem] (TItem item, System.Action`2[T1,T2] read) [0x00029] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.CustomAttribute.Resolve () [0x00017] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Cecil.CustomAttribute.get_ConstructorArguments () [0x00000] in <d0880c9e0e204e5b832aba851d156b77>:0
at Mono.Documentation.MDocUpdater <GetCustomAttributes>d__131.MoveNext () [0x0010e] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at System.Linq.Enumerable ConcatIterator`1[TSource].MoveNext () [0x0002b] in <05b66110ab0444709658bd2493f67004>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00015] in <05b66110ab0444709658bd2493f67004>:0
at Mono.Documentation.MDocUpdater.MakeAttributes (System.Xml.XmlElement root, System.Collections.Generic.IEnumerable`1[T] attributes, Mono.Documentation.Updater.Frameworks.FrameworkEntry fx, Mono.Documentation.Updater.Frameworks.FrameworkTypeEntry typeEntry, System.String assemblyName) [0x00011] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDocUpdater.UpdateType (System.Xml.XmlElement root, Mono.Cecil.TypeDefinition type, Mono.Documentation.Updater.Frameworks.FrameworkTypeEntry typeEntry) [0x0053e] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDocUpdater.DoUpdateType2 (System.String message, System.Xml.XmlDocument basefile, Mono.Cecil.TypeDefinition type, Mono.Documentation.Updater.Frameworks.FrameworkTypeEntry typeEntry, System.String output, System.Boolean insertSince) [0x00042] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDocUpdater.StubType (Mono.Documentation.Updater.Frameworks.AssemblySet set, Mono.Cecil.AssemblyDefinition assembly, Mono.Cecil.TypeDefinition type, System.String output, System.Collections.Generic.IEnumerable`1[T] importers, System.String Id, System.String Version) [0x00045] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDocUpdater.DoUpdateType (Mono.Documentation.Updater.Frameworks.AssemblySet set, Mono.Cecil.AssemblyDefinition assembly, Mono.Cecil.TypeDefinition type, Mono.Documentation.Updater.Frameworks.FrameworkTypeEntry typeEntry, System.String basepath, System.String dest) [0x00249] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDocUpdater.DoUpdateAssembly (Mono.Documentation.Updater.Frameworks.AssemblySet assemblySet, Mono.Cecil.AssemblyDefinition assembly, System.Xml.XmlElement index_types, System.String source, System.String dest, System.Collections.Generic.HashSet`1[T] goodfiles) [0x000ad] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDocUpdater.DoUpdateAssemblies (System.String source, System.String dest) [0x000f0] in <8a665cb14afb4f9387a990248cf5aa4a>:0
--- End of inner exception stack trace ---
at Mono.Documentation.MDocUpdater.DoUpdateAssemblies (System.String source, System.String dest) [0x00149] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDocUpdater.Run (System.Collections.Generic.IEnumerable`1[T] args) [0x0081f] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDoc.Run (System.String[] args) [0x001d1] in <8a665cb14afb4f9387a990248cf5aa4a>:0
at Mono.Documentation.MDoc.Main (System.String[] args) [0x00006] in <8a665cb14afb4f9387a990248cf5aa4a>:0
See `mdoc help' for more information or use --debug to diagnose.
The library.xml файл выглядит нормальным для меня:
% cat library.xml
<?xml version="1.0" encoding="utf-8"?>
<doc>
<assembly><name>library</name></assembly>
<members>
<member name="M:Library.fib(System.Int32)">
<summary>
Calculate the namp;apos;th Fibonacci number
</summary>
</member>
</members>
</doc>