Coder Social home page Coder Social logo

Comments (4)

tpetricek avatar tpetricek commented on June 9, 2024

There was a bug in the literate.fsx script, but that should be fixed by today's commit db21b8f.

If I merge that change with my current version and then run all the code in tools/build.fsx then it generates index.html which contains (colorized) snippet (with tooltips) as expected.

Can you add some details about the errors you're getting?

from fsharp.formatting.

nrolland avatar nrolland commented on June 9, 2024

The error I get upon runing the build.fsx is :

Generating 'index.html'

  • (1:0)-(2:0) (Error): Files in libraries or multiple-file applications must begin with a namespace or module declara
    tion, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'
  • (1:0)-(2:0) (Warning): The declarations in this file will be placed in an implicit module 'Index.html' based on the
    file name 'index.html.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other
    files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.

The commit db21b8f is contained in the error branch

from fsharp.formatting.

nrolland avatar nrolland commented on June 9, 2024

The HTML file is correctly generated though. my bad.

from fsharp.formatting.

tpetricek avatar tpetricek commented on June 9, 2024

The F# compiler sometimes reports errors and warnings that would be a problem when compiling a file, but do not really break anything when used in F# formatting - the two messages you're seeing are an example of that.

An easy fix for these two specific messages was to add module Foobar to the beginning of the generated *.fs file (so that the file starts with a module declaration), so I added that in 396af87.

from fsharp.formatting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.