unity-test-runner icon indicating copy to clipboard operation
unity-test-runner copied to clipboard

Infinite loop when files have the same name but only differ in casing

Open Bradshaw opened this issue 4 years ago • 1 comments

Bug description

If two files have the same name but only differ in casing, (e.g: Gamemanager.cs.meta & GameManager.cs.meta), it will trigger a loop where Unity will attempt to import the files, print a warning/error, and repeat.

How to reproduce

  • Copy a file in the project and give it an identical name, with different casing
    • (e.g: Gamemanager.cs.meta & GameManager.cs.meta)
  • Run tests with unity-test-runner

Expected behavior

  • Ideally, the test runner will simply ignore one of the files, or support case-sensitive file names, and continue as normal
  • Alternately, the test runner would quit with an error when this error is encountered
  • If possible, worst case: Detect that no progress is being made, and cancel the test with an error

Additional details

In my case, this happened due to renaming a class and its associated file. Assets/GotoGames/Components/Utils/GameobjectExtensions.cs Assets/GotoGames/Components/Utils/GameObjectExtensions.cs (Note the "o" of Gameobject becoming an "O": GameObject)

The meta file was correctly renamed, but a new meta file with the old name was also added to the commit. I did not catch this new addition, and pushed this to the repo.
The test process ran for six hours before being killed by GitHub actions, filling a log file with 46 Megabytes worth of:

The following files have the same name but only differ in casing and will be ignored:
    Assets/GotoGames/Components/Utils/GameobjectExtensions.cs.meta
    Assets/GotoGames/Components/Utils/GameObjectExtensions.cs.meta
Case sensitive file systems are not fully supported, please move or rename these files. 
(Filename: ./Modules/AssetDatabase/Editor/V2/SourceAssetDB.cpp Line: 829)

The following files have the same name but only differ in casing and will be ignored:
    Assets/GotoGames/Components/Utils/GameobjectExtensions.cs.meta
    Assets/GotoGames/Components/Utils/GameObjectExtensions.cs.meta
Case sensitive file systems are not fully supported, please move or rename these files. 
(Filename: ./Modules/AssetDatabase/Editor/V2/SourceAssetDB.cpp Line: 829)

The following files have the same name but only differ in casing and will be ignored:
    Assets/GotoGames/Components/Utils/GameobjectExtensions.cs.meta
    Assets/GotoGames/Components/Utils/GameObjectExtensions.cs.meta
Case sensitive file systems are not fully supported, please move or rename these files. 
(Filename: ./Modules/AssetDatabase/Editor/V2/SourceAssetDB.cpp Line: 829)```

Bradshaw avatar Mar 31 '21 09:03 Bradshaw

I don't know if this is a game-ci issue or a Unity issue, the real fix might need to come from up-stream

Bradshaw avatar Mar 31 '21 09:03 Bradshaw