diff options
author | vturov <vturov@yandex-team.com> | 2025-03-05 09:13:42 +0300 |
---|---|---|
committer | vturov <vturov@yandex-team.com> | 2025-03-05 09:36:12 +0300 |
commit | 5af94f31260246c39a7a4d383f87b64b6660491c (patch) | |
tree | 7b4cb62ef944ad01cf3662bef03b7d3468aa0ccf | |
parent | eb6162648d609b51e071e090db75fdcfc8d726c4 (diff) | |
download | ydb-5af94f31260246c39a7a4d383f87b64b6660491c.tar.gz |
fix(typecheck):fix logic for specific tsconfig for typecheck
commit_hash:93fb1214b69063be6c1a0b93d846a248603c2a2d
-rw-r--r-- | build/plugins/nots.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/build/plugins/nots.py b/build/plugins/nots.py index 4581182ec5f..9d67685c485 100644 --- a/build/plugins/nots.py +++ b/build/plugins/nots.py @@ -621,17 +621,18 @@ def _setup_tsc_typecheck(unit: NotsUnitType) -> None: if not test_files: return - tsconfig_paths = unit.get("TS_CONFIG_PATH").split() - tsconfig_path = tsconfig_paths[0] - - if len(tsconfig_paths) > 1: - tsconfig_path = unit.get("_TS_TYPECHECK_TSCONFIG") - if not tsconfig_path: + tsconfig_path = unit.get("_TS_TYPECHECK_TSCONFIG") + if not tsconfig_path: + tsconfig_paths = unit.get("TS_CONFIG_PATH").split() + if len(tsconfig_paths) > 1: macros = " or ".join([f"TS_TYPECHECK({p})" for p in tsconfig_paths]) raise Exception(f"Module uses several tsconfig files, specify which one to use for typecheck: {macros}") - abs_tsconfig_path = unit.resolve(unit.resolve_arc_path(tsconfig_path)) - if not abs_tsconfig_path: - raise Exception(f"tsconfig for typecheck not found: {tsconfig_path}") + + tsconfig_path = tsconfig_paths[0] + + abs_tsconfig_path = unit.resolve(unit.resolve_arc_path(tsconfig_path)) + if not abs_tsconfig_path: + raise Exception(f"tsconfig for typecheck not found: {tsconfig_path}") unit.on_peerdir_ts_resource("typescript") user_recipes = unit.get("TEST_RECIPES_VALUE") |