fsprojects / FSharp.Formatting

F# tools for generating documentation (Markdown processor and F# code formatter)
https://fsprojects.github.io/FSharp.Formatting/
Other
464 stars 156 forks source link

CommandLine tool doesn't find dll, FAKE tool fails with InvalidOperationException #167

Closed haf closed 8 years ago

haf commented 10 years ago

Windows

PS X:\logary\src\Logary\bin\Release> ../../../../buildsupport/FSharp.Formatting.CommandTool/tools/fsformatting.exe metadataFormat "--generat
e" "--dllFiles" Intelliplan.Logary.dll "--outDir" output "--layoutRoots" layouts
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en-US, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en-US, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en, PublicKeyToken=null
[2 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en-US, PublicKeyToken=null
[2 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en-US, PublicKeyToken=null
[2 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en, PublicKeyToken=null
[2 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=en, PublicKeyToken=null
[5 sec] **** error: Could not resolve this reference. Could not locate the assembly "Intelliplan.Logary.dll". Check to make sure the assembl
y exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245)
[5 sec] **** warning: Assembly reference 'Intelliplan.Logary.dll' was not found or is invalid
[5 sec] Reading assembly: Intelliplan.Logary.dll
[5 sec] **** Skipping assembly 'Intelliplan.Logary' because was not found in resolved assembly list
[0 sec] received exception in MetadataFormat.Generate:
 System.Exception: Unknown project name. Provide 'properties' parameter with 'project-name' key.
   at FSharp.MetadataFormat.MetadataFormat.Generate(FSharpList`1 dllFiles, String outDir, IEnumerable`1 layoutRoots, FSharpOption`1 paramete
rs, FSharpOption`1 namespaceTemplate, FSharpOption`1 moduleTemplate, FSharpOption`1 typeTemplate, FSharpOption`1 xmlFile, FSharpOption`1 sou
rceRepo, FSharpOption`1 sourceFolder, FSharpOption`1 publicOnly, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 markDownC
omments) in c:\Tomas\Public\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 830
   at FSharp.Formatting.Options.MetadataFormat.GenerateOptions.FSharp-Formatting-IExecutable-IExecutable-Execute() in c:\Tomas\Public\FSharp
.Formatting\src\FSharp.Formatting.CommandTool\OptionsMetadataFormat.fs:line 101
PS X:\logary\src\Logary\bin\Release> ls Intelliplan.Logary.dll

    Directory: X:\logary\src\Logary\bin\Release

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-----        2014-06-05     09:17     256512 Intelliplan.Logary.dll

OS X:

16:27:47 ~/dev/logary/src/Logary/bin/Release $ mono ../../../../buildsupport/FSharp.Formatting.CommandTool/tools/fsformatting.exe metadataFormat "--generate" "--dllFiles" Intelliplan.Logary.dll "--outDir" output "--layoutRoots" layouts --libDirs .
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv-SE, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv-SE, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv, PublicKeyToken=null
[1 sec] **** error: Unable to find the file 'Intelliplan.Logary.dll' in any of
 /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5
 /var/folders/j7/wbmqw81j2_jcfwn6_hh0ltlh4zjfkz/T/.
 /var/folders/j7/wbmqw81j2_jcfwn6_hh0ltlh4zjfkz/T
 /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.0
[1 sec] **** warning: Assembly reference 'Intelliplan.Logary.dll' was not found or is invalid
[1 sec] Reading assembly: Intelliplan.Logary.dll
[1 sec] **** Skipping assembly 'Intelliplan.Logary' because was not found in resolved assembly list
[0 sec] received exception in MetadataFormat.Generate:
 System.Exception: Unknown project name. Provide 'properties' parameter with 'project-name' key.
  at FSharp.MetadataFormat.MetadataFormat.Generate (Microsoft.FSharp.Collections.FSharpList`1 dllFiles, System.String outDir, IEnumerable`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 namespaceTemplate, Microsoft.FSharp.Core.FSharpOption`1 moduleTemplate, Microsoft.FSharp.Core.FSharpOption`1 typeTemplate, Microsoft.FSharp.Core.FSharpOption`1 xmlFile, Microsoft.FSharp.Core.FSharpOption`1 sourceRepo, Microsoft.FSharp.Core.FSharpOption`1 sourceFolder, Microsoft.FSharp.Core.FSharpOption`1 publicOnly, Microsoft.FSharp.Core.FSharpOption`1 libDirs, Microsoft.FSharp.Core.FSharpOption`1 otherFlags, Microsoft.FSharp.Core.FSharpOption`1 markDownComments) [0x00000] in <filename unknown>:0
  at FSharp.Formatting.Options.MetadataFormat.GenerateOptions.FSharp-Formatting-IExecutable-IExecutable-Execute () [0x00000] in <filename unknown>:0
haf commented 10 years ago

Using this library is really confusing:

 $ fsharpi buildsupport/docs.fsx
Copying styles and scripts: /Users/henfel/dev/logary/build/output/content/style.css
Copying styles and scripts: /Users/henfel/dev/logary/build/output/content/style.css.bak
Copying styles and scripts: /Users/henfel/dev/logary/build/output/content/tips.js
Copying styles and scripts: /Users/henfel/dev/logary/build/output/content/img/github-blue.png
Copying styles and scripts: /Users/henfel/dev/logary/build/output/content/img/github.png
Creating /Users/henfel/dev/logary/build/output/reference
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=sv-SE, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=sv, PublicKeyToken=null
[1 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=sv-SE, PublicKeyToken=null
[1 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=sv, PublicKeyToken=null
[1 sec] **** error: Unable to find the file 'FSharp.Actor.dll' in any of
 /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5
 /var/folders/j7/wbmqw81j2_jcfwn6_hh0ltlh4zjfkz/T
 /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.0
[1 sec] Reading assembly: /Users/henfel/dev/logary/buildsupport/../src/Logary/bin/Release/Intelliplan.Logary.dll
[1 sec] **** Skipping assembly 'Intelliplan.Logary' because was not found in resolved assembly list
[1 sec] Starting razor engine
Missing method RazorEngine.Templating.DynamicViewBag::.ctor() in assembly /Users/henfel/dev/logary/buildsupport/RazorEngine/lib/net45/RazorEngine.dll, referenced in assembly /Users/henfel/dev/logary/buildsupport/FSharp.Formatting/lib/net40/FSharp.MetadataFormat.dll
System.MissingMethodException: Method not found: 'RazorEngine.Templating.DynamicViewBag..ctor'.
  at FSharp.MetadataFormat.MetadataFormat.Generate (Microsoft.FSharp.Collections.FSharpList`1 dllFiles, System.String outDir, IEnumerable`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 namespaceTemplate, Microsoft.FSharp.Core.FSharpOption`1 moduleTemplate, Microsoft.FSharp.Core.FSharpOption`1 typeTemplate, Microsoft.FSharp.Core.FSharpOption`1 xmlFile, Microsoft.FSharp.Core.FSharpOption`1 sourceRepo, Microsoft.FSharp.Core.FSharpOption`1 sourceFolder, Microsoft.FSharp.Core.FSharpOption`1 publicOnly, Microsoft.FSharp.Core.FSharpOption`1 libDirs, Microsoft.FSharp.Core.FSharpOption`1 otherFlags, Microsoft.FSharp.Core.FSharpOption`1 markDownComments) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.MetadataFormat.Generate (System.String dllFile, System.String outDir, IEnumerable`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 namespaceTemplate, Microsoft.FSharp.Core.FSharpOption`1 moduleTemplate, Microsoft.FSharp.Core.FSharpOption`1 typeTemplate, Microsoft.FSharp.Core.FSharpOption`1 xmlFile, Microsoft.FSharp.Core.FSharpOption`1 sourceRepo, Microsoft.FSharp.Core.FSharpOption`1 sourceFolder, Microsoft.FSharp.Core.FSharpOption`1 publicOnly, Microsoft.FSharp.Core.FSharpOption`1 libDirs, Microsoft.FSharp.Core.FSharpOption`1 otherFlags, Microsoft.FSharp.Core.FSharpOption`1 markDownComments) [0x00000] in <filename unknown>:0
  at FSI_0001.buildReference () [0x00000] in <filename unknown>:0
  at <StartupCode$FSI_0001>.$FSI_0001.main@ () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Stopped due to error
haf commented 10 years ago

Ok, continuing trying to make it work, getting further:

mono buildsupport/FAKE/tools/Fake.exe buildsupport/docs.fsx
fsharpi buildsupport/docs.fsx
Copying styles and scripts: /Users/henfel/dev/logary/build/api/content/style.css
Copying styles and scripts: /Users/henfel/dev/logary/build/api/content/style.css.bak
Copying styles and scripts: /Users/henfel/dev/logary/build/api/content/tips.js
Copying styles and scripts: /Users/henfel/dev/logary/build/api/content/img/github-blue.png
Copying styles and scripts: /Users/henfel/dev/logary/build/api/content/img/github.png
Creating /Users/henfel/dev/logary/build/api/reference
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=sv-SE, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=sv, PublicKeyToken=null
[1 sec] Reading assembly: /Users/henfel/dev/logary/buildsupport/../src/Logary/bin/Release/Intelliplan.Logary.dll
[1 sec] Parsing assembly
System.InvalidOperationException: The input sequence has an insufficient number of elements.
  at Microsoft.FSharp.Collections.SeqModule+Skip@1500[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].GenerateNext (IEnumerable`1& next) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].MoveNextImpl () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+map@116[System.String,Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].DoMoveNext (System.String& ) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+MapEnumerator`1[System.String].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[String] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.ValueReader.formatTypeArguments (IEnumerable`1 typars) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.ValueReader.readMemberOrVal (FSharp.MetadataFormat.ReadingContext ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpMemberFunctionOrValue v) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+tryReadMember@562.Invoke (System.String cat, IDictionary`2 _arg1, FSharp.MetadataFormat.Comment comment) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.Collections.Generic.IDictionary`2[System.String,System.String]].InvokeFast[Comment,Member] (Microsoft.FSharp.Core.FSharpFunc`2 func, System.String arg1, IDictionary`2 arg2, FSharp.MetadataFormat.Comment arg3) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readCommentsInto[Member] (FSharp.MetadataFormat.ReadingContext ctx, System.String xmlDoc, Microsoft.FSharp.Core.FSharpFunc`2 f) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.tryReadMember (FSharp.MetadataFormat.ReadingContext ctx, MemberKind kind, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpMemberFunctionOrValue memb) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+readAllMembers@569.Invoke (Microsoft.FSharp.Compiler.SourceCodeServices.FSharpMemberFunctionOrValue memb) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+choose@163[FSharp.MetadataFormat.Member,Microsoft.FSharp.Compiler.SourceCodeServices.FSharpMemberFunctionOrValue].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[Member] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readAllMembers (FSharp.MetadataFormat.ReadingContext ctx, MemberKind kind, IEnumerable`1 members) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+readType@644.Invoke (System.String cat, IDictionary`2 cmds, FSharp.MetadataFormat.Comment comment) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.Collections.Generic.IDictionary`2[System.String,System.String]].InvokeFast[Comment,Type] (Microsoft.FSharp.Core.FSharpFunc`2 func, System.String arg1, IDictionary`2 arg2, FSharp.MetadataFormat.Comment arg3) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readCommentsInto[Type] (FSharp.MetadataFormat.ReadingContext ctx, System.String xmlDoc, Microsoft.FSharp.Core.FSharpFunc`2 f) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readType (FSharp.MetadataFormat.ReadingContext ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity typ) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+readModulesAndTypes@636-2.Invoke (FSharp.MetadataFormat.ReadingContext ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity typ) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3036[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity,Microsoft.FSharp.Core.FSharpOption`1[FSharp.MetadataFormat.Type],FSharp.MetadataFormat.ValueReader+ReadingContext].Invoke (Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity u) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+choose@163[FSharp.MetadataFormat.Type,Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[Type] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readChildren[Type] (FSharp.MetadataFormat.ReadingContext ctx, IEnumerable`1 entities, Microsoft.FSharp.Core.FSharpFunc`2 reader, Microsoft.FSharp.Core.FSharpFunc`2 cond) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readModulesAndTypes (FSharp.MetadataFormat.ReadingContext ctx, IEnumerable`1 entities) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+readModule@692.Invoke (System.String cat, IDictionary`2 cmd, FSharp.MetadataFormat.Comment comment) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.Collections.Generic.IDictionary`2[System.String,System.String]].InvokeFast[Comment,Module] (Microsoft.FSharp.Core.FSharpFunc`2 func, System.String arg1, IDictionary`2 arg2, FSharp.MetadataFormat.Comment arg3) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readCommentsInto[Module] (FSharp.MetadataFormat.ReadingContext ctx, System.String xmlDoc, Microsoft.FSharp.Core.FSharpFunc`2 f) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readModule (FSharp.MetadataFormat.ReadingContext ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity modul) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+readModulesAndTypes@635.Invoke (FSharp.MetadataFormat.ReadingContext ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity modul) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3036[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity,Microsoft.FSharp.Core.FSharpOption`1[FSharp.MetadataFormat.Module],FSharp.MetadataFormat.ValueReader+ReadingContext].Invoke (Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity u) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+choose@163[FSharp.MetadataFormat.Module,Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[Module] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readChildren[Module] (FSharp.MetadataFormat.ReadingContext ctx, IEnumerable`1 entities, Microsoft.FSharp.Core.FSharpFunc`2 reader, Microsoft.FSharp.Core.FSharpFunc`2 cond) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readModulesAndTypes (FSharp.MetadataFormat.ReadingContext ctx, IEnumerable`1 entities) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+readModule@692.Invoke (System.String cat, IDictionary`2 cmd, FSharp.MetadataFormat.Comment comment) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.Collections.Generic.IDictionary`2[System.String,System.String]].InvokeFast[Comment,Module] (Microsoft.FSharp.Core.FSharpFunc`2 func, System.String arg1, IDictionary`2 arg2, FSharp.MetadataFormat.Comment arg3) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readCommentsInto[Module] (FSharp.MetadataFormat.ReadingContext ctx, System.String xmlDoc, Microsoft.FSharp.Core.FSharpFunc`2 f) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readModule (FSharp.MetadataFormat.ReadingContext ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity modul) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+readModulesAndTypes@635.Invoke (FSharp.MetadataFormat.ReadingContext ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity modul) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.OptimizedClosures+Invoke@3036[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity,Microsoft.FSharp.Core.FSharpOption`1[FSharp.MetadataFormat.Module],FSharp.MetadataFormat.ValueReader+ReadingContext].Invoke (Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity u) [0x00000] in <filename unknown>:0
 Rakefile.rb
  at Microsoft.FSharp.Collections.IEnumerator+choose@163[FSharp.MetadataFormat.Module,Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[Module] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readChildren[Module] (FSharp.MetadataFormat.ReadingContext ctx, IEnumerable`1 entities, Microsoft.FSharp.Core.FSharpFunc`2 reader, Microsoft.FSharp.Core.FSharpFunc`2 cond) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readModulesAndTypes (FSharp.MetadataFormat.ReadingContext ctx, IEnumerable`1 entities) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readNamespace (FSharp.MetadataFormat.ReadingContext ctx, System.String ns, IEnumerable`1 entities) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader+namespaces@737.Invoke (System.Tuple`2 tupledArg) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+map@116[FSharp.MetadataFormat.Namespace,System.Tuple`2[System.String,System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity]]].DoMoveNext (FSharp.MetadataFormat.Namespace& ) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+MapEnumerator`1[FSharp.MetadataFormat.Namespace].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[Namespace] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.Reader.readAssembly (Microsoft.FSharp.Compiler.SourceCodeServices.FSharpAssembly assembly, Boolean publicOnly, System.String xmlFile, Microsoft.FSharp.Core.FSharpOption`1 sourceFolderRepo, Boolean markDownComments) [0x00000] in <filename unknown>:0
  at <StartupCode$FSharp-MetadataFormat>.$Main+assemblies@842-2.GenerateNext (IEnumerable`1& next) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[System.Tuple`2[System.Reflection.AssemblyName,Microsoft.FSharp.Collections.FSharpList`1[FSharp.MetadataFormat.Namespace]]].MoveNextImpl () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[System.Tuple`2[System.Reflection.AssemblyName,Microsoft.FSharp.Collections.FSharpList`1[FSharp.MetadataFormat.Namespace]]].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[Tuple`2] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.MetadataFormat.Generate (Microsoft.FSharp.Collections.FSharpList`1 dllFiles, System.String outDir, IEnumerable`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 namespaceTemplate, Microsoft.FSharp.Core.FSharpOption`1 moduleTemplate, Microsoft.FSharp.Core.FSharpOption`1 typeTemplate, Microsoft.FSharp.Core.FSharpOption`1 xmlFile, Microsoft.FSharp.Core.FSharpOption`1 sourceRepo, Microsoft.FSharp.Core.FSharpOption`1 sourceFolder, Microsoft.FSharp.Core.FSharpOption`1 publicOnly, Microsoft.FSharp.Core.FSharpOption`1 libDirs, Microsoft.FSharp.Core.FSharpOption`1 otherFlags, Microsoft.FSharp.Core.FSharpOption`1 markDownComments) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.MetadataFormat.Generate (System.String dllFile, System.String outDir, IEnumerable`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 namespaceTemplate, Microsoft.FSharp.Core.FSharpOption`1 moduleTemplate, Microsoft.FSharp.Core.FSharpOption`1 typeTemplate, Microsoft.FSharp.Core.FSharpOption`1 xmlFile, Microsoft.FSharp.Core.FSharpOption`1 sourceRepo, Microsoft.FSharp.Core.FSharpOption`1 sourceFolder, Microsoft.FSharp.Core.FSharpOption`1 publicOnly, Microsoft.FSharp.Core.FSharpOption`1 libDirs, Microsoft.FSharp.Core.FSharpOption`1 otherFlags, Microsoft.FSharp.Core.FSharpOption`1 markDownComments) [0x00000] in <filename unknown>:0
  at FSI_0001.buildReference () [0x00000] in <filename unknown>:0
  at <StartupCode$FSI_0001>.$FSI_0001.main@ () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0

At commit 1b112a2, F# 3.1 on mono 3.4.0, on this line of code:

  let formatTypeArguments (typars:seq<FSharpGenericParameter>) =
    Seq.map formatTypeArgument typars |> List.ofSeq

This doesn't look like it's something that can fail:

System.InvalidOperationException: The input sequence has an insufficient number of elements.
  at Microsoft.FSharp.Collections.SeqModule+Skip@1500[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].GenerateNext (IEnumerable`1& next) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].MoveNextImpl () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+map@116[System.String,Microsoft.FSharp.Compiler.SourceCodeServices.FSharpGenericParameter].DoMoveNext (System.String& ) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.IEnumerator+MapEnumerator`1[System.String].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Collections.SeqModule.ToList[String] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at FSharp.MetadataFormat.ValueReader.formatTypeArguments (IEnumerable`1 typars) [0x00000] in <filename unknown>:0

