vaticle / typedb-studio

TypeDB Studio (IDE)
https://typedb.com
Mozilla Public License 2.0
186 stars 43 forks source link

Renaming a file to switch case of a letter shows a weird error #828

Open izmalk opened 2 months ago

izmalk commented 2 months ago

Description

When I try to rename a file in a particular way (change a letter in its name to switch its case: lower/upper case), Studio shows an error and closes the file's tab if it's open.

Environment

  1. TypeDB distribution: Core
  2. TypeDB version: 2.27.0
  3. Environment: macOS
  4. Studio version: 2.27.0
  5. Other details:

Reproducible Steps

  1. Set up

Create a new file in Studio's project directory. The filename should have letters.

  1. Execute

-

  1. Test/Query

Rename the file by studio's GUI in such a way, that the only change is to switch case of a letter (or multiple letters) in the filename.

  1. Unexpected result

If the file is open, the tab with it will close, and the following error will appear:

[PRJ22] TypeDB Studio Project: Failed to rename file to /Users/vladimir/tests/studio/projects/crash-course/Qqq.tql, due to:
Collection contains no element matching the predicate.

The file is not renamed.

Expected result

File renamed, no errors.

Additional information

Relevant logs from TypeDB or Driver:

izmalk commented 2 months ago

While experimenting with this bug to reproduce it reliably, I actually managed to lose the contents of a file. That particular loss can be somehow connected to another issue: https://github.com/vaticle/typedb-studio/issues/799