wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps

Home Page:https://wurstlang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updating anything inside module does not trigger proper syntax check

Donach opened this issue · comments

We are using modules heavily, and whenever I change anything in a module which is used (usually on more than 1 place), syntax check does not occur. Example:

  • rename abstract function in module -> no check is triggered (any case - breaking the syntax of fixing it)
  • eg. in my example, when I rename function "getXp" to "getXpOld" inside module, the class using the module does not show error

When doing such changes, one must often reload VSCode, which then runs the checks properly.

compiler.log
languageServer.log

Picked up JAVA_TOOL_OPTIONS: -Xms256m -Xmx2g
Loading Wurst version 1.8.1.0-jenkins-Wurst-1291
initialization done!

Example class:

public module CustomHeroXpModule
   abstract function getXp() returns int

public class CustomHero extends TUnit
   override function getXp() returns int
        return this.xp

Should be fixed by #1023

Iv newest version, it still does not work and there is also problem with #1027, it might be even related.

I could not reproduce this. Probably you have some more complex use of modules than what I tested.
Maybe you can provide something like in this test case: https://github.com/wurstscript/WurstScript/blob/master/de.peeeq.wurstscript/src/test/java/tests/wurstscript/tests/ModelManagerTests.java#L281-L305

  1. Initial set of packages with their source code.
  2. Updates being made to one or more packages.
  3. Some errors that are not correctly updated in the editor.

As addressed over our DMs, we are currently struggling with VS Code freeze for about 2-5 seconds after even minor code change (say adding 1 variable).
This happens so often its very frustrating to type, as it freezes even mid-type.
Its true the validation of modules now work properly, so they can be changed and are on the go syntax checked, however its taking quite a while.
Just so you know my PC is no weak thing:
R9-5900X
project located on "entry-level" PCI-e 4.0 NVMe SSD

I'm working on a better way to update dependent files, but that requires some architectural changes so will take some time.

In principle, vscode should separate extension from the main ui thread, so I don't understand how Wurst can block the whole vscode ui and don't see this on my machine (but probably with smaller projects). One thing you could try is to disable all other extensions to be sure it's not caused by some strange interaction of the wurst extension and another one.

Would it help if we temporarily added an option to disable checking of dependent files or some other quick fix?

I'm working on a better way to update dependent files, but that requires some architectural changes so will take some time.

In principle, vscode should separate extension from the main ui thread, so I don't understand how Wurst can block the whole vscode ui and don't see this on my machine (but probably with smaller projects). One thing you could try is to disable all other extensions to be sure it's not caused by some strange interaction of the wurst extension and another one.

Would it help if we temporarily added an option to disable checking of dependent files or some other quick fix?

I would say that would help, as there are some 150 or so files in our project, and usually my change affects 1-10 lets say, so if this could be done via some switch in settings, that might help greatly :-)

Btw after disabling pretty much all extensions but Wurst and vscode-icons, the hiccups are still there, however they are <2 seconds, so yeah that helped quite substantially as well, still its a bit weird having these lockups 👍

What's the status of this now?

Actually seems to be kinda good.
What I already reported to peq is now a problem in our project, where having tab "Problems" opened causes up to 1 minute stutter/lockup of VSCode, without that, the syntax check seems to work 100% fine even when updating modules or anything else (very rarely do I have to reload)
I'll update this if I have some further findings or will close it if everything is OK.