Skip to content

Commit

Permalink
refactor!: Make extension_group a non-installable addon and prevent f…
Browse files Browse the repository at this point in the history
…rom declaring extension_group in graph nodes
  • Loading branch information
sunxilin committed Oct 15, 2024
1 parent 097e86d commit 0a8320a
Show file tree
Hide file tree
Showing 269 changed files with 1,622 additions and 4,702 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ group("ten_framework_all") {
"//packages/core_extensions",
"//packages/core_protocols",
"//packages/example_apps",
"//packages/example_extension_groups",
"//packages/example_extensions",
"//third_party",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
"name": "addon_not_found",
"auto_start": false,
"nodes": [
{
"type": "extension_group",
"name": "default",
"addon": "default_extension_group"
},
{
"type": "extension",
"name": "extension_1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
"name": "addon_not_found",
"auto_start": false,
"nodes": [
{
"type": "extension_group",
"name": "default",
"addon": "default_extension_group"
},
{
"type": "extension",
"name": "extension_1",
Expand Down
4 changes: 0 additions & 4 deletions core/src/ten_runtime/app/predefined_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,6 @@ bool ten_app_get_predefined_graphs_from_property(ten_app_t *self) {
ten_extension_info_node_from_value(
predefined_graph_info_node_item_value,
&predefined_graph_info->extensions_info, NULL);
} else if (!strcmp(type, TEN_STR_EXTENSION_GROUP)) {
ten_extension_group_info_from_value(
predefined_graph_info_node_item_value,
&predefined_graph_info->extension_groups_info, NULL);
} else {
ten_predefined_graph_info_destroy(predefined_graph_info);
result = false;
Expand Down
8 changes: 5 additions & 3 deletions core/src/ten_runtime/binding/python/native/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ config("ten_runtime_python_config") {

include_dirs = ten_runtime_common_includes

python_version = "3" # "3" by default

cflags = exec_script("//build/common/python/python_config.py",
[
"--python-version",
"3",
python_version,
"--target-os",
target_os_arg,
"--config-type",
Expand All @@ -34,7 +36,7 @@ config("ten_runtime_python_config") {
ldflags = exec_script("//build/common/python/python_config.py",
[
"--python-version",
"3",
python_version,
"--target-os",
target_os_arg,
"--config-type",
Expand Down Expand Up @@ -75,7 +77,7 @@ config("ten_runtime_python_config") {
libs = exec_script("//build/common/python/python_config.py",
[
"--python-version",
"3",
python_version,
"--target-os",
target_os_arg,
"--config-type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ ten_shared_ptr_t *get_extension_info_in_extensions_info(
"'%s'",
extension_instance_name, extension_addon_name,
ten_string_get_raw_str(&extension_info->extension_addon_name));
}

TEN_ASSERT(0,
} else {
TEN_ASSERT(0,
"extension '%s' is associated with different addon '%s', "
"'%s'",
extension_instance_name, extension_addon_name,
ten_string_get_raw_str(&extension_info->extension_addon_name));
}

return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/ten_runtime/msg/cmd_base/cmd/start_graph/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static void ten_raw_cmd_start_graph_add_missing_extension_group_node(
}

if (group_found) {
return;
continue;
}

ten_extension_group_info_t *extension_group_info =
Expand Down
3 changes: 1 addition & 2 deletions core/src/ten_rust/src/json_schema/data/property.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@
"type": {
"type": "string",
"enum": [
"extension",
"extension_group"
"extension"
]
},
"name": {
Expand Down
31 changes: 0 additions & 31 deletions core/src/ten_rust/src/json_schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ mod tests {
{
"name": "default",
"nodes": [
{
"type": "extension_group",
"name": "default_extension_group",
"addon": "default_extension_group"
},
{
"type": "extension",
"name": "default_extension_cpp",
Expand Down Expand Up @@ -218,10 +213,6 @@ mod tests {
{
"name": "default",
"nodes": [{
"type": "extension_group",
"name": "default_extension_group",
"addon": "default_extension_group"
},{
"type": "extension",
"name": "default_extension_cpp",
"addon": "default_extension_cpp",
Expand Down Expand Up @@ -266,10 +257,6 @@ mod tests {
{
"name": "default",
"nodes": [{
"type": "extension_group",
"name": "default_extension_group",
"addon": "default_extension_group"
},{
"type": "extension",
"name": "default_extension_cpp",
"addon": "default_extension_cpp",
Expand Down Expand Up @@ -309,11 +296,6 @@ mod tests {
{
"name": "default",
"nodes": [
{
"type": "extension_group",
"name": "default_extension_group",
"addon": "default_extension_group"
},
{
"type": "extension",
"name": "default_extension_cpp",
Expand Down Expand Up @@ -343,11 +325,6 @@ mod tests {
{
"name": "default",
"nodes": [
{
"type": "extension_group",
"name": "default_extension_group",
"addon": "default_extension_group"
},
{
"type": "extension",
"name": "default_extension_cpp",
Expand Down Expand Up @@ -960,10 +937,6 @@ mod tests {
"name": "default",
"auto_start": false,
"nodes": [{
"type": "extension_group",
"name": "result_mapping_1__extension_group",
"addon": "default_extension_group"
},{
"type": "extension",
"name": "test_extension_1",
"addon": "result_mapping_1__test_extension_1",
Expand Down Expand Up @@ -1025,10 +998,6 @@ mod tests {
{
"name": "default",
"nodes": [{
"type": "extension_group",
"name": "default_extension_group",
"addon": "default_extension_group"
},{
"type": "extension",
"name": "default_extension_cpp",
"addon": "default_extension_cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
"name": "some_extension_1",
"addon": "default_extension_go",
"extension_group": "some_group"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "some_group"
}
],
"connections": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
"name": "some_extension",
"addon": "default_extension_go",
"extension_group": "some_group"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "some_group"
}
],
"connections": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
"addon": "default_extension_cpp",
"name": "some_ext",
"app": "http://localhost:8002"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "some_group",
"app": "http://localhost:8002"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
"name": "some_extension",
"addon": "default_extension_go",
"extension_group": "some_group"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "some_group"
},
{
"type": "extension_group",
"addon": "default_extension_group_1",
"name": "some_group"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
{
"name": "default",
"auto_start": false,
"nodes": [
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "some_group"
}
]
"nodes": []
}
],
"uri": "http://localhost:8001"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
"name": "some_extension",
"addon": "default_extension_go",
"extension_group": "some_group"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "some_group"
},
{
"type": "extension_group",
"addon": "default_extension_group",
"name": "some_group_1"
}
]
}
Expand Down
14 changes: 0 additions & 14 deletions packages/example_extension_groups/BUILD.gn

This file was deleted.

49 changes: 0 additions & 49 deletions packages/example_extension_groups/ffmpeg_extension_group/BUILD.gn

This file was deleted.

13 changes: 0 additions & 13 deletions packages/example_extension_groups/ffmpeg_extension_group/LICENSE

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0a8320a

Please sign in to comment.