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
Comments
Are you using the client-side editing paradigm, where the files on your VS Code workstation are managed with, say, Git, and imported to an IRIS server for execution? Or are you using the server-side editing paradigm, which is equivalent to the IRIS Studio way of working?
Also, please explain why you don't want the storage information in the class file.
Evgeny and Ben,
you are right, it looks '-e' is not very practical. I want the code in my client with no storage, because it is useless when share with others or pack in a package. But I don't like to erase the data in my testbed server by mistake. FYI, I don't work with living system, :)
I want the code in my client with no storage, because it is useless when share with others or pack in a package.
Why 'useless'?
I am using client-side edit.
@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