`GetResult` and `UnsafeGetStatus` appears twice in Unity assets
itn3000 opened this issue · 4 comments
Overview
void IUniTaskSource.GetResult(short token)
and public IUniTaskStatus UnsafeGetStatus()
In
Environment
- Windows10(x64)
- dotnet-sdk-6.0pre5
- dotnet-sdk-5.0.301
Steps to reproduce
- clone source
- build by
dotnet build MessagePipe.sln
Expected result
- no changes will be found in git
Additional Information
This may be caused by executing tools/PostBuildUnity/PostBuildUnity.csproj in PostBuildEvent.
This is no problem if executing only once, but executed twice, public UniTaskStatus GetStatus(short token)
will be hit and generating same lines again.
MessagePipe/tools/PostBuildUtility/Program.cs
Lines 49 to 51 in 7a6a2bf
Thank you.
I thought it was always copied, but does that mean it's running without being copied?
Would this be solved by SkipUnchangedFiles=false
?
MessagePipe.csproj+netstandard2.0 and MessagePipe.csproj+net5.0 seem to execute PostBuildUnity(inspected from msbuild log).
I tested SkipUnchangedFiles=false
, it seems to depend on -maxCpuCount
parameter(if maxCpuCount=1, replacement works correctry).
dotnet build
seems to attempt parallel build by default(it may depend on system cpu?).
Oh, sorry, it seems to only depend on parallel build num(if maxcpucount=1, problem did not appear even if SkipUnchangedFiles=true
).
Another solution I think is inserting trivia in public UniTaskStatus GetStatus(short token)
(e.g. replacing from public UniTaskStatus GetStatus(short token)
to public /*replaced*/ UniTaskStatus GetStatus(short token)
)