GeneratedSequenceBase must be something in the compiler?

tpetricek commented 10 years ago

This is pretty confusing. I'm a bit busy at the moment (you should be able to build FSharp.Fomratting from source and debug this), but if you can upload the DLL somewhere, I'll have a look when I'm a bit more free!

haf commented 10 years ago

https://github.com/logary/logary#building

and then:

bundle exec rake docs:build

Should work on all three platforms.

Ok, I'll compile Formatting and have a look then. I just wish I could have spent these hours writing docs instead :( (not saying what you're doing isn't awesome, because it is, but still this is the way I feel right now)

haf commented 10 years ago

Corresponding Windows stack trace:

buildsupport\FAKE\tools\Fake.exe buildsupport/docs.fsx
Copying styles and scripts: X:\logary\build\api\content\style.css
Copying styles and scripts: X:\logary\build\api\content\style.css.bak
Copying styles and scripts: X:\logary\build\api\content\tips.js
Copying styles and scripts: X:\logary\build\api\content\img\github-blue.png
Copying styles and scripts: X:\logary\build\api\content\img\github.png
Creating X:\logary\build\api\reference
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en-US, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en-US, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en, PublicKeyToken=null
[0 sec] **** error: Problem reading assembly 'FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Error opening
 binary file 'X:\logary\src\Logary\bin\Release\FSharp.Core.dll': File 'X:\logary\src\Logary\bin\Release\FSharp.Core.optdata' not found along
