Skip to content

ProjectScaffold Error on Linux Generating Documentation #323

Closed

Description

@Adron

Here's where I've run into the issue and made the original post: http://stackoverflow.com/questions/30992501/projectscaffold-error-on-linux-generating-documentation

I was able to run the document build based on Tomas' recommendations with this command:

fsharpi -d:HELP docs/tools/generate.fsx and fsharpi -d:REFERENCE docs/tools/generate.fsx

...and got the following error:

Processing the file 'docpage' failed
Source written to: '/tmp/tmp4a1e2cc4.tmp.cs'
Compilation errors:
 - error: (0, 0) Assembly `FakeLib, Version=3.35.2.0, Culture=neutral, PublicKeyToken=null' references `FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version number than imported assembly `FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

System.Exception: Generating HTML failed.
  at FSharp.Literate.RazorRender.handleCompile[String] (System.String source, Microsoft.FSharp.Core.FSharpFunc`2 f) [0x00000] in <filename unknown>:0 
  at FSharp.Literate.RazorRender.ProcessFileModel[IDictionary`2] (System.Type modelType, System.Object model, Microsoft.FSharp.Core.FSharpOption`1 properties) [0x00000] in <filename unknown>:0 
  at FSharp.Literate.Templating.generateFile (Microsoft.FSharp.Core.FSharpOption`1 references, System.String contentTag, IEnumerable`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 templateOpt, System.String output, IEnumerable`1 layoutRoots) [0x00000] in <filename unknown>:0 
  at FSharp.Literate.Templating.processFile (Microsoft.FSharp.Core.FSharpOption`1 references, FSharp.Literate.LiterateDocument doc, System.String output, FSharp.Literate.ProcessingContext ctx) [0x00000] in <filename unknown>:0 
  at FSharp.Literate.Literate.ProcessScriptFile (System.String input, Microsoft.FSharp.Core.FSharpOption`1 templateFile, Microsoft.FSharp.Core.FSharpOption`1 output, Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpOption`1 formatAgent, Microsoft.FSharp.Core.FSharpOption`1 prefix, Microsoft.FSharp.Core.FSharpOption`1 compilerOptions, Microsoft.FSharp.Core.FSharpOption`1 lineNumbers, Microsoft.FSharp.Core.FSharpOption`1 references, Microsoft.FSharp.Core.FSharpOption`1 fsiEvaluator, Microsoft.FSharp.Core.FSharpOption`1 replacements, Microsoft.FSharp.Core.FSharpOption`1 includeSource, Microsoft.FSharp.Core.FSharpOption`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 generateAnchors, Microsoft.FSharp.Core.FSharpOption`1 assemblyReferences, Microsoft.FSharp.Core.FSharpOption`1 customizeDocument) [0x00000] in <filename unknown>:0 
  at <StartupCode$FSharp-Literate>[email protected] (System.String file, System.String output) [0x00000] in <filename unknown>:0 
  at Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.String].InvokeFast[Unit] (Microsoft.FSharp.Core.FSharpFunc`2 func, System.String arg1, System.String arg2) [0x00000] in <filename unknown>:0 
  at <StartupCode$FSharp-Literate>.$Main.processDirectory@199 (Microsoft.FSharp.Core.FSharpOption`1 format, Boolean processRecursive, Microsoft.FSharp.Core.FSharpFunc`2 processScriptFile, Microsoft.FSharp.Core.FSharpFunc`2 processMarkdown, System.String indir, System.String outdir) [0x00000] in <filename unknown>:0 
  at FSharp.Literate.Literate.ProcessDirectory (System.String inputDirectory, Microsoft.FSharp.Core.FSharpOption`1 templateFile, Microsoft.FSharp.Core.FSharpOption`1 outputDirectory, Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpOption`1 formatAgent, Microsoft.FSharp.Core.FSharpOption`1 prefix, Microsoft.FSharp.Core.FSharpOption`1 compilerOptions, Microsoft.FSharp.Core.FSharpOption`1 lineNumbers, Microsoft.FSharp.Core.FSharpOption`1 references, Microsoft.FSharp.Core.FSharpOption`1 fsiEvaluator, Microsoft.FSharp.Core.FSharpOption`1 replacements, Microsoft.FSharp.Core.FSharpOption`1 includeSource, Microsoft.FSharp.Core.FSharpOption`1 layoutRoots, Microsoft.FSharp.Core.FSharpOption`1 generateAnchors, Microsoft.FSharp.Core.FSharpOption`1 assemblyReferences, Microsoft.FSharp.Core.FSharpOption`1 processRecursive, Microsoft.FSharp.Core.FSharpOption`1 customizeDocument) [0x00000] in <filename unknown>:0 
  at FSI_0003.buildDocumentation () [0x00000] in <filename unknown>:0 
  at <StartupCode$FSI_0003>.$FSI_0003.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

