intersystems-community / vscode-objectscript

InterSystems ObjectScript extension for Visual Studio Code
https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO
Other
108 stars 49 forks source link

Server side changes to class .INT routines not recognized/loaded in editor window #600

Closed davevdg closed 3 years ago

davevdg commented 3 years ago

I am using server-side editing... Compile a class (say User.abc.cls) and then View Other, you see the INT code for the compiled class's .1 routine (User.abc.1.int) - great. Now compile the class from the command line in an IRIS session. The User.abc.1.int is not updated in the editor window. Even if I close the editor window and re-open it, the INT routine is not updated. It onl;y seems to be updated if I Save[/Compile] the class from the Editor window again. Here is an example of the mismatch in the editor window and the source on the server: image

The IDE needs to re-load the source of the routine/class from the server if the source on the server changes.

isc-jamien commented 3 years ago

The IDE is not connected to the server in the way you are used to in Studio. There is NO persistent connection (except when you are doing debugging). When you compile from the command line the IDE has no clue what you have done. All it has is the timestamp of what it last pulled got from the server on the last IDE compile. If you force a reload from the server then you will see your changes. Really this is not a supported way of development, you really should compile and edit from the IDE to maintain consistency.

davevdg commented 3 years ago

How do I force a reload? Right-click Reload... would be nice.

gjsjohnmurray commented 3 years ago

How do I force a reload? Right-click Reload... would be nice.

You can use Revert File from the File menu.

davevdg commented 3 years ago

How do I force a reload? Right-click Reload... would be nice.

You can use Revert File from the File menu.

Ok, thanks. That was not obvious to me :)

gjsjohnmurray commented 3 years ago

@davevdg you may like to try the VSIX at https://github.com/intersystems-community/vscode-objectscript/suites/2991455243/artifacts/67570330 which PR #685 has built. It ought to make isfs files reload upon focus if the server-side code changed.

gjsjohnmurray commented 3 years ago

@davevdg now available in beta build at https://github.com/intersystems-community/vscode-objectscript/releases/tag/v1.0.13-beta.3