Closed nxrighthere closed 4 years ago
Hey, this part System.IO.DirectoryNotFoundException: Could not find a part of the path
and the actual path being 265 char long make me think this is again this stupid Windows limitation. Still haven't got the time to look into bypassing this at DefaultDocumentation level (appart from changing the DefaultDocumentationFileNameMode configuration, but I have read some stuff about special uri scheme with //?/...
which could help with this limitation).
Apparently this is something you can change on Windows level (check here) but I haven't tried this setting :/
Doesn't work for me unfortunately. 😢
But yea, it's because the length is exceeded.
@nxrighthere You have tried this configuration? This works's fine for my Projects. The md File is maximum 25 char length. So 240 characters can still be used for the path.
<DefaultDocumentationFileNameMode>Md5</DefaultDocumentationFileNameMode>
Yes, but it destroys readability since it's no longer human-readable names.
how about an "unsafe" name mode, where namespaces are omitted but you are on your own if you have multiple types with the same name in different namespace :/? Since the code to add more mode is here might as well go experimental with what could work.
Ok, in github I don't need human readable names. I can just click through or search for strings in .md in Visual Code.
@Doraku That should work for me actually!
@nxrighthere just added the Name
value for DefaultDocumentationFileNameMode which will omit the namespace for page name generation in latest release. Hopefully you will not get collision and short enough file path while still being readable ;)
@Doraku Thank you! It works just fine except only one error:
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Exception: Error while writing documentation for UnrealEngine.Framework.LinearColor.op_Division(float, UnrealEngine.Framework.LinearColor) ---> System.IO.IOException: The process cannot access the file 'E:\Git\UnrealCLR\API\LinearColor-operator-(float_LinearColor).md' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at DefaultDocumentation.DocumentationWriter.Dispose()
at DefaultDocumentation.DocumentationGenerator.<>c__DisplayClass9_0.<WriteDocumentation>b__1(DocItem i)
--- End of inner exception stack trace ---
at DefaultDocumentation.DocumentationGenerator.<>c__DisplayClass9_0.<WriteDocumentation>b__1(DocItem i)
at System.Linq.Parallel.ForAllOperator`1.ForAllEnumerator`1.MoveNext(TInput& currentElement, Int32& currentKey)
at System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork()
at System.Linq.Parallel.SpoolingTaskBase.Work()
at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
at System.Linq.Parallel.ForAllOperator`1.WrapPartitionedStream[TKey](PartitionedStream`2 inputStream, IPartitionedStreamRecipient`1 recipient, Boolean preferStriping, QuerySettings settings)
at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2 inputStream)
at System.Linq.Parallel.ScanQueryOperator`1.ScanEnumerableQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)
at System.Linq.Parallel.ForAllOperator`1.RunSynchronously()
at DefaultDocumentation.Program.Main(String[] args)
C:\Users\Stas\.nuget\packages\defaultdocumentation\0.6.8\build\DefaultDocumentation.targets(18,5): error MSB3073: The command ""C:\Users\Stas\.nuget\packages\defaultdocumentation\0.6.8\build\../tools/DefaultDocumentation.exe" /assembly:"E:\Git\UnrealCLR\Source\Managed\Framework\bin\Release\UnrealEngine.Framework.dll" /xml:"E:\Git\UnrealCLR\Source\Managed\Framework\obj\Release\UnrealEngine.Framework.xml" /output:"E:\Git\UnrealCLR\API" /home:"" /fileNameMode:"Name" /nestedTypeVisibility:"DeclaringType"" exited with code -532462766. [E:\Git\UnrealCLR\Source\Managed\Framework\UnrealEngine.Framework.csproj]
Cause by this line:
/// <summary>
/// Divides two colors
/// </summary>
public static LinearColor operator /(float scale, LinearColor value) => new LinearColor(value.r / scale, value.g / scale, value.b / scale, value.a / scale);
If I delete one of: operator -
, operator *
, or operator /
then no errors.
Those are linked to the same page actually, which is LinearColor-operator-(float_LinearColor).md
.
gahhh I forgot I had a special handling for operators because of their name, that's what I get for not having real unit tests and forgetting to test it on the dummy project with most special cases >_> Should work correctly now sorry!
@Doraku No worries! Works perfectly now, thanks!
@Doraku Another minor thing, it seems that GitHub is unhappy with formatting here.
oh it's not a minor thing at all, it completely botch the operator file name generation! damn I am bad today, that's some half-assed dev on my part
Nah, that's okay! We are making the thing only better. 🐱
That last one should do it :]
Awesome, thanks!
@Doraku Thanks for all your work. How I can donate you some money as a gesture of appreciation? Do you have PayPal?
@Doraku Done. Thanks!
Hey Laszlo, how are you?
So I just encountered the following error:
Caused by these guys:
Any idea what's wrong with it?