From 0ee4bde9e35690480dc2d9fe53fcada02e0f284f Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Sat, 22 Aug 2026 21:13:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20`chef=5Fprep=5Fthis=5Fcomb?= =?UTF-8?q?o=5Fdish()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/framework/chef.c | 4 +++- src/recipe/lang/JavaScript/JavaScript.c | 2 +- src/recipe/lang/Python/Python.c | 4 +++- src/recipe/lang/Python/uv/uv.c | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/framework/chef.c b/src/framework/chef.c index eba197ea..60fa30c5 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -5,7 +5,7 @@ * File Authors : @ccmywish * Contributors : @BingChunMoLi * Created On : <2025-08-09> - * Last Modified : <2026-08-20> + * Last Modified : <2026-08-22> * * 本文件的函数能够帮助 chefs 为一个 dish 定义 recipe * ------------------------------------------------------------*/ @@ -30,6 +30,8 @@ /* 简化 "源dish" 的编写 */ #define chef_prep_this_sources_dish(t) Dish_t *this = &t##_dish; this->prepared = true; chef_allow_NOOP(t); +#define chef_prep_this_combo_dish(t) Dish_t *this = &t##_dish; this->prepared = true; chef_allow_NOOP(t); + /* 内部 "源dish" 的 preparefn 未通过 menu.c 的 add() 注册, 手动挂载 */ #define chef_set_preparefn_for_sources_dish(t) t##_dish.preparefn = t##_prepare; diff --git a/src/recipe/lang/JavaScript/JavaScript.c b/src/recipe/lang/JavaScript/JavaScript.c index 5335d874..b7845607 100644 --- a/src/recipe/lang/JavaScript/JavaScript.c +++ b/src/recipe/lang/JavaScript/JavaScript.c @@ -7,7 +7,7 @@ def_combo_dish(pl_js_group, "js/javascript/node/nodejs"); void pl_js_group_prepare (void) { - chef_prep_this_dish (pl_js_group, NOOP); + chef_prep_this_combo_dish (pl_js_group); chef_set_recipe_created_on (this, "2023-09-09"); chef_set_recipe_last_updated (this, "2026-08-19"); diff --git a/src/recipe/lang/Python/Python.c b/src/recipe/lang/Python/Python.c index 7ef327e6..5b490be8 100644 --- a/src/recipe/lang/Python/Python.c +++ b/src/recipe/lang/Python/Python.c @@ -7,10 +7,12 @@ def_combo_dish(pl_py_group, "py/python"); void pl_py_group_prepare (void) { - chef_prep_this_dish (pl_py_group, NOOP); + chef_prep_this_combo_dish (pl_py_group); chef_set_recipe_created_on (this, "2023-09-03"); chef_set_recipe_last_updated (this, "2026-08-13"); chef_set_sub_dishes (this, 4, &pl_pip_dish, &pl_pdm_dish, &pl_poetry_dish, &pl_uv_dish); + + chef_set_all_sub_dishes_use_same_source (this, true); } diff --git a/src/recipe/lang/Python/uv/uv.c b/src/recipe/lang/Python/uv/uv.c index b16e5656..9294e7de 100644 --- a/src/recipe/lang/Python/uv/uv.c +++ b/src/recipe/lang/Python/uv/uv.c @@ -7,7 +7,7 @@ def_combo_dish(pl_uv, "uv"); void pl_uv_prepare (void) { - chef_prep_this_dish (pl_uv, NOOP); + chef_prep_this_combo_dish (pl_uv); chef_set_recipe_created_on (this, "2026-08-12"); chef_set_recipe_last_updated (this, "2026-08-20");