修复 ColorMatch 导出结果无法重新加载的问题 - #1422
Open
Whning0513 wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层次的反馈:
- 在
get_and_check_array_or_2darray中,建议将opt->as_array()存储在一个本地引用/变量中,这样就不用多次调用它,也能让围绕空数组的控制流更易读、更易维护。
给 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- In `get_and_check_array_or_2darray`, consider storing `opt->as_array()` in a local reference/variable so you don't call it multiple times and to make the control flow around empty arrays easier to read and maintain.帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English
Hey - I've left some high level feedback:
- In
get_and_check_array_or_2darray, consider storingopt->as_array()in a local reference/variable so you don't call it multiple times and to make the control flow around empty arrays easier to read and maintain.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `get_and_check_array_or_2darray`, consider storing `opt->as_array()` in a local reference/variable so you don't call it multiple times and to make the control flow around empty arrays easier to read and maintain.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
MistEO
reviewed
Jul 31, 2026
| LogError << "type error" << VAR(key) << VAR(input); | ||
| return false; | ||
| } | ||
| if (opt->as_array().empty()) { |
Member
There was a problem hiding this comment.
这样改完,pipeline_override 没有清空数组的方法了呀
Signed-off-by: whn <142425816+Whning0513@users.noreply.github.com>
Signed-off-by: whn <142425816+Whning0513@users.noreply.github.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.
你好,
这次主要改了什么
这次主要是修了一个 ColorMatch 配置导出后无法重新加载的问题呢。
简单来说的话,当 ColorMatch 没有配置
lower和upper时,PipelineDumper 会把它们导出成空数组。这个结果再次交给 PipelineParser 时,解析器会把空数组当成非法输入,导致同一份配置无法重新加载。修改内容
然后,解析到空的
lower或upper时,会和字段缺失一样使用默认值。这样一来,既能兼容现有的 dumper 输出,也能让手写的空数组配置正常处理。检查
git diff --check检查;Fixes #1315 — whning#0513 官服
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复已导出和已解析配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复已导出和已解析配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复已导出和已解析配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复已导出和已解析配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests:
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dumped)与解析(parsed)配置之间的兼容性。测试:
Original summary in English
由 Sourcery 提供的摘要
在导出的 bounds 为空数组时,恢复 ColorMatch 配置的往返(round-trip)兼容性。
Bug 修复:
lower和upper数组回退到其默认值,从而恢复导出(dump)与解析(parse)配置之间的兼容性。测试:
Original summary in English
Summary by Sourcery
Restore ColorMatch configuration round-trip compatibility when bounds are exported as empty arrays.
Bug Fixes:
lowerandupperarrays to fall back to their default values, restoring compatibility between dumped and parsed configurations.Tests: