Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
haf opened this issue Jun 6, 2014 · 60 comments
Closed

Comments

@haf
Copy link
Member

haf commented Jun 6, 2014

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
Copy link
Member Author

haf commented Jun 6, 2014

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
Copy link
Member Author

haf commented Jun 6, 2014

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 [email protected] (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 [email protected] (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 [email protected] (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 [email protected] (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 [email protected] (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 [email protected] (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 [email protected] (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 [email protected] (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 [email protected] (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>[email protected] (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?

@haf haf changed the title CommandLine tool doesn't find dll CommandLine tool doesn't find dll, FAKE tool fails with InvalidOperationException Jun 6, 2014
@tpetricek
Copy link
Member

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
Copy link
Member Author

haf commented Jun 6, 2014

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
Copy link
Member Author

haf commented Jun 6, 2014

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
Copy link
Member Author

haf commented Jun 6, 2014

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

@haf
Copy link
Member Author

haf commented Jun 6, 2014

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

@haf
Copy link
Member Author

haf commented Jun 6, 2014

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
Copy link
Member

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
Copy link
Member Author

haf commented Jun 20, 2014

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
Copy link
Member

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
Copy link
Member Author

haf commented Jun 24, 2014

screen shot 2014-06-24 at 10 29 03

screen shot 2014-06-24 at 10 29 21

@haf
Copy link
Member Author

haf commented Jun 24, 2014

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
Copy link
Member Author

haf commented Jul 5, 2014

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
Copy link

fbmnds commented Jul 24, 2014

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
Copy link

fbmnds commented Jul 25, 2014

@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
Copy link
Contributor

ademar commented Jul 27, 2014

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
Copy link

fbmnds commented Jul 27, 2014

@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
Copy link
Contributor

ademar commented Jul 27, 2014

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
Copy link

fbmnds commented Jul 28, 2014

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

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

  • configure all paths in a platform agnostic way (e.g. using system variables or build conditionals)
  • configure --sourceFolder and --sourceRepo, if you want to provide Github links in your API documentation
  • configure --parameter according to the substitution parameters of your templates as specified via --layoutRoot
  • configure your output directory via --outDir according your intentions for organising the documentation content (note - w.r.t. a post in this thread: do not to copy dll files into this directory, unless you have a specific use for them by your own means)

@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
Copy link
Member Author

haf commented Jul 28, 2014

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

@fbmnds
Copy link

fbmnds commented Jul 28, 2014

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
Copy link
Member Author

haf commented Jul 28, 2014

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 [email protected] 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
Copy link

fbmnds commented Jul 28, 2014

Be assured that this kind of reflection happens:

  • thinking about "correct" default flag settings leads to thinking about "correct" default behavior of the FSharp.Formatting library functions. There is more a question of judgement and personal preferences than an objective topic. Note, that the commandline tool, which is not more than a wrapper of the library functiCreateDocsForDllsons, does not bring in interpretations of its own.
  • the path evaluation is not under control of the tool but depends heavily on the platform´s notions of working directory, current directory and home directory (e.g. on Windows/cmd, the paths seem to be relative to %APPDATA%/Local to my surprise). I don´t see, how this could be uniformly governed from within the tool - suggestions are welcome. It seems to be best kept under full control of the user by explicit configuration. This configuration should contain one single setting of the root source directory (project-speciic, not general as in the draft Rakefile).

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

  • using the commandline tool from within Fake. FSharp.Formatting is bypassing the DSL, btw.
  • bakend in policies in Fake DSL,in this case in the Fake lib call CreateDocsForDlls. Here, you have a hidden dependency on the project information because of the used template references.
  • using naked stack traces in user communication which is in my opinion a side effect of an unsufficient exception handling mechanism. I´d suggest to use a ROP based approach.

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
Copy link
Member

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
Copy link

fbmnds commented Aug 8, 2014

@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
Copy link
Member Author

haf commented Aug 11, 2014

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
Copy link
Member

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
Copy link
Member Author

haf commented Aug 11, 2014

Let's see what that gets us first.

@tpetricek
Copy link
Member

@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
Copy link
Member Author

haf commented Aug 11, 2014

@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
Copy link
Member

I think I'm signed up - as tpetricek

@haf
Copy link
Member Author

haf commented Aug 11, 2014

Ok, please fill out your details too =).

@tpetricek
Copy link
Member

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

@haf
Copy link
Member Author

haf commented Aug 11, 2014

@haf
Copy link
Member Author

haf commented Aug 11, 2014

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

@haf
Copy link
Member Author

haf commented Aug 11, 2014

@panesofglass
Copy link

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 [email protected](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 [email protected](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 [email protected](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 [email protected](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 [email protected](Tuple`2 tupledArg) in c:\Tomas\Public\FSharp.Formatting\src\FSh
arp.MetadataFormat\Main.fs:line 695
   at [email protected](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>[email protected](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
Copy link
Member

@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
Copy link
Member Author

haf commented Aug 20, 2014

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

@haf
Copy link
Member Author

haf commented Aug 25, 2014

Relevant fsharp/fsharp#317

@haf
Copy link
Member Author

haf commented Sep 13, 2014

@haf
Copy link
Member Author

haf commented Jan 8, 2015

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

@tpetricek
Copy link
Member

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?

@tpetricek
Copy link
Member

I was successfully able to use the most recent version on mono (with the improvements from @matthid).

@haf Could you try the most recent version again?

@forki
Copy link
Member

forki commented Apr 20, 2015

Is there a tl;dr?. What should I do?

@haf
Copy link
Member Author

haf commented Apr 20, 2015

@tpetricek WIP SuaveIO/suave#225 and discussion: SuaveIO/suave#223 -- currently too swamped to try it, but if you checkout that branch, you should be able to run it right off the bat.

@tpetricek
Copy link
Member

@forki - I don't think you need to do anything here :-). Not sure how you got mentioned in this thread...?

@haf - Cool. I posted some comments on that PR.

@matthid
Copy link
Member

matthid commented Sep 20, 2015

I think we should either remove the command line tool (is anyone using that?) or add some tests for it.

@haf
Copy link
Member Author

haf commented Nov 21, 2015

@matthid We want to use it; we are not using FAKE.

@haf
Copy link
Member Author

haf commented Dec 19, 2015

Are there any docs for how to pass parameters to CommandTool besides reading source or the help output that doesn't tell you what's wrong?

@haf
Copy link
Member Author

haf commented Dec 19, 2015

Ignore last comment; found docs had been improved a lot! https://tpetricek.github.io/FSharp.Formatting/commandline.html

@haf
Copy link
Member Author

haf commented Dec 19, 2015

I think this issue is solved by now :) Thanks for fixing it!

@haf haf closed this as completed Dec 19, 2015
@64J0
Copy link

64J0 commented Sep 30, 2022

Hello people, I'm getting this error:

System.Exception: Unknown project name. Provide 'properties' parameter with 'project-name' key.
   at FSharp.MetadataFormat.MetadataFormat.Generate(IEnumerable`1 dllFiles, FSharpOption`1 parameters, FSharpOption`1 xmlFile, FSharpOption`1 sourceRepo, FSharpOption`1 sourceFolder, FSharpOption`1 publicOnly, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 markDownComments, FSharpOption`1 urlRangeHighlight) in /app/src/FSharp.MetadataFormat/Main.fs:line 1616
   at FSI_0019.Apirefloader.loader(String projectRoot, SiteContents siteContet)

But I'm not sure how to interpret it. How would you guys start debugging this?

I'm working in this PR:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants