diff options
author | khoden <khoden@yandex-team.com> | 2024-04-23 19:28:40 +0300 |
---|---|---|
committer | khoden <khoden@yandex-team.com> | 2024-04-23 19:38:46 +0300 |
commit | 42c37f6650d9387d20dc37cba3fbddd523075166 (patch) | |
tree | 7078e1e3fff8c6fa58f14dba4d4c132c96e2652e | |
parent | 44ad22687965819ce6d04c83f7c8cc927fae90ea (diff) | |
download | ydb-42c37f6650d9387d20dc37cba3fbddd523075166.tar.gz |
conf: Сделать вызов макроса TS_FILES обязательным для TS_PACKAGE
fd92c9fd52236249f4a95bc57fff7f66797923a5
-rw-r--r-- | build/conf/ts/ts_package.conf | 5 | ||||
-rw-r--r-- | build/plugins/nots.py | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/build/conf/ts/ts_package.conf b/build/conf/ts/ts_package.conf index 135e41a39e..76f833bc9c 100644 --- a/build/conf/ts/ts_package.conf +++ b/build/conf/ts/ts_package.conf @@ -5,6 +5,10 @@ TS_PACK=$TOUCH_UNIT \ && $_TS_FILES_COPY_CMD \ ${kv;hide:"p TS_PKG"} ${kv;hide:"pc magenta"} +macro _TS_PACKAGE_EPILOGUE() { + _TS_PACKAGE_CHECK_FILES() +} + ### @usage: TS_PACKAGE() ### ### The TypeScript/JavaScript library module, that does not need any compilation, @@ -23,6 +27,7 @@ TS_PACK=$TOUCH_UNIT \ multimodule TS_PACKAGE { module BUILD: _TS_BASE_UNIT { .CMD=TS_PACK + .EPILOGUE=_TS_PACKAGE_EPILOGUE .ALLOWED=TS_FILES .ALIASES=FILES=TS_FILES SRCS=TS_FILES .PEERDIRSELF=TS_PREPARE_DEPS diff --git a/build/plugins/nots.py b/build/plugins/nots.py index 49f003ace9..b69b65d215 100644 --- a/build/plugins/nots.py +++ b/build/plugins/nots.py @@ -698,6 +698,17 @@ def on_ts_files(unit, *files): @_with_report_configure_error +def on_ts_package_check_files(unit): + ts_files = unit.get("_TS_FILES_COPY_CMD") + if ts_files == "": + ymake.report_configure_error( + "\n" + "In the TS_PACKAGE module, you should define at least one file using the TS_FILES() macro.\n" + "Docs: https://docs.yandex-team.ru/frontend-in-arcadia/references/TS_PACKAGE#ts-files." + ) + + +@_with_report_configure_error def on_depends_on_mod(unit): if unit.get("_TS_TEST_DEPENDS_ON_BUILD"): for_mod_path = unit.get("TS_TEST_FOR_PATH") |