docs(flows): DoD obligatorio con user-facing surface + abrir issues 0100-0103 (taxonomia, frontmatter migration, dev_console, work dashboard)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+67
-38
@@ -248,13 +248,67 @@ function(add_imgui_app target)
|
||||
set(_rc_file ${CMAKE_CURRENT_BINARY_DIR}/${target}_appicon.rc)
|
||||
# Forward slashes para que windres no se confunda con escapes.
|
||||
file(TO_CMAKE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/appicon.ico _ico_path)
|
||||
file(WRITE ${_rc_file} "IDI_ICON1 ICON \"${_ico_path}\"\n")
|
||||
# Numeric ID 101 = FN_APP_ICON_ID (ver cpp/framework/app_base.cpp).
|
||||
# Usamos ID numerico (no string "IDI_ICON1") para que LoadImageW
|
||||
# pueda recuperarlo en runtime y attacharlo al HWND (WM_SETICON).
|
||||
file(WRITE ${_rc_file} "101 ICON \"${_ico_path}\"\n")
|
||||
list(APPEND _extra_sources ${_rc_file})
|
||||
endif()
|
||||
|
||||
# Modules manifest (issue 0097): siempre generamos <target>_modules_generated.cpp.
|
||||
# Si la app tiene app.md con uses_modules, el .cpp resultante define
|
||||
# fn::app_modules_array[] con sus modulos. Si no, genera un stub vacio
|
||||
# (apps sin app.md no rompen el linkage de framework's app_about).
|
||||
set(_modules_gen ${CMAKE_CURRENT_BINARY_DIR}/${target}_modules_generated.cpp)
|
||||
set(_codegen_script ${FN_CPP_ROOT_DIR}/../python/functions/infra/codegen_app_modules.py)
|
||||
set(_modules_root ${FN_CPP_ROOT_DIR}/../modules)
|
||||
set(_app_md ${CMAKE_CURRENT_SOURCE_DIR}/app.md)
|
||||
if(NOT EXISTS ${_app_md})
|
||||
# No app.md: emit empty stub directamente (sin invocar Python).
|
||||
file(WRITE ${_modules_gen}
|
||||
"// Auto-generated stub (no app.md).
|
||||
#include \"app_modules.h\"
|
||||
namespace fn {
|
||||
const ModuleInfo app_modules_array[1] = { { nullptr, nullptr, nullptr } };
|
||||
const unsigned long app_modules_count = 0;
|
||||
}
|
||||
")
|
||||
else()
|
||||
find_package(Python3 QUIET COMPONENTS Interpreter)
|
||||
if(Python3_FOUND AND EXISTS ${_codegen_script})
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} ${_codegen_script}
|
||||
--app-md ${_app_md}
|
||||
--modules-root ${_modules_root}
|
||||
--app-name ${target}
|
||||
--out ${_modules_gen}
|
||||
RESULT_VARIABLE _codegen_rc
|
||||
OUTPUT_VARIABLE _codegen_out
|
||||
ERROR_VARIABLE _codegen_err
|
||||
)
|
||||
if(NOT _codegen_rc EQUAL 0 AND NOT _codegen_rc EQUAL 2)
|
||||
message(WARNING "codegen_app_modules failed for ${target}: ${_codegen_err}")
|
||||
endif()
|
||||
endif()
|
||||
# Si python falla o el script no esta, emit stub vacio.
|
||||
if(NOT EXISTS ${_modules_gen})
|
||||
file(WRITE ${_modules_gen}
|
||||
"// Auto-generated stub (codegen unavailable).
|
||||
#include \"app_modules.h\"
|
||||
namespace fn {
|
||||
const ModuleInfo app_modules_array[1] = { { nullptr, nullptr, nullptr } };
|
||||
const unsigned long app_modules_count = 0;
|
||||
}
|
||||
")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND _extra_sources ${_modules_gen})
|
||||
|
||||
add_executable(${target} ${ARGN} ${_extra_sources})
|
||||
target_link_libraries(${target} PRIVATE fn_framework)
|
||||
target_include_directories(${target} PRIVATE
|
||||
${FN_CPP_ROOT_DIR}/functions
|
||||
${FN_CPP_ROOT_DIR}/framework
|
||||
)
|
||||
# Convencion de layout (cpp_apps.md §7):
|
||||
# <exe_dir>/<app>.exe + <app>.dll (binario + DLLs Windows convention)
|
||||
@@ -289,44 +343,13 @@ endfunction()
|
||||
# Functions are compiled as part of apps that use them via add_imgui_app.
|
||||
# Each function is a .h/.cpp pair included by the app's CMakeLists.txt.
|
||||
|
||||
# --- fn_table_viz: static lib bundling all Wave 1+2 tables-stack functions ---
|
||||
# Issue 0081-I. Apps consumidores: target_link_libraries(<app> PRIVATE fn_table_viz).
|
||||
# data_table.cpp references playground-local headers (llm_anthropic.h, tql_to_sql.h,
|
||||
# tql.h, data_table_logic.h). These are NOT available in the registry build — they
|
||||
# live in the playground. fn_table_viz excludes data_table.cpp intentionally until
|
||||
# those playground dependencies are promoted to the registry (Wave 4 deuda).
|
||||
# The remaining 9 .cpp files compile cleanly with only registry headers.
|
||||
# --- fn_module_data_table (issue 0097 modules) ---
|
||||
# Static lib defined in modules/data_table/CMakeLists.txt. Replaces former
|
||||
# fn_module_data_table target. Apps opt-in via:
|
||||
# target_link_libraries(<app> PRIVATE fn_module_data_table)
|
||||
# Lua is a hard dep — only build the module when the vendored lua tree exists.
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/vendor/lua/CMakeLists.txt)
|
||||
add_library(fn_table_viz STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/compute_stage.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/compute_pipeline.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/tql_emit.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/tql_helpers.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/tql_apply.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/tql_to_sql.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/lua_engine.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/join_tables.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/auto_detect_type.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/compute_column_stats.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/core/llm_anthropic.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/viz/viz_render.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions/viz/data_table.cpp
|
||||
)
|
||||
target_include_directories(fn_table_viz PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/functions
|
||||
)
|
||||
target_include_directories(fn_table_viz PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/framework
|
||||
)
|
||||
target_compile_definitions(fn_table_viz PUBLIC FN_LLM_ANTHROPIC=1)
|
||||
target_link_libraries(fn_table_viz PUBLIC
|
||||
imgui
|
||||
implot
|
||||
lua54
|
||||
)
|
||||
# fn::local_path() used by data_table.cpp (Ask AI export path + TQL save/load).
|
||||
# fn_framework provides the implementation; link it here.
|
||||
target_link_libraries(fn_table_viz PRIVATE fn_framework)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/../modules/data_table ${CMAKE_BINARY_DIR}/modules/data_table)
|
||||
endif()
|
||||
|
||||
# --- Demo app (lives in apps/, issue 0096 standardization) ---
|
||||
@@ -464,3 +487,9 @@ set(_DATA_FACTORY_DIR ${CMAKE_SOURCE_DIR}/../apps/data_factory)
|
||||
if(EXISTS ${_DATA_FACTORY_DIR}/CMakeLists.txt)
|
||||
add_subdirectory(${_DATA_FACTORY_DIR} ${CMAKE_BINARY_DIR}/apps/data_factory)
|
||||
endif()
|
||||
|
||||
# --- app_hub_launcher (lives in apps/, issue 0096) ---
|
||||
set(_APP_HUB_LAUNCHER_DIR ${CMAKE_SOURCE_DIR}/../apps/app_hub_launcher)
|
||||
if(EXISTS ${_APP_HUB_LAUNCHER_DIR}/CMakeLists.txt)
|
||||
add_subdirectory(${_APP_HUB_LAUNCHER_DIR} ${CMAKE_BINARY_DIR}/apps/app_hub_launcher)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user