With the inability to use typeof without causing internal errors, and not liking the setmetatable work around I found, I continued to look for a type safe way to produce class prototype structures. This post is a warning to always make backups and how luau type checking is still unstable.
This work has permanently corrupted our place without any recent backups, and reverts are ineffective.
I had a module script in ReplicatedFirst named ModuleScript which I was playing with.
Everything was working fine until one change instantly crashed studio.
I am currently trying to recreate this change in a separate place.
Story Details
As normal I opened the recovery file and copied the last commited script to my clipboard.
I opened the original place and found that no other commits were lost so I deleted the recovery file.
I then attempted to open the module script to copy in the recovered version, it crashed when it opened.
The next time I opened studio, I was not presented with an option to recover so proceed straight to the original place.
The place was just as I had it before the crash, but I noticed I had uncommitted changes for ModuleScript.
Thinking this might be the cause of the crash I pressed commit, instant crash.
Again no option for a recovery, but now any attempt to open the place would mean cause a crash.
I thought it was because I had the module open in the editor, so asked my co-dev to open the place and delete the module script.
He was unable to open the place, crashing as well, at this point we attempted to revert the place.
First we reverted to before the last commit, and the place still crashes on open.
Second we reverted by several days, the place still crashes on open.
Our last option is to load a backup from a month ago.
Before we load our manual backup we want to let roblox staff look at this issue
We can not provide an rbx file as we cant open the place to save it, our place id is 4559239318
Here is a paste bin of the version I had on my clipboard, this one does not crash studio.
Studio crashing for this specific place occurs 100% of the time and it continues to crash even with rolling back the versions. My OS and my other co-developers OS are both Windows 10.
(Please can this be moved to Studio Bugs)