Giter VIP home page Giter VIP logo

Comments (7)

nojaf avatar nojaf commented on June 25, 2024 1

If you were running with the dotnet 8 preview SDK I had some environment variables in mind you could give a try. But as you are sticking to the stable 6 SDK I have no immediate idea what you could try.

I would work around it for now. But we should keep this ticket open and provide a better DX when project cracking fails.

from fsharp.formatting.

nojaf avatar nojaf commented on June 25, 2024

Hi there, does it get picked up when you specify it explicitly via --projects?

The help text says Project files to build API docs for outputs, defaults to all packable projects..
Just checking, but is it packable?

from fsharp.formatting.

kMutagene avatar kMutagene commented on June 25, 2024

Just checking, but is it packable?

Does this have to be set explicitly? I do not set anything in that regard on the F# projects. i am publishing all libraries (including the C# library) as nuget packages via dotnet pack so i would expect it to be packable right?

does it get picked up when you specify it explicitly via --projects?

I have not tried it now, but remember it not working when i tried last time. Will try it again later and report back

--projects | Project files to build API docs for outputs, defaults to all packable projects

How are multiple projects expected to be passed here? comma-separated full paths? one directory containing all projects?

from fsharp.formatting.

nojaf avatar nojaf commented on June 25, 2024

How are multiple projects expected to be passed here?

Hmm, I'm not quite sure, you could try:

  • --projects A.fsproj B.csproj
  • --projects A.fsproj --projects B.csproj

I don't think it will be comma-separated, it really will depend on how https://github.com/commandlineparser/commandline does the argument parsing.

full paths?

Yeah, definitely try full paths when relative ones don't work.

one directory containing all projects?

No, it does expect actual projects, not directories.

from fsharp.formatting.

kMutagene avatar kMutagene commented on June 25, 2024

So this is really weird. If i run this fake build task:

let watchDocs =
    BuildTask.create "WatchDocs" [ build ] {
        printfn "watching docs with stable version %s" stableDocsVersionTag

        runDotNet
            "fsdocs watch --eval --clean --properties Configuration=Release --projects <absolute project paths here>
            "./"
    }

which basically only runs

dotnet fsdocs watch --eval --clean --properties Configuration=Release --projects <absolute project paths here>

i get this error (for ALL, F# and C#) projects:

skipping project 'Plotly.NET.fsproj' because an error occurred while cracking it: System.Exception: project 'C:\Users\epos\plotly\Plotly.NET\src\Plotly.NET\Plotly.NET.fsproj' not restored
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1448.Invoke(String message)
   at fsdocs.Crack.crackProjectFile[a](a slnDir, FSharpList`1 extraMsbuildProperties, String file) in /home/runner/work/FSharp.Formatting/FSharp.Formatting/src/fsdocs-tool/ProjectCracker.fs:line 346
   at [email protected](String p) in /home/runner/work/FSharp.Formatting/FSharp.Formatting/src/fsdocs-tool/ProjectCracker.fs:line 453
skipping project 'Plotly.NET.CSharp.csproj' because an error occurred while cracking it: System.Exception: project 'C:epos\plotly\Plotly.NET\src\Plotly.NET.CSharp\Plotly.NET.CSharp.csproj' not restored
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1448.Invoke(String message)
   at fsdocs.Crack.crackProjectFile[a](a slnDir, FSharpList`1 extraMsbuildProperties, String file) in /home/runner/work/FSharp.Formatting/FSharp.Formatting/src/fsdocs-tool/ProjectCracker.fs:line 346
   at [email protected](String p) in /home/runner/work/FSharp.Formatting/FSharp.Formatting/src/fsdocs-tool/ProjectCracker.fs:line 453

if i run the same command from the command line, everything works out.

from fsharp.formatting.

nojaf avatar nojaf commented on June 25, 2024

Euhm, yeah this is some fun stuff. Project cracking fails and who knows what FAKE is doing to influence it.
What OS and dotnet SDK version are you using?

from fsharp.formatting.

kMutagene avatar kMutagene commented on June 25, 2024

What OS and dotnet SDK version are you using?

Win 11 Pro Version 10.0.22621 Build 22621
and .NET 6.0.416

But it seems like the workaround of just building with fake and then calling the tool manually with --projects will work for me for now. as you said, diagnosing what fake is actually influencing here might be quite hard (and even a local problem maybe?)

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.