Mixedrealitytoolkit-unity: Verbose filenames make filenames too long on Windows

Created on 24 Sep 2020  路  6Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Describe the bug

Since the filenames in the MRTK are very verbose,there are issues when they get even longer. partially due to the non-standard (for Unity) package naming convention.

This is especially an issue when using the packages from the registry and then embedding them (making them live in the Packages folder) for custom changes (a common Unity workflow).

_(this error is from trying a git commit in a project with embedded MRTK packages)_

error: open("development/QuestTemplate/Packages/com.microsoft.mixedreality.toolkit.foundation@2.5.0-preview.20200922.2/Providers/Oculus/XRSDK/MRTK-Quest/Editor/Microsoft.MixedReality.Toolkit.Providers.XRSDK.Oculus.Handtracking.Editor.asmdef"): Filename too long
error: unable to index file 'development/QuestTemplate/Packages/com.microsoft.mixedreality.toolkit.foundation@2.5.0-preview.20200922.2/Providers/Oculus/XRSDK/MRTK-Quest/Editor/Microsoft.MixedReality.Toolkit.Providers.XRSDK.Oculus.Handtracking.Editor.asmdef'
fatal: adding files failed

To reproduce

Expected behavior

Filenames don't become too long

Your setup (please complete the following information)

  • Unity Version [2020.2.0b2]
  • MRTK Version [v2.5.0]

Target platform (please complete the following information)

  • Quest, but doesn't matter in this case

Additional context

Separate issues here:

  • the package name 2.5.0-preview.20200922.2 is not typical for Unity; there it would be something like 2.5.0-preview.2 (omitting the date part)
  • the asmdef names become really long (Microsoft.MixedReality.Toolkit.Providers.XRSDK.Oculus.Handtracking.Editor.asmdef). Maybe in some cases they can be shortened from Microsoft.MixedReality.Toolkit to MRTK?
Bug

Most helpful comment

I can do that. Will do a second pass at the rename

All 6 comments

@RogPodge Could this asmdef be combined with the other Oculus asmdef (which has a shorter name)? Or maybe shorten HandTracking to Hands or something, if we want to keep the hands support clearly delineated.

we can also trim the asmdef some more by dropping "Providers", that would be an additional 10 (with the '.') character savings

also, since this is a source file and not the assembly itself, we can shorten quite a bit more by making it "MRTK.XRSDK.Oculus.Hands.Editor.asmdef". That would take us from 80 characters (wow!) to 38. If we leave off the MRTK and XRSDK, we can save 11 more (including the trailing '.')

Working on a PR that will reduce the filename length of ALL .asmdefs

Careful with removing too much; "Oculus.Hands.Editor.asmdef" sounds like it could be a name from another package (say, the Oculus Integration once it becomes a package). AsmDef names still need to be unique, so prefixing with MRTK might still be a good thing.

I can do that. Will do a second pass at the rename

Was this page helpful?
0 / 5 - 0 ratings

Related issues

reillydonovan picture reillydonovan  路  3Comments

markgrossnickle picture markgrossnickle  路  3Comments

matatabi-ux picture matatabi-ux  路  3Comments

nrchuanqi picture nrchuanqi  路  3Comments

DanAndersen picture DanAndersen  路  3Comments