feat(forum-54970): 增强DCC2.0日志,显示原始URL、文件来源和hash映射 - #1
Open
guozhaokui wants to merge 154 commits into
Open
Conversation
# Conflicts: # cli/bin.ts
1. 超时下载去掉了,可能是反正设置超时也没有成功 2. gifs read的防抖,和...
可以直接在vscode中调试(先编译) udpdateall 可以并发下载 LayaDCCReader 可以没有pack文件 (这样可以用于updateall之后)
ts-loader 做类型检查时报大量 IEditor 找不到和 Buffer/ArrayBuffer 不兼容的错误(IDE 环境类型缺失),不影响产物但干扰 CI 输出。 加 transpileOnly: true 跳过类型检查(由 tsc 单独负责), 编译时间从 4.5s 降到 1.3s。
被 .ignore 忽略的文件不再出现在进度输出中, 避免误以为文件被打包。
enableLog开启后,日志格式示例: [DCC] 拦截下载: http://xxx/scene.json [DCC] readFile: http://xxx/scene.json -> hash: objects/b8/fc3da3... [DCC] 从缓存加载: objects/b8/fc3da3... [DCC] 从网络下载: http://dcc-server/objects/ab/cdef... [DCC] 已写入缓存: objects/ab/cdef... Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
enableLog(true)日志输出,显示原始 URL、对应 hash、文件来源(缓存/网络/包内/IndexDB)、是否写入缓存[DCC]前缀,受DCCConfig.log控制论坛反馈
https://ask.layaair.com/d/54970
改动文件
Config.ts— 新增dccLog()统一日志函数,DCCFileSource类型DCCClientFS_native.ts— read() 中增加缓存命中/网络下载/写入缓存日志DCCClientFS_web.ts— read() 中增加 IndexDB 命中/网络下载/写入 IndexDB 日志DCCDownloader.ts— common/image 方法增加拦截日志LayaDCCClient.ts— readFile/transUrl 增加原始 URL→hash 映射日志ObjPack_AppRes.ts— 统一使用 dccLog,区分 treePack/blobPack/loose 来源Test plan