Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.43k stars 310 forks source link

[Input] AssetPostprocessor - check file exists before attempting to read it (InputActionImporter) #1919

Closed AlexTyrer closed 5 months ago

AlexTyrer commented 5 months ago

Description

Added asset file existence check / early-out to AssetPostprocessor's CheckAndRenameJsonNameIfDifferent().

This was causing failures in some Unity internal package verification checks.

Changes made

Check that the asset file exists before attempting to read its contents.

Checklist

During merge:

AlexTyrer commented 5 months ago

Not sure why the tvos test keeps failing.

Looking at the logs the tests themselves seem fine - something else is going on that's not test related.

Overall status: FAIL Reason(s): One or more non-test related errors or failures occurred. Detail(s): Message: A task was canceled. Stack trace: at Nito.AsyncEx.AsyncConditionVariable.WaitAndRetakeLockAsync(Task task, AsyncLock asyncLock) at Nito.AsyncEx.AsyncConditionVariable.WaitAndRetakeLockAsync(Task task, AsyncLock asyncLock) at Nito.AsyncEx.AsyncProducerConsumerQueue1.TryDoDequeueAsync(CancellationToken cancellationToken, Boolean sync) at Nito.AsyncEx.AsyncProducerConsumerQueue1.DoDequeueAsync(CancellationToken cancellationToken, Boolean sync) at Unity.TestRunner.Common.PlayerConnection.PlayerConnectionBase.MessageAsyncEnumerator.MoveNextInternalAsync() in /home/bokken/build/output/unity/cds.test-platform/UnifiedTestRunner/source/Libraries/Unity.TestRunner.Common/SessionRunning/PlayerConnection/PlayerConnectionBase.cs:line 282 at Unity.UnityTestFramework.PluginBase.PlayerConnectionTestRunner.RunAsync(ProjectInfo projectInfo, CancellationToken cancellationToken) in /home/bokken/build/output/unity/unity/Tests/Unity.UnityTestFramework.PluginBase/PlayerConnectionTestRunner.cs:line 99 Total tests: 346 Failed test count: 0 Successful tests count: 346 Instabilities: 0 Not run tests count: 0 Details in: /Users/bokken/build/output/Unity-Technologies/InputSystem/build/test-results/TestReport.html

I don't see how the trivial change I made can have caused this.