Coder Social home page Coder Social logo

Comments (12)

davedawkins avatar davedawkins commented on July 28, 2024 2

Fixed it. PR incoming

from fsharp.formatting.

davedawkins avatar davedawkins commented on July 28, 2024

For reference, BindHelpers is an internal module. Eg

[<AutoOpen>]
module Sutil.Bindings

///[omit]
[<AutoOpen>]
module BindHelpers =
    // ..

from fsharp.formatting.

nojaf avatar nojaf commented on July 28, 2024

Hello, I can't say I know anything about this. I found both exclude and omit in https://github.com/fsprojects/FSharp.Formatting/blob/94e833aa3d741e70b75f7d3d8f52da44d364f59c/src/FSharp.Formatting.ApiDocs/GenerateModel.fs so there definitely is something about it.
I'm afraid you would have to debug that code to really know what is up.

from fsharp.formatting.

davedawkins avatar davedawkins commented on July 28, 2024

Verified that it doesn't work in 17.2 either

% dotnet --version
7.0.101
% dotnet fsdocs --version
fsdocs 17.2.0

I have tried:

///<exclude>
/// <exclude>
///<exclude/>
/// <exclude/>
/// <exclude> </exclude>
/// <exclude value="true">true</exclude>

From your link:

        for e in doc.Elements(XName.Get "exclude") do
            cmds.["exclude"] <- e.Value

        for e in doc.Elements(XName.Get "omit") do
            cmds.["omit"] <- e.Value

My guess is that either:

  • exclude isn't being parsed into doc.Elements or
  • e.Value isn't set correctly for <exclude/> or
  • cmds ["exclude"] is being ignored somewhere

If you're a maintainer, could you point me at the code that assigns/parses/builds doc.Elements please?

from fsharp.formatting.

davedawkins avatar davedawkins commented on July 28, 2024

I'm writing a test for <exclude/> and [omit]

from fsharp.formatting.

nojaf avatar nojaf commented on July 28, 2024

I can't really say I know anything more than you do at this point.
I found a let doc = XDocument.Load(xmlFile) call in that same file, so interestingly enough it is grabbing the XML from a separate file and something embedded in the assembly, I guess.
Or not, I honestly don't know and won't be of much use here.
Good luck!

from fsharp.formatting.

davedawkins avatar davedawkins commented on July 28, 2024

OK :-) Well, I'm down the rabbit hole now - I'll keep at it. I don't have a lot of success with fsdocs.

from fsharp.formatting.

nojaf avatar nojaf commented on July 28, 2024

Thank you!

from fsharp.formatting.

davedawkins avatar davedawkins commented on July 28, 2024

OK, so part of the problem is that

/// A comment
/// <exclude/>

is parsed as

<summary>A comment&lt;exclude/&gt</summary>

This means a workaround is to explicitly tag the comment

/// <summary>
/// A comment
/// </summary>
/// <exclude/>

from fsharp.formatting.

davedawkins avatar davedawkins commented on July 28, 2024

Nested modules are still included though.

from fsharp.formatting.

davedawkins avatar davedawkins commented on July 28, 2024

PR submitted and passed checks

from fsharp.formatting.

nhirschey avatar nhirschey commented on July 28, 2024

Closed by #787

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.