side FSharp.Core
[0 sec] **** error: Error opening binary file 'X:\logary\src\Logary\bin\Release\FSharp.Core.dll': File 'X:\logary\src\Logary\bin\Release\FSh
arp.Core.optdata' not found alongside FSharp.Core
[0 sec] **** error: File 'X:\logary\src\Logary\bin\Release\FSharp.Core.optdata' not found alongside FSharp.Core
[0 sec] **** stopping due to critical errors
System.Exception: **** stopped due to critical errors
   at FSharp.MetadataFormat.MetadataFormat.Generate(FSharpList`1 dllFiles, String outDir, IEnumerable`1 layoutRoots, FSharpOption`1 paramete
rs, FSharpOption`1 namespaceTemplate, FSharpOption`1 moduleTemplate, FSharpOption`1 typeTemplate, FSharpOption`1 xmlFile, FSharpOption`1 sou
rceRepo, FSharpOption`1 sourceFolder, FSharpOption`1 publicOnly, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 markDownC
omments) in c:\Tomas\Public\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 835
   at FSharp.MetadataFormat.MetadataFormat.Generate(String dllFile, String outDir, IEnumerable`1 layoutRoots, FSharpOption`1 parameters, FSh
arpOption`1 namespaceTemplate, FSharpOption`1 moduleTemplate, FSharpOption`1 typeTemplate, FSharpOption`1 xmlFile, FSharpOption`1 sourceRepo
, FSharpOption`1 sourceFolder, FSharpOption`1 publicOnly, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 markDownComments
) in c:\Tomas\Public\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 761
   at FSI_0001.buildReference() in X:\logary\buildsupport\docs.fsx:line 73
   at <StartupCode$FSI_0001>.$FSI_0001.main@() in X:\logary\buildsupport\docs.fsx:line 92
Stopped due to error
rake aborted!
Albacore::CommandFailedError: Command failed with status (1):
  buildsupport\FAKE\tools\Fake.exe buildsupport/docs.fsx
Copying styles and scripts: X:\logary\build\api\content\style.css
Copying styles and scripts: X:\logary\build\api\content\style.css.bak
Copying styles and scripts: X:\logary\build\api\content\tips.js
Copying styles and scripts: X:\logary\build\api\content\img\github-blue.png
Copying styles and scripts: X:\logary\build\api\content\img\github.png
Creating X:\logary\build\api\reference
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en-US, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en-US, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.50.0, Culture=en, PublicKeyToken=null
[0 sec] **** error: Problem reading assembly 'FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a': Error opening
 binary file 'X:\logary\src\Logary\bin\Release\FSharp.Core.dll': File 'X:\logary\src\Logary\bin\Release\FSharp.Core.optdata' not found along
side FSharp.Core
[0 sec] **** error: Error opening binary file 'X:\logary\src\Logary\bin\Release\FSharp.Core.dll': File 'X:\logary\src\Logary\bin\Release\FSh
arp.Core.optdata' not found alongside FSharp.Core
[0 sec] **** error: File 'X:\logary\src\Logary\bin\Release\FSharp.Core.optdata' not found alongside FSharp.Core
[0 sec] **** stopping due to critical errors
X:/logary/Rakefile.rb:86:in `block (2 levels) in <top (required)>'
Tasks: TOP => docs:build
(See full trace by running task with --trace)
haf commented 10 years ago

Copying .{optdata,sigdata} to output dir, gets me exactly the same error on Windows as on mono.

haf commented 10 years ago

It can be worth noting that I'm trying to generate docs for a project on F# 3.0/.Net 4.0.

haf commented 10 years ago

I'm giving up, going to set up proper CI for my own project and actually write some docs. Tell me if I can be of service in any other way.

tpetricek commented 10 years ago

This might be some issue with F# Compiler Service. Perhaps @dsyme would know?

In any case, if you can give me a simple ZIP file with FSX to run and DLL to process, then I can easily test it, which would be great. I do not know anything about rake and it scares me :-)