Activity

  1. tpetricek commented on Jun 25, 2015

    @tpetricek
    Member

    cc @matthid - have you ever seen this sort of error?

  2. Adron commented on Jun 26, 2015

    @Adron
    Author

    Another question I have regarding this, is how do I just disable the build of the docs during a full or all build anyway? Can I just take it out of some file or such? Just not sure how to surgically remove it at this point.

    Cheers,

  3. matthid commented on Jun 26, 2015

    @matthid
    Member

    Yes I have seen this error, and actually this was one of the reasons for the workaround removed with 87c1284 (especially (getItem "FSharp.Core").Replace("4.3.0.0", "4.3.1.0")).

    Do you use an older mono version? Can you try to update mono or add this workaround if you need to be compatible?

  4. tpetricek commented on Jun 26, 2015

    @tpetricek
    Member

    @Adron You can comment out the line that generates the docs (or API reference) at the end of your generate.fsx script: https://github.com/fsprojects/ProjectScaffold/blob/master/docs/tools/generate.template#L145

  5. Adron commented on Jun 27, 2015

    @Adron
    Author

    @tpetricek @matthid I'll give your suggestions a try and play around with the docs gen in the build and out of the build.

    @matthid - I should have the latest version of mono, but will check again to insure that I do. I'll get a list of the exact version I have and post it for reference.

  6. Adron commented on Jun 27, 2015

    @Adron
    Author

    Ok, I gave both suggestions a try. I did have the latest mono installed @matthid. I also tried the generate.fsx that @tpetricek suggested. That worked by just removing it, but it wasn't ideal since I'd like to have everything just working right.

    So here is were things got kind of interesting. I put everything back the way it was in the generate.fsx file and did a build. It broke, as I'd suspect with the error above. Then, by happenstance I noticed I needed to upgrade a number of things on Ubuntu 14.04 itself. So I clicked install and started downloading some 600+ MB of patches and updates. That finished, I had to reboot and the fs couldn't be mounted. So I went through a reboot, came into safe mode and let Ubuntu run a package rebuild for everything installed on the operating system. When that finished, I booted back up normally and launched Visual Studio Code and the bash to get back to work resolving this issue.

    That's when I did a build and everything passed perfectly. Moral of the story, it appears that Ubuntu 14.04 needs the latest patches as well as insuring the latest mono is installed. It seems there must have been some mono dependency that was necessary for docs generation. So, I'm going to mark this as closed, and self-post a solution to Stack Overflow. I REALLY appreciate the help from both of you, cheers!

  7. tpetricek commented on Jun 28, 2015

    @tpetricek
    Member

    Huh, that sounds pretty mysterious. Oh well, computers :-). Glad you got it to work in the end!

  8. jacqueline-homan commented on Jul 23, 2015

    @jacqueline-homan

    @Adron , @tpetricek : I am having problems with getting this error System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 Stopped due to error too. I tried applying Tomas's fix fsharpi -d:HELP docs/tools/generate.fsx and fsharpi -d:REFERENCE docs/tools/generate.fsx, but got a different error:

    screenshot from 2015-07-23 00 18 23

    So far, I have not able to get this fixed. I know fsharpi and Monodvelop's latest version is installed on my system, so I'm at a loss as to what to do.

  9. tpetricek commented on Jul 23, 2015

    @tpetricek
    Member

    @jacqueline-homan Do you have a more detailed log for the first error you were getting?

    As for the second one, is the file docs/tools/generate.fsx actually in your current folder? (Either it isn't there, or something is going wrong when F# searches for the file...)

  10. jacqueline-homan commented on Jul 23, 2015

    @jacqueline-homan

    @tpetricek , Actually I was trying to work through a tutorial on Maps where you had to send the code to F# interactive. So the first error occurred there in the F# interactive in Monodevelop and I don't have a detailed log file for it. But here is the output in the F# interactive:
    `>
    F# Interactive for F# 3.1 (Open Source Edition)
    Freely distributed under the Apache 2.0 Open Source License
    For help type #help;;

    System.IO.DirectoryNotFoundException: Directory '/home/jacqueline/Documents/bashrc' not found.
    at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in :0
    at System.IO.Directory+c__Iterator0.MoveNext () [0x00000] in :0
    at Microsoft.FSharp.Collections.IEnumerator+map@107[System.Collections.Generic.IEnumerable1[System.String],System.String].DoMoveNext (IEnumerable1& ) [0x00000] in :0
    at Microsoft.FSharp.Collections.IEnumerator+MapEnumerator1[System.Collections.Generic.IEnumerable1[System.String]].System-Collections-IEnumerator-MoveNext () [0x00000] in :0
    at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@667[String,IEnumerable1](Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator2 x, Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in :0
    at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@660[String,IEnumerable1](Microsoft.FSharp.Core.CompilerServices.ConcatEnumerator2 x, Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in :0
    at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers+ConcatEnumerator2[System.String,System.Collections.Generic.IEnumerable1[System.String]].System-Collections-IEnumerator-MoveNext () [0x00000] in :0
    at Microsoft.FSharp.Collections.SetTreeModule.mkFromEnumerator[String](IComparer1 comparer, Microsoft.FSharp.Collections.SetTree1 acc, IEnumerator1 e) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Collections.SetTreeModule.ofSeq[String](IComparer1 comparer, IEnumerable1 c) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Collections.FSharpSet1[System.String]..ctor (IEnumerable`1 elements) [0x00000] in :0
    at FSI_0002.dirUniqueWords (System.String dirName) [0x00000] in :0
    at <StartupCode$FSI_0002>.$FSI_0002.main@ () [0x00000] in :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 :0
    Stopped due to error

    `

    When I was researching to try to find the solution for fixing it, I came across this thread and followed what @Adron did, but then got the error I got in my screencap above. I ran the command locate docs/tools/generate.fsx in my terminal and no results came back. So that means it's not anywhere in my machine.

  11. Adron commented on Jul 24, 2015

    @Adron
    Author

    Hmmm. I'd almost say clone the repo and run the ./build.sh @jacqueline-homan again. The file should be available. Also remember no dashes or anything besides characters in the project name. I keep doing that to myself. :(

    👍

  12. matthid commented on Jan 14, 2016

    @matthid
    Member

    Closing due to inactivity and because the initial issue was solved as far as I can see. Please open a new one if this is still a problem.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions