Skip to content

Commit b229a6d

Browse files
committed
use unsafe typechecking for runmap command
buildmap stays safe, you can opt out of this new feature by setting `wurst.safeRunmapTypecheck` to false in settings.json
1 parent 2e75e0a commit b229a6d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/MapRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public abstract class MapRequest extends UserRequest<Object> {
5858
/**
5959
* makes the compilation slower, but more safe by discarding results from the editor and working on a copy of the model
6060
*/
61-
private SafetyLevel safeCompilation = SafetyLevel.KindOfSafe;
61+
protected SafetyLevel safeCompilation = SafetyLevel.KindOfSafe;
6262

6363
enum SafetyLevel {
6464
QuickAndDirty, KindOfSafe

de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/RunMap.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public class RunMap extends MapRequest {
4949
public RunMap(ConfigProvider configProvider, WFile workspaceRoot, Optional<String> wc3Path, Optional<File> map,
5050
List<String> compileArgs) {
5151
super(configProvider, map, compileArgs, workspaceRoot, wc3Path);
52+
if (!configProvider.getConfig("safeRunmapTypecheck", "false").equals("true")) {
53+
safeCompilation = SafetyLevel.QuickAndDirty;
54+
}
5255
}
5356

5457
@Override

0 commit comments

Comments
 (0)