haf commented 10 years ago

Any update on this? It would be great to get some documentation going? Is there anything I can help you with? I have sent an e-mail with the dll to you, and the instructions should be easy enough to follow if you prefer to build it yourself =).

tpetricek commented 10 years ago

I finally tested this and it seems to work fine on my machine (using Windows and latest build of F# Formatting). Not sure what's going on here!

Do you have FSharp.Core version 4.3.0.0, or just 4.3.1.0 (in the GAC)?

haf commented 10 years ago

screen shot 2014-06-24 at 10 29 03

screen shot 2014-06-24 at 10 29 21

haf commented 10 years ago

I can try with the latest build, if the nuget isn't the latest.

Otherwise, did you try with rake runner, or just running the fsx file? It could be that ruby is always 32bit and therefore launches a 32 bit CLR?

haf commented 10 years ago

Why does it complain that it can't find the name property?

 $ mono FSharp.Formatting.CommandTool.2.4.11/tools/fsformatting.exe metadataFormat --generate --dllFiles Suave/bin/Release/suave.dll --outDir docs/ --layoutRoots docs/templates
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv-SE, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv-SE, PublicKeyToken=null
[0 sec] Resolving assembly: FSharp.Compiler.Service.resources, Version=0.0.44.0, Culture=sv, PublicKeyToken=null
[1 sec] **** error: Unable to find the file 'Suave/bin/Release/suave.dll' in any of
 /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5
 /var/folders/j7/wbmqw81j2_jcfwn6_hh0ltlh4zjfkz/T
 /Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.0
[1 sec] **** warning: Assembly reference 'Suave/bin/Release/suave.dll' was not found or is invalid
[1 sec] Reading assembly: Suave/bin/Release/suave.dll
[1 sec] **** Skipping assembly 'suave' because was not found in resolved assembly list
[0 sec] received exception in MetadataFormat.Generate:
 System.Exception: Unknown project name. Provide 'properties' parameter with 'project-name' key.
  at FSharp.MetadataFormat.MetadataFormat.Generate (Microsoft.FSharp.Collections.FSharpList`1 dllFiles, System.String outDir, IEnumerable`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 namespaceTemplate, Microsoft.FSharp.Core.FSharpOption`1 moduleTemplate, Microsoft.FSharp.Core.FSharpOption`1 typeTemplate, Microsoft.FSharp.Core.FSharpOption`1 xmlFile, Microsoft.FSharp.Core.FSharpOption`1 sourceRepo, Microsoft.FSharp.Core.FSharpOption`1 sourceFolder, Microsoft.FSharp.Core.FSharpOption`1 publicOnly, Microsoft.FSharp.Core.FSharpOption`1 libDirs, Microsoft.FSharp.Core.FSharpOption`1 otherFlags, Microsoft.FSharp.Core.FSharpOption`1 markDownComments) [0x00000] in <filename unknown>:0
  at FSharp.Formatting.Options.MetadataFormat.GenerateOptions.FSharp-Formatting-IExecutable-IExecutable-Execute () [0x00000] in <filename unknown>:0
fbmnds commented 10 years ago

I assume that the indication of a compiler service error is just a subsequent fault within cascading errors. It is more likely that the root case is indeed a search path issue as indicated for example in @haf´s last post: [1 sec] **** error: Unable to find the file 'Suave/bin/Release/suave.dll' in any of ...

As @tpetricek already confirmed on 23. June, the formatting process basically works on one dll file in question in his environment. Please pass this example to me that I can verify it in my environment. I´d then continue to analyse the search path aspect, which might be a commandline tool issue - or just an issue in @haf´s environment.

@haf: in your initial post of 6. June, the parameters on the commandline options are quoted. This may lead to nasty side effects depending on the quote evaluation logic of your OS/shell. [Update] see now that this creeped in via Fake. Not a good idea, @forki - if it were, you overlooked this.

fbmnds commented 10 years ago

@haf while diggging deeper into the problem, I feel growing confidence that my assumption about the search path issue is more likely than a F# compiler service issue.

While I did not find the build.fsx in your project Suave, I assume from your previous posts that you played unsuccessfully with Fake without being aware about the underlying dependency chain:

Use the Fake DSL in `build.fsx` in order to access the Fake lib function that wraps 
the commandline tool which in turn calls the appropriate FSharp.Formatting function. 

Looking into Suave, I suggest to introduce in the project´s Rakefile a direct system call to the commandline tool. This is probably the last idea you toyed with. It looks to me that your system call

$ mono FSharp.Formatting.CommandTool.2.4.11/tools/fsformatting.exe metadataFormat --generate --dllFiles Suave/bin/Release/suave.dll --outDir docs/ --layoutRoots docs/templates

only misses to define the parameter --sourceFolder as starting point for relative path evaluation for the parameter --dllfiles, refer to the corresponding Fake command.

ademar commented 10 years ago

between @haf I think I encountered this issue in the past and found the cause; I was able then to generate docs for suave. I will see if I can locate that project.

fbmnds commented 10 years ago

@ademar can I delete the draft PR then and can this issue here be closed?

Any hint to the root cause that should be considered in FSharp.Formatting?

ademar commented 10 years ago

I found some bits from a year ago, I think CommandTool did not existed back then. Anyhow it seems my solution was simply to pass the full path.

MetadataFormat.Generate(@"C:\..\suave.dll", output_folder, [ template_file ])
fbmnds commented 10 years ago

Almost yes, as this will not work on your OS X server.

In summary, you may want to consider the following points:

@tpetricek it may make sense that you address these points in some way in the documentation here(?). I could add the summary above in the commandline tool docs with reference to your doc. - The issue should be closed.

haf commented 10 years ago

Can we close this issue first when we have a working cross platform build, please?

fbmnds commented 10 years ago

I cannot recommend to track configuration problems of your projects here. The decision is up to @tpetricek, of course. I am ready to assist you anyway, if wanted, here

haf commented 10 years ago

I see your point, however if the default flags are incorrect in what is 'required' and/or I can't point to a dll with a relative path, at least create one or two new issues for those problems? After all, the command line tool can't be used successfully by following its own output.

However, today I'm back from vacation, so I'm ready to start playing around with your suggestions!

On 28 jul 2014, at 07:51, fbmnds notifications@github.com wrote:

I cannot recommend to track configuration problems of your projects here. The decision is up to @tpetricek, of course. I am ready to assist you anyway, if wanted, here

— Reply to this email directly or view it on GitHub.

fbmnds commented 10 years ago

Be assured that this kind of reflection happens:

I agree that here are some design weeknesses. I see the following points // cc: @tpetricek, @forki:

I´ll keep an eye on your progress and give advice when requested. This will provide valuable user feedback for the tools. Currently I think, that a commented generate.fsx file laying out all thisinformation by means of literate programming in the FSharp.Formattting docs would help most.

tpetricek commented 10 years ago

I'm always open to better solutions here - e.g. having documentation generation as an actual FAKE task would be nice.

That said, if we can at least document the current behavior as @fbmnds suggests, than that would save people a lot of pain! So I'll certainly happily merge any additions to the documentation!

fbmnds commented 10 years ago

@tpetricek w.r.t. better solutions, I suggest to depricate the commandline tool as the alternatives seem to be better (see extended doc). It might be a good idee to open an issue for discussion in order to get community response on this.

haf commented 10 years ago

Still not working, see https://github.com/SuaveIO/suave/pull/124 -- have you given the tool a run on mono to verify that it's usable?

fbmnds commented 10 years ago

FSharp.Formatting tests were OK on OS X.

Your commandline call does not show the correct quoting of the --parameters list compared to your last correct version here. Your stacktrace fits into this scenario where FCS bails out on parsing errors because of wrong substitutions. This does of course not exclude other reasons.

If you confirm the error despite having a clean tool install and a correct commandline, then you surely have to dig into the FCS error discussion, around here. In this case, I´m off, as I don´t participate there.

haf commented 10 years ago

@fbmnds I told you that that quoting is different from what you expect. If you want to get nitty-gritty about it, please see the source code that calls the process:

 @pid = Process.spawn(*[exe, *pars], { :out => write, :chdir => opts.get(:work_dir) })

As you can see, any data in pars is given as an array (splatted into the call).

Here's the docs for that method:

http://ruby-doc.org/core-1.9.3/Process.html#method-c-spawn

As you can see it completely bypasses shell. You are literally giving the operating system the array of parameters. So if the string is a single string in ruby, that means it's a single string in the argv array that the process receives.

Still though, to make sure I'm not tricking you in some way, let's change the rakefile to this:

  task :api_quick do
    # use templates e.g of Fake project at 'https://github.com/fsharp/FAKE/tree/master/help/templates'
    md = %w|page-description F#\ Suave
            page-author      Ademar\ Gonzalez,\ Henrik\ Feldt
            project-author   Ademar\ Gonzalez,\ Henrik\ Feldt
            github-link      https://github.com/SuaveIO/suave
            project-github   https://github.com/SuaveIO/suave
            project-nuget    https://www.nuget.org/packages/Suave
            root             http://suave.io
            project-name     Suave|

    args =
      %W|metadataFormat
        --generate
        --dllFiles #{File.join(FileUtils.pwd, 'Suave/bin/Release/suave.dll')}
        --outDir gh-pages/api
        --layoutRoots gh-pages/_fs_formatting/reference
        --sourceRepo https://github.com/SuaveIO/suave/tree/master/Suave
        --sourceFolder Suave
        --parameters|.concat(md).flatten

    puts 'Hello fbmnds, let\'s have a look at what we\'re sending, shall we?'
    puts ''
    puts 'Each line is a single argument passed as a single parameter to the executable:'
    puts ''
    args.each { |a| puts a }

    # transform parameter into one string, separated by blanks, embedded into double quotes
    # transform cmd into one string, separated by blanks
    system 'buildsupport/FSharp.Formatting.CommandTool/tools/fsformatting.exe', args, clr_command: true
  end

Now, the output is:

$ rake docs:api_quick
Hello fbmnds, let's have a look at what we're sending, shall we?

Each line is a single argument passed as a single parameter to the executable:

metadataFormat
--generate
--dllFiles
/Users/henfel/dev/_vendor/suave/Suave/bin/Release/suave.dll
--outDir
gh-pages/api
--layoutRoots
gh-pages/_fs_formatting/reference
--sourceRepo
https://github.com/SuaveIO/suave/tree/master/Suave
--sourceFolder
Suave
--parameters
page-description
F# Suave
page-author
Ademar Gonzalez, Henrik Feldt
project-author
Ademar Gonzalez, Henrik Feldt
github-link
https://github.com/SuaveIO/suave
project-github
https://github.com/SuaveIO/suave
project-nuget
https://www.nuget.org/packages/Suave
root
http://suave.io
project-name
Suave

I don't understand how you can continue talking about a clean tool install? Perhaps I'm being thick - I'm literally downloading the tool from nuget.org every time, so how can it not be a so called "clean install"?

W.r.t your mono test; it's off because you're testing export MONO_VERSION="3.2.5" which is a very outdated version. If you up your mono version to the latest version and then your tests pass you can claim with at least some credibility that it works on mono.

fbmnds commented 10 years ago

Thanks for your explanation of the string parsing issue. I take for confirmed that you feed in the parameter correctly. I also understand that you are absolutely certain that your installation is correct, i.e. neither mono nor the FCS are installed in parallel in different versions in a way that might cause side effects.

Hence, it can be ruled out that configuration issues around the commandline tool are the root cause for your problem which was my assumption from the beginning.

Apologies that I could not help here and may have even been misleading (despite the config errors that indeed came up, if you go through the threads).

tpetricek commented 10 years ago

I'm a bit lost regarding what's happening here.

But since we're running the tests for F# Formatting on Travis (on Mono), would it be possible to add a minimal test case showing where it fails as a unit test? I suppose that would mean invoking the command line via the usual .NET Process stuff, which is a bit painful, but at least we'd get easy to reproduce test (that does not have other dependencies)...

haf commented 10 years ago

You're not running them on the latest of version of mono; but on a version that doesn't even have .net 4.5 support. Can't you upgrade it?

haf commented 10 years ago

Also, may I suggest that you make use of our open source teamcity server, so that you can have a maintained mono version test run that's 'latest stable'? https://tc-oss.intelliplan.net/login.html

tpetricek commented 10 years ago

I see - I'd be happy to upgrade it!

I think there was some reason why were using old version (perhaps it was easier to install on Travis?) @enricosada helped with most of the Travis integration, so perhaps we could ask him for help again :-)?

But maybe we just need to increment the number in: https://github.com/tpetricek/FSharp.Formatting/blob/master/.travis.yml

haf commented 10 years ago

Let's see what that gets us first.

tpetricek commented 10 years ago

@haf If you send a PR adding the necessary config (if there is any) and a link to "how to" that I can follow, I'm more than happy to add TeamCity.

haf commented 10 years ago

@tpetricek start by adding an account and telling me the username, I'll make you project admin and then there's docs on how to set it up -- but in general it's 1) add VCS repo to github, 2) add command line build step where you call your build suite, 3) add git trigger on checkin, done.

tpetricek commented 10 years ago

I think I'm signed up - as tpetricek

haf commented 10 years ago

Ok, please fill out your details too =).

tpetricek commented 10 years ago

I added my name & email - is there anything else?

haf commented 10 years ago

I set it up for you https://tc-oss.intelliplan.net/project.html?projectId=FSharp&tab=projectOverview

haf commented 10 years ago

So no, nothing else really... Using it :) Fixing builds and writing unit tests. This mono version has the problems discussed in the threads.

haf commented 10 years ago

First build is done https://tc-oss.intelliplan.net/viewLog.html?buildId=297&buildTypeId=FSharp_TpetricekFSharpFormatting_Build&tab=buildLog

panesofglass commented 10 years ago

I see something similar yet different when trying to generate API docs for a PCL library:

System.InvalidOperationException: The entity 'System.Collections.Generic.IEnumerable`1, System.Runtime' does not exist o
r is in an unresolved assembly.
   at Microsoft.FSharp.Compiler.SourceCodeServices.Impl.checkEntityIsResolved(EntityRef entity) in C:\GitHub\fsharp\FSha
rp.Compiler.Service\src\fsharp\vs\Typed.fs:line 61
   at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpEntity.get_GenericParameters() in C:\GitHub\fsharp\FSharp.Compi
ler.Service\src\fsharp\vs\Typed.fs:line 152
   at FSharp.MetadataFormat.ValueReader.readMemberOrVal(ReadingContext ctx, FSharpMemberFunctionOrValue v) in c:\Tomas\P
ublic\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 332
   at FSharp.MetadataFormat.Reader.tryReadMember@520.Invoke(String cat, IDictionary`2 _arg1, Comment comment) in c:\Toma
s\Public\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 521
   at FSharp.MetadataFormat.Reader.readCommentsInto[a](ReadingContext ctx, String xmlDoc, FSharpFunc`2 f) in c:\Tomas\Pu
blic\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 506
   at FSharp.MetadataFormat.Reader.tryReadMember(ReadingContext ctx, MemberKind kind, FSharpMemberFunctionOrValue memb)
in c:\Tomas\Public\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 520
   at FSharp.MetadataFormat.Reader.readMembers@533.Invoke(FSharpMemberFunctionOrValue memb) in c:\Tomas\Public\FSharp.Fo
rmatting\src\FSharp.MetadataFormat\Main.fs:line 533
   at Microsoft.FSharp.Collections.IEnumerator.choose@163.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at FSharp.MetadataFormat.Reader.readModule@650.Invoke(String cat, IDictionary`2 cmd, Comment comment) in c:\Tomas\Pub
lic\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 655
   at FSharp.MetadataFormat.Reader.readCommentsInto[a](ReadingContext ctx, String xmlDoc, FSharpFunc`2 f) in c:\Tomas\Pu
blic\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 506
   at FSharp.MetadataFormat.Reader.readModule(ReadingContext ctx, FSharpEntity modul) in c:\Tomas\Public\FSharp.Formatti
ng\src\FSharp.MetadataFormat\Main.fs:line 650
   at FSharp.MetadataFormat.Reader.readModulesAndTypes@594.Invoke(ReadingContext ctx, FSharpEntity modul) in c:\Tomas\Pu
blic\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 594
   at Microsoft.FSharp.Collections.IEnumerator.choose@163.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at FSharp.MetadataFormat.Reader.readModulesAndTypes(ReadingContext ctx, IEnumerable`1 entities) in c:\Tomas\Public\FS
harp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 596
   at FSharp.MetadataFormat.Reader.readNamespace(ReadingContext ctx, String ns, IEnumerable`1 entities) in c:\Tomas\Publ
ic\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 671
   at FSharp.MetadataFormat.Reader.namespaces@695.Invoke(Tuple`2 tupledArg) in c:\Tomas\Public\FSharp.Formatting\src\FSh
arp.MetadataFormat\Main.fs:line 695
   at Microsoft.FSharp.Collections.IEnumerator.map@116.DoMoveNext(b& )
   at Microsoft.FSharp.Collections.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at FSharp.MetadataFormat.Reader.readAssembly(FSharpAssembly assembly, Boolean publicOnly, String xmlFile, FSharpOptio
n`1 sourceFolderRepo) in c:\Tomas\Public\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 690
   at <StartupCode$FSharp-MetadataFormat>.$Main.assemblies@800-2.GenerateNext(IEnumerable`1& next) in c:\Tomas\Public\FS
harp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 812
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at FSharp.MetadataFormat.MetadataFormat.Generate(FSharpList`1 dllFiles, String outDir, IEnumerable`1 layoutRoots, FSh
arpOption`1 parameters, FSharpOption`1 namespaceTemplate, FSharpOption`1 moduleTemplate, FSharpOption`1 typeTemplate, FS
harpOption`1 xmlFile, FSharpOption`1 sourceRepo, FSharpOption`1 sourceFolder, FSharpOption`1 publicOnly, FSharpOption`1
libDirs, FSharpOption`1 otherFlags) in c:\Tomas\Public\FSharp.Formatting\src\FSharp.MetadataFormat\Main.fs:line 800
   at <StartupCode$FSI_0002>.$FSI_0002.main@() in ...
Stopped due to error

At least, I think this is similar. If not, I'm happy to create a new case or, should someone be able to point me to docs, read up on what I'm missing / add docs once I or @t0yv0 discover what is amiss.

tpetricek commented 10 years ago

@panesofglass It might or might not be related - but opening a separate issue is probably a good idea. Also, ping @dsyme because he might know how F# compiler (compiler service) behave when loading PCLs.

haf commented 10 years ago

Have you had the time to browse the error you get on the build server? @tpetricek

haf commented 10 years ago

Relevant https://github.com/fsharp/fsharp/issues/317

haf commented 10 years ago

The build is still failing https://tc-oss.intelliplan.net/viewLog.html?buildId=702&tab=buildResultsDiv&buildTypeId=FSharp_TpetricekFSharpFormatting_Build

haf commented 9 years ago

@tpetricek do you know if F# Formatting works on mono with F# now?

tpetricek commented 9 years ago

I think we're waiting for final release of new RazorEngine, but the version from @matthid in PR #240 should work. Can we test this in your continuous build?