Skip to content

Can't generate docs on Linux or OSX #65

Open

Description

@GabrieleCocco

From a clear clone on OSX 10.9.3 + Mono 3.4.0, after having setup the project info through build.sh, I run build.sh ReleaseDoc and I get the following error:

fsharpi --define:RELEASE generate.fsx

/Users/gabriele/Projects/ProjectScaffold/docs/tools/generate.fsx(29,1): error FS0078: Unable to find the file 'NuGet.Core.dll' in any of
/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5
/Users/gabriele/Projects/ProjectScaffold/docs/tools/../../packages/FSharp.Formatting.2.4.1/lib/net40
/Users/gabriele/Projects/ProjectScaffold/docs/tools/../../packages/RazorEngine.3.3.0/lib/net40
/Users/gabriele/Projects/ProjectScaffold/docs/tools/../../packages/FSharp.Compiler.Service.0.0.36/lib/net40
/Users/gabriele/Projects/ProjectScaffold/docs/tools
/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.0/

Activity

  1. GabrieleCocco commented on Jul 18, 2014

    @GabrieleCocco
    Author

    I tried to fix the issue copying the suggested dll from within packages/FAKE/tools to docs/tools (simply cause the trace above says this folder is among the inspected ones).
    Doing this fixes the missing dll problem, but raises another one (please note I did not touch any src file, just did build.sh the first time to setup NeGet and repo info):

    fsharpi --define:RELEASE generate.fsx
    Copying file: /Users/gabriele/Projects/ProjectScaffold/docs/output/img/logo.png
    Copying styles and scripts: /Users/gabriele/Projects/ProjectScaffold/docs/output/content/style.css
    Copying styles and scripts: /Users/gabriele/Projects/ProjectScaffold/docs/output/content/tips.js
    Generating 'index.html'
    System.Exception: Generating HTML failed.
    at FSharp.Literate.RazorRender.ProcessFile[IDictionary2](System.String source, Microsoft.FSharp.Core.FSharpOption1 properties) [0x00000] in :0
    at FSharp.Literate.Templating.generateFile (System.String contentTag, IEnumerable1 parameters, Microsoft.FSharp.Core.FSharpOption1 templateOpt, System.String output, IEnumerable1 layoutRoots) [0x00000] in <filename unknown>:0 at FSharp.Literate.Templating.processFile (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.FSharpOption1 templateFile, Microsoft.FSharp.Core.FSharpOption1 output, Microsoft.FSharp.Core.FSharpOption1 format, Microsoft.FSharp.Core.FSharpOption1 formatAgent, Microsoft.FSharp.Core.FSharpOption1 prefix, Microsoft.FSharp.Core.FSharpOption1 compilerOptions, Microsoft.FSharp.Core.FSharpOption1 lineNumbers, Microsoft.FSharp.Core.FSharpOption1 references, Microsoft.FSharp.Core.FSharpOption1 fsiEvaluator, Microsoft.FSharp.Core.FSharpOption1 replacements, Microsoft.FSharp.Core.FSharpOption1 includeSource, Microsoft.FSharp.Core.FSharpOption1 layoutRoots) [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.FSharpFunc2[System.String,System.String].InvokeFast[Unit](Microsoft.FSharp.Core.FSharpFunc2 func, System.String arg1, System.String arg2) [0x00000] in <filename unknown>:0 at <StartupCode$FSharp-Literate>.$Main.processDirectory@165 (Microsoft.FSharp.Core.FSharpOption1 format, Microsoft.FSharp.Core.FSharpFunc2 processScriptFile, Microsoft.FSharp.Core.FSharpFunc2 processMarkdown, System.String indir, System.String outdir) [0x00000] in :0
    at FSharp.Literate.Literate.ProcessDirectory (System.String inputDirectory, Microsoft.FSharp.Core.FSharpOption1 templateFile, Microsoft.FSharp.Core.FSharpOption1 outputDirectory, Microsoft.FSharp.Core.FSharpOption1 format, Microsoft.FSharp.Core.FSharpOption1 formatAgent, Microsoft.FSharp.Core.FSharpOption1 prefix, Microsoft.FSharp.Core.FSharpOption1 compilerOptions, Microsoft.FSharp.Core.FSharpOption1 lineNumbers, Microsoft.FSharp.Core.FSharpOption1 references, Microsoft.FSharp.Core.FSharpOption1 fsiEvaluator, Microsoft.FSharp.Core.FSharpOption1 replacements, Microsoft.FSharp.Core.FSharpOption1 includeSource, Microsoft.FSharp.Core.FSharpOption1 layoutRoots) [0x00000] in :0
    at FSI_0002.buildDocumentation () [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

  2. fsgit commented on Jul 18, 2014

    @fsgit
    Contributor

    Should be fixed by this direct commit: ccdd395

  3. reopened this on Jul 18, 2014
  4. fsgit commented on Jul 18, 2014

    @fsgit
    Contributor

    Reopened and renamed because of the problem with generating docs

  5. changed the title [-]Unable to find NuGet.Core.dll[/-] [+]Can't generate docs on Linux or OSX[/+] on Jul 18, 2014
  6. caindy commented on Jul 31, 2014

    @caindy
    Contributor

    The generated file is:

    // ------------------------------------------------------------------------------
    //  <autogenerated>
    //      This code was generated by a tool.
    //      Mono Runtime Version: 4.0.30319.17020
    // 
    //      Changes to this file may cause incorrect behavior and will be lost if 
    //      the code is regenerated.
    //  </autogenerated>
    // ------------------------------------------------------------------------------
    
    namespace CompiledRazorTemplates.Dynamic {
        using System;
        using System.Collections.Generic;
        using System.Linq;
    
    
        public class bdfebedcbe : FSharp.Literate.DocPageTemplateBase<System.Object> {
    
    #line hidden
    
            public bdfebedcbe() {
            }
    
            public override void Execute() {
    
      Layout = "template";
      Title = Properties["page-title"];
      Description = Properties["project-summary"];
    
    WriteLiteral("\r\n");
    
    Write(Properties["document"]);
    
    WriteLiteral("\r\n");
    
    Write(Properties["tooltips"]);
    
            }
        }
    }
  7. caindy commented on Jul 31, 2014

    @caindy
    Contributor

    FWIW, neither the output above nor the output listed in #68 contain any specific parsing errors from the error handling code in FSharp.Formatting

  8. dsyme commented on Aug 1, 2014

    @dsyme
    Contributor

    @tpetricek - It would be great if the scaffolding (or FSharp.Formatting) could drop the dependency on Razor. Is Razor really doing anything particularly complicated here? Could we have a fully cross-platform F#-only FSharp.Formatting?

  9. forki commented on Aug 1, 2014

    @forki
    Member

    It's not that complicated, but we would need a good OSS templating tool.
    Ideally it would be a separate project and pluggable into asp.NET as well.
    I read about ideas of a Fazor project but didn't see it happen. Maybe you
    can ask on Twitter.
    On Aug 1, 2014 1:28 PM, "Don Syme" [email protected] wrote:

    @tpetricek https://github.com/tpetricek - It would be great if the
    scaffolding (or FSharp.Formatting) could drop the dependency on Razor. Is
    Razor really doing anything particularly complicated here? Could we have a
    fully cross-platform F#-only FSharp.Formatting?

    —
    Reply to this email directly or view it on GitHub
    #65 (comment)
    .

  10. tpetricek commented on Aug 6, 2014

    @tpetricek
    Member

    I think @7sharp9 knows some things about fixing the Razor engine on Mono.

    I'd love to drop it too. We just need some pretty basic OSS templating tool instead. I would welcome any pull requests to F# Formatting that replace Razor - either with another dependency or even with a simple templating tool written in F# instead.

    Though it should probably not be completely basic - the templates currently do some non-trivial things. We could move the grouping into the F# code itself, but it still needs some composition, looping and if statements.

  11. 7sharp9 commented on Aug 6, 2014

    @7sharp9
    Member

    I made a PR that fixed Razor, not sure if it made it to a nuget release of Razor though. It was some time ago ...

  12. dahlbyk commented on Aug 6, 2014

    @dahlbyk

    I started implementing F# support in Razor years ago, but I'm sure Razor has changed substantially since then.

  13. bentayloruk commented on Aug 6, 2014

    @bentayloruk

    DotLiquid might be a good candidate. It is a .NET implementation of Liquid, which is the default template engine for Jekyll (used on Github pages). I've not tried it on Mono.

  14. 7sharp9 commented on Aug 6, 2014

    @7sharp9
    Member

    Incidentally, my fix was here in the RazorEngine: Antaris/RazorEngine@2098fb0

    When I built all from source I could use formatting fine, some of the fsx scripts were troublesome though. Ive never built the scaffolding, so it might not be relevant ...

  15. tpetricek commented on Aug 6, 2014

    @tpetricek
    Member

    The other problem with Razor is that the newer versions require .NET 4.5, while F# Formatting can work fine with just .NET 4.0. So updating to newer version of Razor also means updating to .NET 4.5 (might not be a big deal though). F# support for Razor sounds nice, but it probably does not fix the problem here.

    @7sharp9 Thanks for the clarification! We could try updating the package.

  16. 7sharp9 commented on Aug 6, 2014

    @7sharp9
    Member

    I was going to start using ProjectScaffold soon, as it doesn't work out of the box on osx its dissapointing :-(

  17. 7sharp9 commented on Aug 6, 2014

    @7sharp9
    Member

    @tpetricek I rebuilt everything from scratch so I probably made everything .Net 4.5, I cant actually remember now.

  18. tpetricek commented on Aug 6, 2014

    @tpetricek
    Member

    @7sharp9 It is disappointing indeed! That's why we need help from some mono experts ;-)

  19. pblasucci commented on Aug 6, 2014

    @pblasucci
    Collaborator

    @7sharp9 Are you having a different issue than the one at the start of this thread? If so, please create an new issue. I'm in the process of moving my primary dev stack over to OS X. So I intend to tackle this issue (maybe a few others) in the very near future.

  20. 7sharp9 commented on Aug 6, 2014

    @7sharp9
    Member

    @pblasucci I had issues with Razor ages ago, thats what @tpetricek was referring to.

    I have the same issue thats described here just checked.

  21. icorderi commented on Aug 22, 2014

    @icorderi

    Any updates on this?
    Where should we put some effort together to get this working?

  22. tpetricek commented on Aug 22, 2014

    @tpetricek
    Member

    The best way to get this started would be to start a discussion on the F# Formatting project page: http://github.com/tpetricek/FSharp.Formatting/

    I think writing a custom system might be more work than one would expect, but if there is something we could use instead of Razor, that would be fantastic...

  23. icorderi commented on Aug 23, 2014

    @icorderi

    Ok, created Issue #188 over at FSharp.Formatting.

  24. matthid commented on Jan 20, 2015

    @matthid
    Member

    Please try with #135.

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