chloeelim / ped

0 stars 0 forks source link

Export failure for very long class names #7

Open chloeelim opened 2 years ago

chloeelim commented 2 years ago

Description

File names have a cap (usually 255 characters). But there currently is no cap on the number of characters on the class names. This makes it possible to create a class with a name consisting more than 255 characters.

However, trying to export these classes with export will result in an export failure as the exported file cannot be created due to the file name length.

As class names can no longer be edited after they are created (no edit command for class), users will not be able to rectify their class names to make their classes exportable. Perhaps you could impose a character cap on the file name to fix this bug?

Steps to reproduce

  1. Try creating a class with a very long class name (more than 255 characters) addc c/longestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilewedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowed
  2. Go into focus mode for that created class focus c/longestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilewedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowedlongestfilenameallowed
  3. Try to export the class export
  4. TA Assist renders a 'Failed to exporterror message, and the console printsINFO: Invalid command: export`

Screenshot

Screenshot 2022-10-28 at 7.55.53 PM.png