|
42 | 42 | import re
|
43 | 43 | import sys
|
44 | 44 | import importlib.util
|
| 45 | +import copy |
45 | 46 |
|
46 | 47 | import chapel
|
47 | 48 | from chapel.lsp import location_to_range, error_to_diagnostic
|
@@ -693,8 +694,8 @@ def __init__(
|
693 | 694 | self.module_paths = file_config["module_dirs"]
|
694 | 695 | self.file_paths = file_config["files"]
|
695 | 696 |
|
696 |
| - self.std_module_root = self.cls_config.args.get("std_module_root", "") |
697 |
| - self.module_paths.extend(self.cls_config.args.get("module_dirs", [])) |
| 697 | + self.std_module_root = self.cls_config.get("std_module_root") |
| 698 | + self.module_paths.extend(self.cls_config.get("module_dir")) |
698 | 699 |
|
699 | 700 | self.context._set_module_paths(
|
700 | 701 | self.std_module_root, self.module_paths, self.file_paths
|
@@ -1411,7 +1412,7 @@ def add_bool_flag(name: str, dest: str, default: bool):
|
1411 | 1412 | "--std-module-root", default="", help=configargparse.SUPPRESS
|
1412 | 1413 | )
|
1413 | 1414 | self.parser.add_argument(
|
1414 |
| - "-M", "--module-dir", action="append", default=[] |
| 1415 | + "--module-dir", "-M", action="append", default=[] |
1415 | 1416 | )
|
1416 | 1417 | add_bool_flag("type-inlays", "type_inlays", True)
|
1417 | 1418 | add_bool_flag("param-inlays", "param_inlays", True)
|
@@ -1453,7 +1454,7 @@ def _validate_end_markers(self):
|
1453 | 1454 | )
|
1454 | 1455 |
|
1455 | 1456 | def parse_args(self):
|
1456 |
| - self.args = vars(self.parser.parse_args()) |
| 1457 | + self.args = copy.deepcopy(vars(self.parser.parse_args())) |
1457 | 1458 | self._parse_end_markers()
|
1458 | 1459 | self._validate_end_markers()
|
1459 | 1460 |
|
|
0 commit comments