Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running fsdocs on .NET 5.0.100 SDK #620

Closed
vilinski opened this issue Nov 22, 2020 · 7 comments
Closed

Error running fsdocs on .NET 5.0.100 SDK #620

vilinski opened this issue Nov 22, 2020 · 7 comments

Comments

@vilinski
Copy link

vilinski commented Nov 22, 2020

Environment

MacOS Big Sur with .net 5

$dotnet --version
5.0.100

Reproducing

Expectations

Builds API reference automagically, like it described in the docs

Actual

It outputs some exceptions and generates no htmls in the output folder

  1. At first there is not helpful System.IO.DirectoryNotFoundException because repository has no docs folder. Could be a simple warning like Docs are not generated, because no docs folder found
  2. I have created it manually but second error is also where I'm completely lost.
    FSharp.Compiler.ErrorLogger+UnresolvedPathReferenceNoRange: Exception of type 'FSharp.Compiler.ErrorLogger+UnresolvedPathReferenceNoRange' was thrown.
    
    What's wrong and how could it be fixed?
restored project state from '.fsdocs/cache'

Inputs for API Docs:
    /Users/avilinski/Projects/fsharp/github/NBomber.FSharp/src/NBomber.FSharp/bin/Debug/netstandard2.0/NBomber.FSharp.dll
    /Users/avilinski/Projects/fsharp/github/NBomber.FSharp/src/NBomber.FSharp.Hopac/bin/Debug/netstandard2.0/NBomber.FSharp.Hopac.dll
    /Users/avilinski/Projects/fsharp/github/NBomber.FSharp/src/NBomber.FSharp.Http/bin/Debug/netstandard2.0/NBomber.FSharp.Http.dll

Substitutions/parameters:
  root --> https://github.com/PragmaticFlow/NBomber.FSharp/
  fsdocs-authors --> PragmaticFlow
  fsdocs-collection-name --> NBomber.FSharp
  fsdocs-collection-name-link --> https://github.com/PragmaticFlow/NBomber.FSharp/
  fsdocs-copyright --> PragmaticFlow@2020
  fsdocs-logo-src --> https://github.com/PragmaticFlow/NBomber.FSharp/img/logo.png
  fsdocs-navbar-position --> fixed-right
  fsdocs-theme --> default
  fsdocs-logo-link --> https://github.com/PragmaticFlow/NBomber.FSharp/
  fsdocs-license-link --> https://github.com/PragmaticFlow/NBomber.FSharp/blob/master/LICENSE.md
  fsdocs-release-notes-link --> https://github.com/PragmaticFlow/NBomber.FSharp/blob/master/RELEASE_NOTES.md
  fsdocs-package-project-url --> https://github.com/PragmaticFlow/NBomber.FSharp/
  fsdocs-package-license-expression --> Apache-2.0
  fsdocs-package-icon-url --> {{fsdocs-package-icon-url}}
  fsdocs-package-tags --> load-testing, performance-testing, integration-testing, fsharp
  fsdocs-package-version --> 1.0.0-alpha
  fsdocs-repository-link --> https://github.com/PragmaticFlow/NBomber.FSharp/
  fsdocs-repository-branch --> {{fsdocs-repository-branch}}
  fsdocs-repository-commit --> {{fsdocs-repository-commit}}
  (NBomber.FSharp.Hopac) fsdocs-package-tags --> load-testing, performance-testing, integration-testing, fsharp, hopac
  (NBomber.FSharp.Http) fsdocs-package-tags --> load-testing, performance-testing, integration-testing, fsharp, http
using extra content from /Users/avilinski/.dotnet/tools/.store/fsharp.formatting.commandtool/7.2.9/fsharp.formatting.commandtool/7.2.9/extras

