Question
· Apr 25

How to setup vscode to avoid saving storage part in cls file?

there is a setting in VSCode "objectscript.export: {noStorage: ture} "  allow export cls from server to client, without storage definition. 

However, wheneven I complied and save cls in my vscode client, the storage definition was added back. If I don't want it, I have to deleted the part manually. 

Does anyone have something to teach me? thank you

Discussion (6)4
Log in or sign up to continue

@Hao Ma , there is such a setting in compiler flags:  - e. But usually it is a very dangerous idea not to store global storage within the persistent class. As the storage is being generated, if not presented in a code on a target machine, it can become completely different from the data associated with the class that already exists, and this can lead to unpredictable data losses and failures. 

So usually, it is not recommended practice to delete the storage information from the class other than you are sure that there is no data in the system or it is deleted in advance.

I want to re-iterate what Evgeny said ... you should never store your persistent objectscript class definition in source control without the storage definition block.  Doing so will cause the storage block to be regenerated from scratch each time source is loaded, and if there is existing data you may have a mismatch of where properties exist on disk and where where the source thinks they should live