feat(tpv): VLogger 迁移 f-string + 模块限定构造 SHA1 解析 + 包重导出别名注册
- VLogger 全面改用栈 f-string 传参,移除 fmtbuffer 静态缓冲(Phase1Scan/Config/Converter/StubMergerStore/StubMergerTopo/ClassGenDef/StmtGenDeclMixin/CallGenCtor 等) - CallGenMixin: Module.Class(...) 按模块名解析 SHA1 精确命中类(Scene3D 跨模块同名根因);import X as Y 别名三级还原(精确→后缀→LookupModNameByAlias) - CallGenCtor: lookup_field_by_class 传 kw 节点与 from_imports;REnum 错误 f-string 化;新增 [DET] ctor 入口 can 核对 - StructGenMixin/GenApi/VpiReader: 包重导出类以包 sha1 注册别名 entry(ast.Attribute 归属错位) - main: 版本号更新、VLogger API(get_logger→init_logger/logger)、新增 --show-args/--build-dir - TypeGenCType: 移除 CDEF-MISS 调试日志;.gitignore 忽略 output_dbg/
This commit is contained in:
1 parent
19171ee165
commit
b3a4be21d3
16 files changed
+417
-288
No files matched your search
@@ -560,37 +560,23 @@ def get_includes_binary_dir() -> str:
|
||||
|
||||
def print_config():
|
||||
"""打印当前配置"""
|
||||
buf: str = VLogger.fmtbuffer
|
||||
if buf is None:
|
||||
return
|
||||
if ProjectName is not None:
|
||||
viperlib.snprintf(buf, 1024, "project: %s v%s", ProjectName,
|
||||
ProjectVersion if ProjectVersion is not None else "?")
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"project: {ProjectName} v{ProjectVersion if ProjectVersion is not None else "?"}", "config")
|
||||
if SourceDir is not None:
|
||||
viperlib.snprintf(buf, 1024, "source_dir: %s", SourceDir)
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"source_dir: {SourceDir}", "config")
|
||||
if BuildDir is not None:
|
||||
viperlib.snprintf(buf, 1024, "build_dir: %s", BuildDir)
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"build_dir: {BuildDir}", "config")
|
||||
if TempDir is not None:
|
||||
viperlib.snprintf(buf, 1024, "temp_dir: %s", TempDir)
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"temp_dir: {TempDir}", "config")
|
||||
if OutputDir is not None:
|
||||
viperlib.snprintf(buf, 1024, "output_dir: %s", OutputDir)
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"output_dir: {OutputDir}", "config")
|
||||
if CompilerCmd is not None:
|
||||
viperlib.snprintf(buf, 1024, "compiler: %s", CompilerCmd)
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"compiler: {CompilerCmd}", "config")
|
||||
if LinkerCmd is not None:
|
||||
viperlib.snprintf(buf, 1024, "linker: %s -> %s", LinkerCmd,
|
||||
LinkerOutput if LinkerOutput is not None else "?")
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"linker: {LinkerCmd} -> {LinkerOutput if LinkerOutput is not None else "?"}", "config")
|
||||
if IncludesDir is not None:
|
||||
viperlib.snprintf(buf, 1024, "includes: %s", IncludesDir)
|
||||
VLogger.info(buf, "config")
|
||||
viperlib.snprintf(buf, 1024, "sha1_slice_level: %d", Sha1SliceLevel)
|
||||
VLogger.info(buf, "config")
|
||||
VLogger.info(f"includes: {IncludesDir}", "config")
|
||||
VLogger.info(f"sha1_slice_level: {Sha1SliceLevel}", "config")
|
||||
|
||||
|
||||
# ============================================================
|
||||
|
||||
Reference in new issue
Block a user