Content:
Error :
System.IO.DirectoryNotFoundException: Could not find a part of the path '/Users/avilinski/Projects/fsharp/github/NBomber.FSharp/docs'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at <StartupCode$fsdocs>.$BuildCommand.clo@562-20.GenerateNext(IEnumerable`1& next) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 573
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 371
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 403
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at <StartupCode$fsdocs>.$BuildCommand.Convert@595.GenerateNext(IEnumerable`1& next) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 595
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 371
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 403
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at <StartupCode$fsdocs>.$BuildCommand.runDocContentPhase1@894-1.Invoke(Unit unitVar0) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 906
   at <StartupCode$fsdocs>.$BuildCommand.protect@710(CoreBuildOptions this, FSharpFunc`2 f) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 713
note, no template file 'docs/reference/_template.html' or 'docs/_template.html', using default template /Users/avilinski/.dotnet/tools/.store/fsharp.formatting.commandtool/7.2.9/fsharp.formatting.commandtool/7.2.9/templates/_template.html

API docs:
  generating model for 3 assemblies in API docs...
  loading 3 assemblies...
  registering entities for assembly NBomber.FSharp...
Error :
FSharp.Compiler.ErrorLogger+UnresolvedPathReferenceNoRange: Exception of type 'FSharp.Compiler.ErrorLogger+UnresolvedPathReferenceNoRange' was thrown.
   at FSharp.Compiler.TypedTree.CcuThunk.EnsureDerefable(String[] requiringPath) in /Users/chethusk/oss/FCS/src/fsharp/TypedTree.fs:line 5087
   at FSharp.Compiler.TypedTree.NonLocalEntityRef.TryDeref(Boolean canError) in /Users/chethusk/oss/FCS/src/fsharp/TypedTree.fs:line 3157
   at FSharp.Compiler.TypedTree.EntityRef.Resolve(Boolean canError) in /Users/chethusk/oss/FCS/src/fsharp/TypedTree.fs:line 3238
   at FSharp.Compiler.TypedTree.EntityRef.get_Deref() in /Users/chethusk/oss/FCS/src/fsharp/TypedTree.fs:line 3251
   at FSharp.Compiler.TypedTreeOps.stripTyEqnsA(TcGlobals g, Boolean canShortcut, TType ty) in /Users/chethusk/oss/FCS/src/fsharp/TypedTreeOps.fs:line 740
   at FSharp.Compiler.TypedTreeOps.isUnitTy(TcGlobals g, TType ty) in /Users/chethusk/oss/FCS/src/fsharp/TypedTreeOps.fs:line 1655
   at FSharp.Compiler.TypedTreeOps.GetTopValTypeInCompiledForm(TcGlobals g, ValReprInfo topValInfo, Int32 numEnclosingTypars, TType ty, range m) in /Users/chethusk/oss/FCS/src/fsharp/TypedTreeOps.fs:line 2313
   at FSharp.Compiler.TypedTreeOps.XmlDocSigOfVal(TcGlobals g, Boolean full, String path, Val v) in /Users/chethusk/oss/FCS/src/fsharp/TypedTreeOps.fs:line 8036
   at FSharp.Compiler.SourceCodeServices.SymbolHelpers.GetXmlDocSigOfScopedValRef(TcGlobals g, EntityRef tcref, ValRef vref) in /Users/chethusk/oss/FCS/src/fsharp/symbols/SymbolHelpers.fs:line 541
   at FSharp.Compiler.SourceCodeServices.FSharpMemberOrFunctionOrValue.get_XmlDocSig() in /Users/chethusk/oss/FCS/src/fsharp/symbols/Symbols.fs:line 1818
   at FSharp.Formatting.ApiDocs.CrossReferences.getXmlDocSigForMember(FSharpMemberOrFunctionOrValue memb) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.ApiDocs\GenerateModel.fs:line 575
   at FSharp.Formatting.ApiDocs.CrossReferenceResolver.registerMember(FSharpMemberOrFunctionOrValue memb) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.ApiDocs\GenerateModel.fs:line 649
   at FSharp.Formatting.ApiDocs.CrossReferenceResolver.registerEntity(FSharpEntity entity) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.ApiDocs\GenerateModel.fs:line 669
   at <StartupCode$FSharp-Formatting-ApiDocs>.$GenerateModel.assemblies@2149.Invoke(FSharpEntity arg00) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.ApiDocs\GenerateModel.fs:line 2149
   at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc`2 action, IEnumerable`1 source) in E:\A\_work\130\s\src\fsharp\FSharp.Core\seq.fs:line 495
   at FSharp.Formatting.ApiDocs.ApiDocModel.Generate(FSharpList`1 projects, String collectionName, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, Boolean qualify, FSharpOption`1 urlRangeHighlight, String root, FSharpList`1 substitutions, Boolean strict) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.ApiDocs\GenerateModel.fs:line 2150
   at FSharp.Formatting.ApiDocs.ApiDocs.GenerateHtmlPhased[a](FSharpList`1 inputs, String output, String collectionName, FSharpList`1 substitutions, FSharpOption`1 template, FSharpOption`1 root, FSharpOption`1 qualify, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 urlRangeHighlight, FSharpOption`1 strict) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.ApiDocs\ApiDocs.fs:line 54
   at <StartupCode$fsdocs>.$BuildCommand.runGeneratePhase1@939-1.Invoke(Unit unitVar0) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 963
   at <StartupCode$fsdocs>.$BuildCommand.protect@710(CoreBuildOptions this, FSharpFunc`2 f) in C:\GitHub\dsyme\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 713
@dsyme
Copy link
Contributor

dsyme commented Dec 1, 2020

I also am having trouble running fsdocs with .NET 5 installed.

This looks relevant: https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#major-version-runtime-roll-forward.

I tried specifying this on FsDocs but it's not enough to resolve the problem sadly

<RollForward>LatestMajor</RollForward>

Among other things I think fsdocs needs to be updated to latest FSharp.Compiler.Service

@dsyme dsyme changed the title Error by fsdocs build Error running fsdocs on .NET 5.0.100 SDK Dec 1, 2020
@dsyme
Copy link
Contributor

dsyme commented Dec 1, 2020

#621 should allow fsdocs to roll forward (I think). Will release it subject to CI etc.

@wallymathieu
Copy link
Member

A workaround could be to install .net core 3.1 as I did here: fsprojects/FSharpPlus@a18ea7d

@dsyme
Copy link
Contributor

dsyme commented Dec 1, 2020

A workaround could be to install .net core 3.1 as I did here: fsprojects/FSharpPlus@a18ea7d

Yup

@vilinski
Copy link
Author

seems the exception is not gone in fsdocs 8.0 regardless of .net core version

@dsyme
Copy link
Contributor

dsyme commented Feb 10, 2021

Hmmmm I'd say this is because references can't be found. #616 is likely the same problem

@vilinski
Copy link
Author

yes, looks like it's a duplicate of #616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants