You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DocFx 2.17 didn't have this issue however 2.19.2 does. When I run the docfx.exe build I get this error with our current build setup.
I'm not sure if it's something in particular with some formatting within code comments, maybe some odd characters or just something I've done that isn't supported after 2.17.x versions. Any help is appreciated!
This is trying to build API docs for the upcoming Lucene.NET 4.8 but fails. Currently the build file is using v2.17.7 but if it's changed to v2.19.2 it fill fail.
You can test this by running the build script with powershell: /apidocs/docs.ps1
If you then change this docs.ps1 file to reference the v2.19.2 instead (on line 42), then delete the /apidocs/tools folder and re-run the script it will fail with the exception below
Expected result
The build is successful
Actual result
The build throws an exception
Further technical details
This is the exception that is thrown:
[17-06-30 02:27:19.762]Error:System.AggregateException: One or more errors occurred. ---> Microsoft.DocAsCode.Exceptions.ExtractMetadataException: Err
or extracting metadata for X:/Projects/Lucene.Net/lucenenet.4.x/src/Lucene.Net/Lucene.Net.csproj: While writing a quoted scalar, found an orphaned hig
h surrogate. ---> YamlDotNet.Core.SyntaxErrorException: While writing a quoted scalar, found an orphaned high surrogate.
at YamlDotNet.Core.Emitter.WriteDoubleQuotedScalar(String value, Boolean allowBreaks)
at YamlDotNet.Core.Emitter.EmitScalar(ParsingEvent evt)
at YamlDotNet.Core.Emitter.EmitNode(ParsingEvent evt, Boolean isRoot, Boolean isMapping, Boolean isSimpleKey)
at YamlDotNet.Core.Emitter.EmitBlockMappingValue(ParsingEvent evt, Boolean isSimple)
at YamlDotNet.Core.Emitter.Emit(ParsingEvent event)
at YamlDotNet.Serialization.EventEmitters.TypeAssigningEventEmitter.Emit(ScalarEventInfo eventInfo, IEmitter emitter)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseDictionary[TContext](IObjectDescri
ptor dictionary, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList[TContext](IObjectDescriptor v
alue, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList[TContext](IObjectDescriptor v
alue, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList[TContext](IObjectDescriptor v
alue, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.YamlSerializer.EmitDocument(IEmitter emitter, IObjectDescriptor graph)
at Microsoft.DocAsCode.Common.YamlUtility.Serialize(TextWriter writer, Object graph, String comments)
at Microsoft.DocAsCode.Common.YamlUtility.Serialize(String path, Object graph, String comments)
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<GetMetadataFromProjectLevelCacheAsync>d__27`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<SaveAllMembersFromCacheAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<ExtractMetadataAsync>d__12.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<ExtractMetadataAsync>d__12.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.DocAsCode.SubCommands.MetadataCommand.ExecCore()
at Microsoft.DocAsCode.SubCommands.MetadataCommand.Exec(SubCommandRunningContext context)
at Microsoft.DocAsCode.Program.ExecSubCommand(String[] args)
---> (Inner Exception #0) Microsoft.DocAsCode.Exceptions.ExtractMetadataException: Error extracting metadata for X:/Projects/Lucene.Net/lucenenet.4.x/
src/Lucene.Net/Lucene.Net.csproj: While writing a quoted scalar, found an orphaned high surrogate. ---> YamlDotNet.Core.SyntaxErrorException: While wr
iting a quoted scalar, found an orphaned high surrogate.
at YamlDotNet.Core.Emitter.WriteDoubleQuotedScalar(String value, Boolean allowBreaks)
at YamlDotNet.Core.Emitter.EmitScalar(ParsingEvent evt)
at YamlDotNet.Core.Emitter.EmitNode(ParsingEvent evt, Boolean isRoot, Boolean isMapping, Boolean isSimpleKey)
at YamlDotNet.Core.Emitter.EmitBlockMappingValue(ParsingEvent evt, Boolean isSimple)
at YamlDotNet.Core.Emitter.Emit(ParsingEvent event)
at YamlDotNet.Serialization.EventEmitters.TypeAssigningEventEmitter.Emit(ScalarEventInfo eventInfo, IEmitter emitter)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseDictionary[TContext](IObjectDescri
ptor dictionary, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList[TContext](IObjectDescriptor v
alue, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList[TContext](IObjectDescriptor v
alue, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseList[TContext](IObjectDescriptor v
alue, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseProperties[TContext](IObjectDescri
ptor value, Object visitor, Int32 currentDepth, Object context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IObjectDescriptor
value, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor value
, IObjectGraphVisitor`1 visitor, Int32 currentDepth, TContext context)
at Microsoft.DocAsCode.YamlSerialization.YamlSerializer.EmitDocument(IEmitter emitter, IObjectDescriptor graph)
at Microsoft.DocAsCode.Common.YamlUtility.Serialize(TextWriter writer, Object graph, String comments)
at Microsoft.DocAsCode.Common.YamlUtility.Serialize(String path, Object graph, String comments)
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<GetMetadataFromProjectLevelCacheAsync>d__27`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<SaveAllMembersFromCacheAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<ExtractMetadataAsync>d__12.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.<ExtractMetadataAsync>d__12.MoveNext()<---
Build failed.
The text was updated successfully, but these errors were encountered:
Root cause:
Field Lucene.Net.Support.Character.MAX_SURROGATE defines the max surrogate character.
And we try to write this character into the yaml file (the constant value).
But yaml cannot write surrogate character.
Thanks for finding this. Ok that gives me a starting point to look into how to either filter this out or fix the issue somehow. Any tips are much appreciated.
Title
DocFx 2.17 didn't have this issue however 2.19.2 does. When I run the docfx.exe build I get this error with our current build setup.
I'm not sure if it's something in particular with some formatting within code comments, maybe some odd characters or just something I've done that isn't supported after 2.17.x versions. Any help is appreciated!
Functional impact
The docs cannot build
Minimal repro steps
Clone this repo at this branch: https://github.com/Shazwazza/lucenenet/tree/docfx-apidocs
This is trying to build API docs for the upcoming Lucene.NET 4.8 but fails. Currently the build file is using v2.17.7 but if it's changed to v2.19.2 it fill fail.
You can test this by running the build script with powershell:
/apidocs/docs.ps1
If you then change this
docs.ps1
file to reference thev2.19.2
instead (on line 42), then delete the /apidocs/tools folder and re-run the script it will fail with the exception belowExpected result
The build is successful
Actual result
The build throws an exception
Further technical details
This is the exception that is thrown:
The text was updated successfully, but these errors were encountered: